cron-idempotency

cron-idempotency is a skill for Claude Code from catpilotai/catpilot-ai-guardrails. It costs 45 tokens per session (1,054 once invoked), scanned A, original, MIT.

A set of rules for scheduled agent jobs, such as cron tasks that run automatically in the background.

In plain words
What is it for?
Use it to design or review recurring agents, heartbeat workers, and background workflows with timeouts, work claims, completion markers, and idempotency keys.
Why use it?
It prevents overlapping runs and repeated side effects such as duplicate payments, emails, tickets, or deployments. It also limits permissions, runtime, and spending for unattended work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex; built for openclaw.

Part of the catpilot-guardrails plugin — 25 skills shipped together

Good fit Use it to design or review recurring agents, heartbeat workers, and background workflows with timeouts, work claims, completion markers, and idempotency keys.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/catpilotai/catpilot-ai-guardrails/cron-idempotency
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add catpilotai/catpilot-ai-guardrails --skill cron-idempotency
Clone the repo
git clone --depth 1 https://github.com/catpilotai/catpilot-ai-guardrails

Made for: Claude Code.

Or install catpilot-guardrails, the plugin that ships this one along with the rest of its 25 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cron-idempotency

README.md
[![agentmods](https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/cron-idempotency/github.svg)](https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/cron-idempotency)
Your own site
<a href="https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/cron-idempotency"><img src="https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/cron-idempotency/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cron-idempotency

Your own site · 80×15
<a href="https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/cron-idempotency"><img src="https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/cron-idempotency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,054 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01054
Opus 5.5 $0.00018 $0.00422
Sonnet 5.5 $0.00009 $0.00211
Haiku 4.5 $0.00005 $0.00105

Measured 10d ago against content hash b053860bcf5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cron-idempotency scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/agentic/cron-idempotency/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Baseline

Applies when: Configuring, writing, or reviewing scheduled agent tasks (cron jobs, heartbeat loops, background workers, or recurring workflows).

Always:

  • Set an explicit timeoutSeconds and token/cost budget on every scheduled agent job, and use deterministic scripts or lightweight models for routine polling.
  • Separate read-only monitoring crons from write actions; scheduled jobs must not have shell, write, deploy, or outbound message tools unless human digest approval is in the loop.
  • Enforce an atomic, durable work-claim and completion marker (store.claim(item.id, run_id, ttl_seconds) / store.mark_done(...)) before acting on any item so overlapping or retried runs are proven no-ops.
  • Pass a deterministic idempotency_key to every external side effect (payments, emails, ticket creation, webhook posts, deployments).
  • Release claims cleanly on failure (store.release(item.id)) only when the side effect did not commit, and log per-run token spend and claimed item IDs.

Never:

  • Run a scheduled agent with timeoutSeconds: null, unrestricted "tools": "all", or permission to edit its own schedule, prompt, or toolset (cron_edit).
  • Assume wall-clock schedule spacing ("*/15 * * * *") prevents overlapping runs or duplicate side effects.
  • Trigger external side effects (charging cards, sending customer emails, deploying) inside a scheduled loop without both a durable work claim and a provider-side idempotency key.

Open the full component before acting: it has the examples, the remediation steps, and the detection patterns.

Why

Scheduled tasks are unsupervised agent sessions: when a cron job misfires, loops, or overlaps with a slow prior run, no human is watching the terminal. Treating "every 15 minutes" as a state boundary rather than a trigger causes duplicate invoices, repeated customer emails, and runaway token bills whenever a run overlaps, restarts, or retries.

When to apply

Apply this component whenever creating or reviewing cron schedules, background agent workers, heartbeat checks, or queue consumers.

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 117 lines · 45 tokens per session scan A b053860bcf5c

Subscribe to this mod's changes

cron-idempotency is a skill published in the GitHub repository catpilotai/catpilot-ai-guardrails (2 stars, last pushed 8d ago), licensed MIT. It adds 45 tokens to every session and 1,054 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-29.

Related

cron-idempotency compared with skills from other repositories

cron-idempotency next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cron-idempotencycatpilotai/catpilot-ai-guardrailsSkill28d agoMITA45Claude Code
dcf-modelNousResearch/hermes-agentSkill262ktodayMITA14Claude Code, Codex
baoyu-article-illustratorNousResearch/hermes-agentSkill262ktodayMITA18Claude Code, Codex
flash-attentionNousResearch/hermes-agentSkill262ktodayMITA14Claude Code, Codex
subagent-driven-developmentNousResearch/hermes-agentSkill262ktodayMITA17Claude Code, Codex
mcporterNousResearch/hermes-agentSkill262ktodayMITA16Claude Code, Codex
mem0-vercel-ai-sdkmem0ai/mem0Skill69kyesterdayApache-2.0A146Claude Code, Codex