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/threatcl/claude-plugin/threat-driftgit clone --depth 1 https://github.com/threatcl/claude-pluginWrote 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/threatcl/claude-plugin/threat-drift)<a href="https://agentmods.dev/commands/threatcl/claude-plugin/threat-drift"><img src="https://agentmods.dev/badge/commands/threatcl/claude-plugin/threat-drift.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.00013 | $0.01639 |
| Opus 5 | $0.00006 | $0.00820 |
| Sonnet 5 | $0.00003 | $0.00328 |
| Haiku 4.5 | $0.00001 | $0.00164 |
Grade A, and why
threat-drift 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 — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are checking whether recent code changes have drifted from the documented threat model. The argument $ARGUMENTS is a git ref range (e.g. main...HEAD, HEAD~5..HEAD, v1.2.0...HEAD). If empty, default to main...HEAD — the current branch vs main, which is the natural PR-review scope.
This is a diagnostic command, not a discovery command. You're checking the model's claims against current code reality, not suggesting new threats. (For "what threats apply to this code?" use /threat-for-code instead.)
When the model is too vague to drift
Drift detection requires the threat model to make falsifiable claims about the code — things like "passwords are hashed with BCrypt in auth.go", "the API gateway authenticates via JWT", "no PII flows to third_party Sentry". Models full of generic threats like "an attacker exploits the API" can't drift because they don't assert anything checkable.
If, after reading the model in step 2, you find it's almost entirely vague language with no concrete code references, no DFD, no information_asset blocks, and no third_party_dependency blocks — say so directly to the user and stop. Don't manufacture low-confidence drift findings. Suggest they enrich the model first (a DFD via data_flow_diagram_v2, named information assets, specific control implementations) and re-run.
1. Resolve the diff
git diff $ARGUMENTS --stat # overview
git diff $ARGUMENTS # full diff for analysis
If the range is invalid (branch doesn't exist, no common ancestor), tell the user and stop.
If the diff is enormous (hundreds of files), narrow to security-relevant paths first: auth, API handlers, data access, crypto, network, dependency manifests (go.mod, package.json, requirements.txt, etc.), config files, and anything matching paths the threat model explicitly references.
2. Load the threat model
Find the local .hcl threat model file — usually one or two at the repo root or under threatmodels/. Read it fully. Note:
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 · 129 lines · 13 tokens per session scan A 72b3a6315306
threat-drift is a command published in the GitHub repository threatcl/claude-plugin (4 stars, last pushed 20d ago), licensed MIT. It adds 13 tokens to every session and 1,639 once invoked, about $0.0001 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
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.