跳到正文
TakoAPI
返回技能列表

cron-worker-guardrails

由 phenomenoner 提供

Coding Agents & IDEs
648下载量由 clawskills.sh 提供
1浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

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

描述

该技能的功能

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.

何时使用

  • 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

示例工作流

输入

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

智能体
  1. 1

    Identify the inline bash -lc '...' block as the likely source of nested quote breakage

  2. 2

    Extract the shell logic into a standalone script at tools/<job>.sh or tools/<job>.py

  3. 3

    Replace the cron entry with a single short command: python3 tools/<job>.py

  4. 4

    Add a cd to the repo root at the top of the script to fix cwd drift

  5. 5

    Ensure the script prints nothing on success, or exactly NO_REPLY

输出

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

安装

clawhub install phenomenoner/cron-worker-guardrails

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接