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.
npx agentmods add commands/axiomantic/spellbook/dedupe-applygit clone --depth 1 https://github.com/axiomantic/spellbookWrote 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/axiomantic/spellbook/dedupe-apply)<a href="https://agentmods.dev/commands/axiomantic/spellbook/dedupe-apply"><img src="https://agentmods.dev/badge/commands/axiomantic/spellbook/dedupe-apply.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 | $0.00041 | $0.02823 |
| Opus 5 | $0.00020 | $0.01411 |
| Sonnet 5 | $0.00008 | $0.00565 |
| Haiku 4.5 | $0.00004 | $0.00282 |
Grade A, and why
dedupe-apply 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 4d 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 — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MISSION
Phase 4 of the dedupe skill: consume the report artifact produced by
/dedupe-report, apply every EXTRACT finding marked apply after one
final pre-edit checkpoint, and journal each edit in a deterministic,
rollback-ready format.
Part of the dedupe- command family.* Run after /dedupe-report.
Invariant Principles
- Clean working tree is a hard gate —
git status --porcelainmust be empty. There is no override flag. The operator commits / stashes / discards before this command will touch the filesystem. - Every edit is journaled — the journal is the rollback source of truth. If an edit is not journaled, it did not happen.
- Per-finding final checkpoint — every EXTRACT finding marked
applyin the report receives oneAskUserQuestionprompt immediately before its edit. There is no "apply all" affordance. - Rollback is byte-exact — restoring an original block requires the
new_pathcontent to match what the journal recorded as the post-apply state. Mismatch means the canonical home was edited externally; warn and skip rather than overwrite the operator's work. - No Python, no shell scripts — base64 encode/decode runs via the
base64CLI through the harness Bash tool. Journal parsing uses POSIX text utilities plusjq(preinstalled via brew on the dev machine).
Clean-tree-gate invariant: The clean-tree gate has no override. Every applied edit is journaled; the only way rollback remains trustworthy is if the working tree before apply is a known git state. Suppressing the gate would silently break rollback's correctness invariant.
Prohibited operations:
- Editing any file before the clean-tree gate passes.
- Editing any file before the per-finding
AskUserQuestioncheckpoint for that finding has returnedapply. - Writing a journal entry whose
original_text_*_b64field does not round-trip back to the exact bytes read from the source file. - Rolling back a finding whose
new_pathcontent does not match the recordednew_text_b64(warn and skip instead). - Implementing base64 encode/decode in Python.
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.
- 4d ago First seen · 326 lines · 41 tokens per session scan A 1996f8fa8818
dedupe-apply is a command published in the GitHub repository axiomantic/spellbook (10 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 2,823 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
audit-agents-skills
Audit quality of agents, skills, and commands in a Claude Code project.
boldguy-linkedin-answer
Draft a LinkedIn comment on a post, referencing the guide's relevant section, in Flow style with AI markers removed.
security-audit
Comprehensive security audit of your project AND Claude Code configuration. Analyzes secrets exposure, injection surfaces, dependencies, hook security, and produces a scored security posture assessment.
audit-quiz-coverage
Find quiz coverage gaps from recent guide/CHANGELOG/CC-releases changes and propose new questions.
sync
Check guide/landing synchronization status.
worktree
Create a git worktree for isolated feature/fix work.