LaunchKit · 2026
Back to Skills

cron-worker-guardrails

Use when hardening OpenClaw cron workers (especially isolated agentTurn jobs) against quoting failures, brittle.

0
648 downloads
by @phenomenoner

Setup & Installation

openclaw skills install @phenomenoner/cron-worker-guardrails

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install cron-worker-guardrails

Version History

v1.0.5Mar 1, 2026 - Version note by skill developer:

POSIX-scoped hardening guide: define NO_REPLY, improve Quick Start, generalize branch examples, refresh contract wording.

What This Skill Does

A hardening checklist for cron and background workers running in POSIX shells (bash/sh). Covers the most common failure modes: brittle quoting in one-liners, working directory and environment drift, and false pipeline errors from pipefail combined with SIGPIPE. Outputs safe patterns for scripts-first structure, deterministic execution, and silent-on-success behavior.

Cron failures are usually wrapper problems, not logic bugs, and this skill targets exactly that layer with concrete fix patterns rather than general shell advice.

When to use it

  • Fixing a cron job that works locally but fails in production
  • Eliminating false failures from pipefail and head in shell pipelines
  • Standardizing unattended automation to emit nothing on success
  • Recovering from non-fast-forward git push rejections in automated jobs
  • Auditing shell one-liners for quoting and escaping bugs before scheduling

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: my cron job keeps failing with 'unexpected EOF while looking for matching )' but the script runs fine manually

AGENT
  1. 1Identify the inline bash -lc '...' block as the likely source of nested quote breakage
  2. 2Extract the shell logic into a standalone script at tools/<job>.sh or tools/<job>.py
  3. 3Replace the cron entry with a single short command: python3 tools/<job>.py
  4. 4Add a cd to the repo root at the top of the script to fix cwd drift
  5. 5Ensure the script prints nothing on success, or exactly NO_REPLY
OUTPUT

A cron entry that calls one script, with deterministic working directory, no quoting issues, and silent-on-success behavior