AGENT SKILL

cron-worker-guardrails

Use when hardening OpenClaw cron workers (especially isolated agentTurn jobs) against quoting failures, brittle shell patterns, SIGPIPE false failures, and cwd/env drift. Output: a scripts-first hardening checklist + portable patterns.

License 许可
MIT
最近更新
2026-05-17
Stars
★ 0
Forks
0

01 前言 Front Matter

name
cron-worker-guardrails
slug
cron-worker-guardrails
license
MIT
version
1.0.1
metadata
{ "openclaw": { "emoji": "🧯" } }
description
Use when hardening OpenClaw cron workers (especially isolated agentTurn jobs) against quoting failures, brittle shell patterns, SIGPIPE false failures, and cwd/env drift. Output: a scripts-first hardening checklist + portable patterns.

02 资源文件 3

03 SKILL.md 正文

Cron Worker Guardrails

A reliability-first checklist for OpenClaw cron workers (especially sessionTarget="isolated" + payload.kind="agentTurn") and any automation that runs unattended.

Why this skill exists

Cron failures are rarely “logic bugs.” They’re usually:

  • brittle shell quoting (bash -lc '...' nested quotes)
  • command substitution surprises ($(...))
  • cwd/env drift (“works locally, fails in cron”)
  • pipelines that fail for the wrong reason (pipefail + head / SIGPIPE)

The fix is boring but effective: scripts-first + deterministic execution + silent-on-success.

Quick Start

If your cron payload is getting long or fragile:

  1. Move logic into a script (recommended location: tools/ in the target repo)
  2. Cron runs one short command
  3. Script prints NO_REPLY on success

If you want a portable “contract” to standardize your cron workers, use the file included with this skill:

  • references/cron-agent-contract.md

Also see:

  • references/pitfalls.md

Portability rule (important)

Do not hardcode deployment-specific absolute paths tied to one machine.

People install OpenClaw on different OSes and directory layouts (Linux/macOS/Windows; different home dirs; containers). Prefer:

  • repo-relative paths
  • environment variables you document
  • minimal wrappers that cd into the repo

Default stance (reliability-first)

  • Prefer scripts-first over multi-line bash -lc '...'.
  • Prefer one command per cron job.
  • Prefer explicit interpreters (python3, node, etc.) rather than ambiguous shims.
  • Keep success output silent: NO_REPLY.

Common failure patterns → fixes

1) unexpected EOF while looking for matching ')'

Likely causes:

  • unclosed $(...) from command substitution
  • broken nested quotes in bash -lc ' ... '

Fix pattern:

  • Replace the whole multi-line shell block with a small script.
  • Cron calls exactly one short command, e.g.:
    • python3 tools/<job>.py

2) False failure from pipefail + head (SIGPIPE)

Symptom:

  • command exits non-zero even though the output you wanted is fine

Fix pattern:

  • avoid pipefail when piping into head
  • or better: do the filtering in a script (read only what you need)

3) “Works locally, fails in cron”

Common causes:

  • wrong working directory
  • missing env vars
  • different PATH

Fix pattern:

  • cd into the repo (or have the script do it)
  • keep dependencies explicit and documented

Copy/paste hardening header (portable)

Use this near the top of a cron prompt (2 lines, low-noise):

  • Hardening (MUST): follow references/cron-agent-contract.md (scripts-first, deterministic cwd, silent-on-success).
  • Also apply cron-worker-guardrails (this skill). If parsing/multi-step logic is needed, write/run a small tools/*.py script.

04 同仓库更多 Skills

meghal86
meghal86/stacksignal

zvukogram

Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.

★ 0
meghal86
meghal86/stacksignal

zohomail

Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels. Use this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.

★ 0
meghal86
meghal86/stacksignal

zoho-recruit

Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows. Use this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.

★ 0
meghal86
meghal86/stacksignal

zoho-people

Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave. Use this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.

★ 0
meghal86
meghal86/stacksignal

zoho-mail

Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels. Use this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.

★ 0
meghal86
meghal86/stacksignal

zoho-inventory

Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments. Use this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.

★ 0