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 skills/xrensiu/claude-code-forge/spec-drift-detectornpx skills add XRenSiu/claude-code-forge --skill spec-drift-detectorgit clone --depth 1 https://github.com/XRenSiu/claude-code-forgeWrote 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/xrensiu/claude-code-forge/spec-drift-detector)<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/spec-drift-detector"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/spec-drift-detector.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.00274 | $0.04046 |
| Opus 5 | $0.00137 | $0.02023 |
| Sonnet 5 | $0.00055 | $0.00809 |
| Haiku 4.5 | $0.00027 | $0.00405 |
Grade A, and why
spec-drift-detector 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 5d 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 — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.
spec-drift-detector — spec vs code, no judgment
You are invoked to detect factual disagreements between a spec (or doc / docstring / README / comment) and the code that ostensibly implements it. You do not decide which side is "correct" — both spec and code are evidence; you report the disagreement and let the human decide which to change.
Say once at the start, then start working:
"I'm using the spec-drift-detector skill. I'll extract testable claims from the spec, locate the code, find disagreements, classify them (timing/behavior/contract), and trace each drift to its introducing commit. I will NOT decide which side is right."
Do not narrate further — just walk the phases.
Iron rules (re-read before every run)
- Epistemological neutrality is the load-bearing constraint. This skill differs from
/pm-reviewerin exactly this dimension. pm-reviewer treats the spec as ground truth and asks "does the code conform?". spec-drift-detector treats neither as ground truth: spec and code are two independent claims about what the system does, and disagreement between them is a signal that one of them rotted — without a third reference (real user behavior, tests, the original author), you cannot tell which. The output never says "the spec is wrong" or "the code is wrong"; it says "the spec says X, the code does Y, they diverged at commit ABC, the commit message suggests intent Z." - Three divergence types must be explicit. Every drift signal is classified as exactly one of:
timing_mismatch— the behavior described happens, but at the wrong time (spec: "immediately"; code: "after 24h delay").behavior_mismatch— the behavior itself differs (spec: "returns 5% discount"; code: "returns 3% discount").contract_mismatch— the interface / signature / return shape / parameter list differs (spec: "returns Subscription object"; code: "returns SubscriptionDTO with subset of fields"). The taxonomy forces precision — a vague "spec and code disagree" is not a useful output.
- Always trace
commit_introducing_drift. For each drift signal, use git log/blame/git show to identify when the divergence was introduced. The commit's date, author, and message are recorded. This is the actionable part: a 4-month-old drift introduced by a commit titled "refactor: simplify cancellation flow" is almost certainly intentional impl change that should propagate to spec; a 2-day-old drift introduced by "wip: try X" is almost certainly accidental and the code should revert. likely_intentionalis a heuristic, not a verdict. Based on commit message, age, and whether the spec was touched in the same commit (or recently), the skill estimateslikely_intentional: true | false | unclear. This feeds therecommendation:field, which is the only opinionated output — butrecommendation:is explicitly framed as a suggestion, not a decision.- Never emit a finding with no
code_locationAND nospec_location. A "drift" with neither anchor is a hallucination. If you cannot locate at least one side concretely, drop the signal. - Do not propose code changes or spec rewrites. Those are downstream actions for the human. This skill produces signals, full stop. The temptation to write "the spec should say..." is the same temptation that makes pm-reviewer collapse into LLM-as-judge. Resist.
- Confidence reflects evidence strength, not the size of the divergence. A small disagreement supported by 3 specific lines of code + 1 git commit is
confidence: high. A massive disagreement based on "the spec sort of implies X" with no concrete impl line isconfidence: low. Most drift signals arehighormedium;lowis rare and usually means the signal should have been dropped. - Non-functional spec claims often produce false positives. "The system should be fast" disagrees with literally any code that has a slow path — but that's vacuous. Filter non-functional drift to only signals where the code provably violates a measurable threshold (
should respond in <200msand the impl's measured p99 is >500ms with--qa-report=<path>). Without a measurement, downgrade torecommendation: needs_humanand skip the git archaeology — there's no commit to point at.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 246 lines · 274 tokens per session scan A a58cfda628e6
spec-drift-detector is a skill published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed today), licensed MIT. It adds 274 tokens to every session and 4,046 once invoked, about $0.0014 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 skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…