cd /news/ai-agents/a-free-claude-code-skill-that-audits… · home › topics › ai-agents › article
[ARTICLE · art-178256] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

A free Claude Code skill that audits your cron job before it bills you

A developer released cron-preflight, a free read-only Claude Code skill that audits scheduled `claude -p` cron jobs for API-key billing leaks, missing `flock` overlap protection, absent `--max-turns`/`timeout` caps, and overly broad `--allowedTools` permissions, reporting PASS/FAIL with file:line references and fixes. The skill is distributed as a markdown SKILL.md file, and the developer also maintains the MIT-licensed agent-autopilot-kit cron launcher, which they say passes all ten checks.

key takeaway

Unset ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN at the top of a cron-invoked script unless API billing is intended, and wrap the whole `claude -p` command in `flock -n` plus `--max-turns` and `timeout` to prevent overlap and runaway runs.

by read2 min views39 publishedNov 29, 2026

Scheduling claude -p from cron is easy. Scheduling it so it can't silently bill an API key, overlap with itself,

hang forever, or hammer a usage limit is where most setups fall short. I turned the checklist I use into a

Claude Code skill: a plain markdown file Claude loads when you ask it to audit a scheduled run.

It is read-only. It reads your crontab and the script it calls, then reports PASS / FAIL with file:line and a fix.

ANTHROPIC_API_KEY is set anywhere the cron job inherits it (script, sourced files, /etc/environment, VAR= lines in the crontab), claude may bill the API instead of your plan. Fix: unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN at the top of the script, unless API billing is intended.flock -n means a slow run plus the next tick gives you two agents editing the same files.--max-turns timeout around the whole command.$HOME; cd to the project first.--allowedTools, not a blanket Bash(*) or --dangerously-skip-permissions outside a sandbox.@reboot or a systemd unit if it must survive restarts. Save the file as ~/.claude/skills/cron-preflight/SKILL.md, then ask Claude: "run cron-preflight on my crontab".

Free download (pay what you want, $0 is fine):

[https://spikeyjr.gumroad.com/l/claude-code-cron-preflight](https://spikeyjr.gumroad.com/l/claude-code-cron-preflight)

The output is a table, # | Check | Result | Where | Fix, and a one-line verdict. It never prints secret values

it finds; it writes `<set>` instead.

The free, MIT-licensed [agent-autopilot-kit](https://github.com/spikeyjr/agent-autopilot-kit) is a cron launcher that

passes all ten: flock, key stripping, turn cap, limit detection with a file, daily run cap, @reboot, logs.

There is also a paid pack of five more ops skills (session handoff, task slicing for short sessions, pre-publish secret

scan, log triage, changelog from git) for people running Claude Code across many short sessions:

https://spikeyjr.gumroad.com/l/claude-code-headless-skills Disclosure: I maintain the repo and sell the paid pack; this post was drafted with AI assistance. Unofficial, not affiliated with Anthropic.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-free-claude-code-s…] indexed:0 read:2min 2026-11-29 · —