Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/frankxai/claude-skills-librarynpx agentmods add skills/frankxai/claude-skills-library/routine-contractWrote 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.
[](https://agentmods.dev/skills/frankxai/claude-skills-library/routine-contract)<a href="https://agentmods.dev/skills/frankxai/claude-skills-library/routine-contract"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/routine-contract/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.
<a href="https://agentmods.dev/skills/frankxai/claude-skills-library/routine-contract"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/routine-contract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00108 | $0.01272 |
| Opus 5.5 | $0.00043 | $0.00509 |
| Sonnet 5.5 | $0.00022 | $0.00254 |
| Haiku 4.5 | $0.00011 | $0.00127 |
Grade A, and why
routine-contract 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Routine contract
An unattended agent session fails differently from an interactive one. Nobody reads its transcript, so a plausible-sounding report is indistinguishable from work. This is the contract that closes that gap.
The failure this prevents
On 2026-09-06 an audit of a production fleet found all seven scheduled
routines reporting SUCCEEDED while committing nothing — for weeks. Not
degraded: zero durable output. The receipts directory one routine claimed to
write had never existed. Another had fired every Friday since a repair and
produced no file. No routine had ever pushed a commit.
Two faults, both structural:
- The work sat behind an orchestration tool that requires explicit user opt-in. A cron prompt is not a user asking, so the call was declined, the agent wrote a reasonable-looking summary, and the turn ended cleanly.
- The prompts ended in "report your findings" — into a run-history page that is discarded with the container.
Nothing ever asserted the output existed, so status tracked narration rather
than work. SUCCEEDED means the turn ended without throwing. It has never
meant the job was done.
Run durations were the tell: 76 seconds for a three-domain research scan, 65 for a thirteen-model benchmark. Nothing of that shape finishes that fast.
The four rules
1. Preflight before work, not after
First command, before any scanning, drafting or model calls:
node scripts/ops/routine-digest.mjs preflight --routine <name>
It proves the sink is reachable — git identity, remote auth, a writable digest path. Non-zero exit means stop and report red without doing the work. Work that cannot be persisted is work thrown away; spending tokens first makes the loss larger, not smaller.
2. Never call opt-in-gated orchestration from a routine
Tools that require the user to ask for them in their own words cannot be
satisfied by a cron prompt. In Claude Code this is the Workflow tool; other
harnesses have equivalents. The call is declined or errors, and the session
still ends green.
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.
- 1mo ago First seen · 125 lines · 108 tokens per session scan A a44e4a1b35de
routine-contract is a skill published in the GitHub repository frankxai/claude-skills-library (47 stars, last pushed today), licensed MIT. It adds 108 tokens to every session and 1,272 once invoked, about $0.0004 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-09-09.
Other skills, from other repositories
proactive-background-watcher
Grants the AI the ability to act proactively using native cron/timer scheduling. The agent can monitor systems, poll APIs, or watch logs in the background and self-trigger without waiting for user prompts.
turborepo
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines…
token-saver
Token optimization guide for Claude Code. This skill should be used when the user wants to reduce API costs, learn model routing strategies, or understand how to use free/cheaper tools (Ollama, Haiku) instead of burning expensive Claude tokens on routine tasks. Triggers on: save tokens, reduce costs, token tips, cheap…
wayfinder
A planning method that maps a large, uncertain project into linked decision tickets in a repository's issue tracker. An issue tracker is a system for recording and organizing project work.
scaffold-exercises
A directory scaffold for course exercises, with sections, exercise folders, and optional problem, solution, or explanation versions. It creates the required Markdown files and checks the result with the repository's linter.
domain-modeling
A practice for building and maintaining a project’s domain model: the shared terms, concrete scenarios, and recorded architecture decisions that describe what the software is about.