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.
git clone --depth 1 https://github.com/goldenwo/claude-state-driftWrote 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/commands/goldenwo/claude-state-drift/clean)<a href="https://agentmods.dev/commands/goldenwo/claude-state-drift/clean"><img src="https://agentmods.dev/badge/commands/goldenwo/claude-state-drift/clean.svg" alt="Measured on agentmods" 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.00037 | $0.00324 |
| Opus 5 | $0.00018 | $0.00162 |
| Sonnet 5 | $0.00007 | $0.00065 |
| Haiku 4.5 | $0.00004 | $0.00032 |
Grade A, and why
clean 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 8d 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.
What it actually says
Archive stale done deliverables out of .claude/state.json to keep it lean, using the propose-then-apply pattern (never a blind write).
- Run
state-clean(dry-run — no flags) against the current project. It prints whichdonedeliverables are old enough to archive; it keeps the most-recent N plus everything in-progress / deferred / blocked, open questions, and the current focus. - Show the user that list and the counts. If nothing is archivable, say so and stop.
- Ask the user to confirm. Offer to tune
--keep N(default 10 most-recent done kept) or--older-than DAYS(default 30) if they want a different cut. - Only after explicit approval, run
state-clean --apply(with any agreed flags). Archived entries go to an append-only.claude/state-archive.jsonl; git is the backstop, so it is reversible. - Confirm what was archived. (Note:
state-cleandoes not touchlast_updated— it is housekeeping, not a state change.)
Never run --apply before the user has seen the dry-run and approved. state-clean is on the Bash tool's PATH while the plugin is enabled.
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.
- 8d ago First seen · 15 lines · 37 tokens per session scan A 2895c10d0c70
clean is a command published in the GitHub repository goldenwo/claude-state-drift (1 stars, last pushed 21d ago), licensed MIT. It adds 37 tokens to every session and 324 once invoked, about $0.0002 per session on Opus 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-08-31.
Other commands, from other repositories
explore
Fast codebase exploration with Antigravity's agy CLI (Gemini 3.7 Flash, read-only). EXPERIMENTAL.
develop
Implement skill development issues with TDD-governed workflow.
statusline
Show the governor fleet in your Claude Code statusline. Explicit, opt-in, and chains — it never replaces an existing statusline.
takeoff
Create, resume, or clear a session hand-off baton (one per work line).
tasks
Inspect Modellix task status and recover tasks after a timeout or unknown submission.
resume
Auto-detect and resume any interrupted Plan Cascade task. Detects mega-plan, hybrid-worktree, or hybrid-auto context and routes to the appropriate resume command.