automation-hardening
Skill4 starsChanged 8 months agoMITView on GitHub
Audit any unattended automation (cron job, LaunchAgent, GitHub Actions schedule, Cloudflare Worker cron, scheduled Claude task or routine, n8n flow, queue sender) against a 12-point reliability checklist, score it, and write the fixes. Use when the user says "is this automation solid", "harden this", "audit my automations", "why did this stop running", "automation checklist", before calling any new scheduled job done, or after a job failed silently.
In this repository100 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-architectSkill
- architect-plan-for-dispatchSkill
- automate-auditSkill
- brain-dumpSkill
- chat-to-code-promptSkill
- cli-apifySkill
- cli-batSkill
- cli-duckdbSkill
- cli-fdSkill
- cli-ffmpegSkill
- cli-fzfSkill
- cli-ghSkill
- cli-httpieSkill
- cli-imagemagickSkill
- cli-jqSkill
- cli-lazygitSkill
- cli-pandocSkill
- cli-playwrightSkill
- cli-ripgrepSkill
- cli-sqliteSkill
- cli-yqSkill
- cli-yt-dlpSkill
- codebase-reviewSkill
- context-summarySkill
- data-ui-refineSkill
- decomposeSkill
- delegateSkill
- design-a-systemSkill
- design-doc-reviewSkill
- devils-advocateSkill
- gh-repo-createSkill
- ig-savesSkill
- interrogateSkill
- mentor-aristotleSkill
- mentor-attiaSkill
- mentor-aureliusSkill
- mentor-bloomSkill
- mentor-brownSkill
- mentor-buffettSkill
- mentor-builderSkill
- mentor-carnegieSkill
- mentor-clearSkill
- mentor-councilSkill
- mentor-cunninghamSkill
- mentor-dalioSkill
- mentor-davinciSkill
- mentor-demingSkill
- mentor-ferrissSkill
- mentor-feynmanSkill
- mentor-franklSkill
- mentor-garyveeSkill
- mentor-godinSkill
- mentor-gogginsSkill
- mentor-greeneSkill
- mentor-holidaySkill
- mentor-hormoziSkill
- mentor-houselSkill
- mentor-jockoSkill
- mentor-jungSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 62
Never weaken a gate to make a run pass.
- Distinctive: line 66
Do not send, post or spend while testing.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Automation hardening
An automation that works once is a demo. It is real when it keeps working while nobody watches, and says so loudly when it does not. Most break in week two and nobody notices for a month.
The 12 checks
Score each item PASS, PARTIAL, FAIL or N/A, with the file and line that proves it. Evidence only: "probably retries" is a FAIL.
| # | Check | PASS means | ||
| 1 | Error branch | Every step that can fail has a handled path: caught, logged, and routed to the alert. No bare catch {} or ` | true` that hides a failure the run depends on. | |
| 2 | Retries | Transient failures (network, 429, 5xx) retry with backoff and a cap. Permanent failures (4xx, validation) do not retry. Retries are idempotent (see 6). | ||
| 3 | Alert when it stops | A missed run is detected, not only a failed one: a heartbeat or "last success" timestamp is checked by something else, and an overdue job pages a person (issue, email, push). Silence must be impossible. | ||
| 4 | Run log | Every run writes start, end, outcome, counts and duration somewhere durable and readable later (log file with rotation, D1 row, issue comment, Actions history). | ||
| 5 | Tested with bad data | The job was run against empty input, malformed input, a duplicate, an oversized item and a missing field, and behaves (skips with a log line, does not crash the batch or write garbage). | ||
| 6 | Duplicate check | Re-running the same window cannot double-send, double-post or double-charge: idempotency key, unique constraint, "seen" ledger or status column checked before the side effect. | ||
| 7 | Rate limits | Every external API call respects its documented limit (sleep, token bucket, batch size) and handles 429 with Retry-After. Limits written down next to the call. | ||
| 8 | Keys out of the workflow | No secret in code, config, logs or the prompt. Secrets come from the platform store (Actions secrets, Worker secrets, 1Password op, keychain), and logs redact them. Rotation path known. | ||
| 9 | Timeout | Every network call and the job as a whole have a timeout. A hung run cannot block the next one (lock with expiry, concurrency group, timeout-minutes). | ||
| 10 | Kill switch | One flag stops it without a deploy: a disabled setting, an env var, an empty queue that self-disables, a paused row. Documented where the user will look. | ||
| 11 | Human check on money and messages | Anything that sends email or DMs, posts publicly, moves money, or deletes data waits for an explicit approval, or is limited to a pre-approved queue. Default is draft, not send. | ||
| 12 | Cost cap | Paid calls (LLM tokens, APIs, SMS, compute) have a per-run and per-month ceiling enforced in code, with an alert before the cap. Free-tier limits counted the same way. |
Procedure
- Inventory. List every unattended job in scope. On this machine look at:
launchctl list | grep -v com.apple,~/Library/LaunchAgents/*.plist,crontab -l,.github/workflows/*.ymlwithschedule:in each active repo,wrangler.toml/wrangler.jsonctriggers.cronsin Worker repos, scheduled tasks (mcp__scheduled-tasks__list_scheduled_tasks), cloud routines, and anything the user names. Record: name, trigger, what it touches, side effects. - Score. For each job, read the code and config and fill the 12-row table with evidence. Read recent run history (Actions runs, log files, D1 rows) to confirm checks 3 and 4 hold in practice, not just in code.
- Rank fixes. Order by blast radius: silent failure on anything that sends or spends first (3, 11, 12, 6), then data integrity (5, 6), then the rest.
- Fix. One job per branch and PR (or per commit where the repo commits to main). Prove each fix: force the failure (bad input, revoked token, killed network, stopped schedule) and show the alert or the safe skip, then revert the forcing change.
- Report.
AUTOMATION-AUDIT-<date>.mdin the repo or in~/code/idea-intake/: one scored table per job, the fixes made with links, and the open items.
Rules
- Never weaken a gate to make a run pass.
- An alert nobody reads is a FAIL on 3. One issue per incident, updated, closed on recovery, beats a stream of emails.
- macOS cron cannot reach the keychain; jobs that need
gh,gwsoroprun as LaunchAgents. - A scheduled GitHub workflow is disabled after 60 days without repo activity; a monitor workflow must keep itself enabled or be watched by something else.
- Do not send, post or spend while testing. Use a dry-run flag or a sandbox account.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

