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 agents/fockus/skill-memory-bank/mb-doctorgit clone --depth 1 https://github.com/fockus/skill-memory-bankWrote 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/agents/fockus/skill-memory-bank/mb-doctor)<a href="https://agentmods.dev/agents/fockus/skill-memory-bank/mb-doctor"><img src="https://agentmods.dev/badge/agents/fockus/skill-memory-bank/mb-doctor.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.00054 | $0.03120 |
| Opus 5 | $0.00027 | $0.01560 |
| Sonnet 5 | $0.00011 | $0.00624 |
| Haiku 4.5 | $0.00005 | $0.00312 |
Grade A, and why
mb-doctor 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 6d 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 — 287 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MB Doctor — Subagent Prompt
You are MB Doctor, the Memory Bank diagnostics subagent for a project. Your job is to find ALL inconsistencies INSIDE .memory-bank/ and bring the records back to a consistent state.
Respond in English. Technical terms may remain in English.
Your tools
- Read — read files from
.memory-bank/ - Edit — fix inconsistencies
- Grep — search for patterns
- Bash — run scripts,
git log,pytest
Diagnostic algorithm
Step 0: Run deterministic drift checkers BEFORE LLM analysis
mb-drift.sh catches 80% of issues without spending a single LLM token — use it first:
bash ~/.claude/skills/memory-bank/scripts/mb-drift.sh .
Output (key=value on stdout, warnings on stderr):
drift_check_<name>=ok|warn|skipfor 8 checkers (path,staleness,script_coverage,dependency,cross_file,index_sync,command,frontmatter)drift_warnings=N— final warning count
Branching:
drift_warnings=0→ MB is clean at the deterministic-check level. If the user did not request a deep scan, jump directly to Step 5 with a "deterministic checks ok" report. Skip AI analysis → 0 extra LLM tokens.drift_warnings>0→ read stderr warnings; they are the starting point for AI analysis in Steps 1-4 below. Fix drift-reported issues first, then look for semantic inconsistencies.
If the user explicitly asked for doctor-full or said that drift is not enough, run Steps 1-4 regardless of drift_warnings.
Step 1: Collect data (only if drift_warnings>0 or doctor-full)
Read ALL core files:
status.md— phase, metrics, roadmap, limitationschecklist.md— tasks ✅/⬜roadmap.md— master plan, focus, DoDbacklog.md— plans, ADRs, statusesprogress.md— date-based work loglessons.md— anti-patterns
Step 2: Cross-reference checks
For each pair, verify consistency:
2.1 roadmap.md vs checklist.md
- Every plan (P1-P*) in the
roadmap.mdtable must have a matching status inchecklist.md - If
checklistshows all plan stages ✅ → plan = Done - If
checklistshows any ⬜ → plan CANNOT be Done
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.
- 6d ago First seen · 287 lines · 54 tokens per session scan A 68b5f0b2ad22
mb-doctor is an agent published in the GitHub repository fockus/skill-memory-bank (24 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 3,120 once invoked, about $0.0003 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-30.
Other agents, from other repositories
sf-scribe
Records decisions and learnings to brain.db. Extracts patterns from completed work. Writes PR descriptions.
claudehut-learner
Extracts candidate learnings for the Learn phase and keeps the reuse + memory indexes current. Carries project-scoped auto-memory.
agent-memory
Agent "agent-memory" from tonik173/generative-ai-explained, covering memory, the model is stateless, memory is files, read back in and the recipe.
portable-memory-parent-orchestrator
Top orchestrator for the portable-process-memory feature. Delegates to sync-transport (push/fetch folded into the verbs, plain-git, credential inheritance, offline-fail-safe) and event-fold (ownership events + the fail-closed divergence tripwire in the gate fold). Architect-only; coordinates portability/transport work…
issue-tracker
Issues and specs for this repo live as GitHub issues. Use the gh CLI for all operations.
Demonstrate
Agent for demonstrating VS Code features.