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/fatihkan/badiWrote 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/fatihkan/badi/drift-detect)<a href="https://agentmods.dev/commands/fatihkan/badi/drift-detect"><img src="https://agentmods.dev/badge/commands/fatihkan/badi/drift-detect.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.00000 | $0.00927 |
| Opus 5 | $0.00000 | $0.00464 |
| Sonnet 5 | $0.00000 | $0.00185 |
| Haiku 4.5 | $0.00000 | $0.00093 |
Grade A, and why
drift-detect 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 today.
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 — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Configuration drift detection command. Finds inconsistencies, orphaned components, and stale content in the Badi system.
Required Tools
- Read (configuration files)
- Grep (reference scan)
- Glob (file existence check)
- Bash (file info, JSON validation)
Files to Audit
CLAUDE.md(main instructions).claude/memory.md(memory layer).claude/knowledge-base.md(knowledge base).claude/settings.json(settings).claude/commands/(all command files).claude/command-index.md(command index).claude/agents/(agent files, if any)
Procedure (5 Checks)
Check 1: Contradiction Detection
Look for inconsistencies across files:
CLAUDE.md Contradictions:
- Are there instructions that contradict each other?
- Different directions about the same topic?
- Conflicts between old and new instructions?
memory.md - Reality Alignment:
- Does the project state in memory reflect reality?
- Any information no longer valid?
- Is the tech stack info current?
- Are the file paths still correct?
knowledge-base.md Consistency:
- Any internal contradictions?
- Information conflicting with memory.md?
- Insights inconsistent with CLAUDE.md?
settings.json Validation:
- Is the JSON format valid?
- Do the referenced file paths exist?
- Are the hook definitions correctly formatted?
Check 2: Orphaned Component Detection
Find disconnected components:
- Uninvoked Commands: Files in
commands/referenced nowhere - Unused Agents: Agents in
agents/never invoked anywhere - Broken References: Citations to files that do not exist
- Disconnected Hooks: Hooks defined in settings.json without files
- Commands Missing from the Index: Mismatch between
command-index.mdandcommands/ - Redundant Files: Old configuration files no longer in use
Check 3: Staleness Checks
Assess content freshness:
- memory.md Entries: Flag entries older than 3 days
- Daily Notes: Unprocessed notes older than 7 days
- Handoff Notes: Handoffs older than 14 days
- Task Board: Open tasks older than 30 days
- knowledge-base.md: Old information needing re-verification
- Tool References: Citations to tools that no longer exist
- Archive Notes: Archive files older than 30 days (cleanup candidates)
- Stuck Tasks: Tasks making no progress
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.
- today First seen · 128 lines · 0 tokens per session scan A 89f5b07ca875
drift-detect is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 927 tokens. 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-06.
Other commands, from other repositories
check-cache-bugs
Audit Claude Code setup for cache bugs (CC#40524) — sentinel, --resume/--continue, attribution header + ArkNill B3/B4/B5.
investigate
Systematic root-cause debugging — find the cause before writing any fix.
optimize
Analyze and suggest performance improvements for code, queries, or systems.
session-save
Save the current session state — decisions, modified files, current status, and next steps — to a handoff file for later resume.
diagnose
Interactive troubleshooting assistant for Claude Code issues.
review-pr
Perform a comprehensive code review of a pull request.