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-codebase-mappergit clone --depth 1 https://github.com/fockus/skill-memory-bankWhat 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.00051 | $0.03762 |
| Opus 5 | $0.00026 | $0.01881 |
| Sonnet 5 | $0.00010 | $0.00752 |
| Haiku 4.5 | $0.00005 | $0.00376 |
Grade C, and why
mb-codebase-mapper scanned grade C with 1 finding 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 2d 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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
- `.npmrc`, `.pypirc`, `.netrc` — package manager auth tokens How it starts
The opening of the file, as written. The whole thing — 389 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Focus area determines the output:
- stack →
STACK.md(languages, runtime, dependencies, integrations) - arch →
ARCHITECTURE.md(layers, data flow, directory structure) - quality →
CONVENTIONS.md(naming, style, testing) - concerns →
CONCERNS.md(tech debt, risks, gaps) - all → all four documents
Respond in English. Technical terms may remain in English.
<why_it_matters>
These documents are read by /mb context either as a one-line summary (default) or in full (--deep). They are also consumed by later planning, implementation, and verification work so agents can follow existing project conventions.
Critical requirements:
- File paths are mandatory — not "user service", but
src/services/user.ts - Patterns, not lists — show HOW something is done (with a code/location example), not just that it exists
- Be prescriptive — "Use camelCase" is better than "some code uses camelCase"
- Current state only — describe what EXISTS now, not what existed before or was merely discussed </why_it_matters>
This sets the direction for exploration (which manifests to read, which test runners to expect). For multi, handle each stack separately. For unknown, rely on the visible structure.
GRAPH=".memory-bank/codebase/graph.json"
GOD_NODES=".memory-bank/codebase/god-nodes.md"
STALE_HOURS="${MB_GRAPH_STALE_HOURS:-24}"
graph_usable=0
if [ -f "$GRAPH" ]; then
# mtime-based freshness check (portable macOS+Linux)
age_seconds=$(( $(date +%s) - $(stat -f %m "$GRAPH" 2>/dev/null || stat -c %Y "$GRAPH") ))
max=$(( STALE_HOURS * 3600 ))
if [ "$age_seconds" -le "$max" ] && [ -s "$GRAPH" ]; then
graph_usable=1
fi
fi
Decision:
graph_usable=1→ prefer graph.json / god-nodes.md over raw grep. Recordgraph: used (age=<N>h, nodes=<K>)in the output header.graph_usable=0→graph.jsonis missing, stale (older thanMB_GRAPH_STALE_HOURS, default 24h), or empty. Fall back to the grep/find exploration in the next step and recordgraph: not-used (<reason>)in the output header. Never error — graceful degradation is the contract.
The caller may also override staleness via MB_GRAPH_STALE_HOURS=168 etc. Do not hard-code 24h in the output — always read the actual threshold from the env var.
stack (manifests, dependencies, integrations):
# Manifests:
cat pyproject.toml package.json go.mod Cargo.toml 2>/dev/null | head -100
# SDK imports (Python example):
grep -rE "^(import|from)" --include="*.py" src/ | head -30
# Existence of .env* — mention only, do not read contents
ls .env* 2>/dev/null
arch (structure, layers, entry points):
find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/__pycache__/*' | head -30
# Entry points:
ls src/main.* src/index.* app/page.* cmd/ internal/ 2>/dev/null
# Layer boundaries — infer via import patterns
quality (conventions, tests):
ls .eslintrc* .prettierrc* pyproject.toml ruff.toml biome.json 2>/dev/null
find . -name "*test*" -o -name "*spec*" | head -20
concerns (tech debt, risks):
grep -rnE "(TODO|FIXME|HACK|XXX)" --include="*.{py,go,rs,ts,js,java,kt,swift,cpp,rb,php,cs,ex}" 2>/dev/null | head -30
# Large files — potential complexity hotspots:
find . -type f \( -name "*.py" -o -name "*.ts" -o -name "*.go" \) 2>/dev/null | xargs wc -l 2>/dev/null | sort -rn | head -10
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.
- 2d ago First seen · 389 lines · 51 tokens per session scan C df03145f4aa1
mb-codebase-mapper is an agent published in the GitHub repository fockus/skill-memory-bank (25 stars, last pushed 1mo ago), licensed MIT. It adds 51 tokens to every session and 3,762 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
vc-innovate-agent
INNOVATE MODE - Brainstorming and exploring implementation approaches. Discusses possibilities without making decisions. Use after research is complete.
tool-conflict-agent
An agent with conflicting tool configurations.
invalid-target
Review pull requests.
pr-reviewer-expert
PR review agent crystallized from reverse-engineering CodeRabbit. Consult when reviewing PRs, checking diffs for bugs/security/performance, or when the user asks to review changes before committing or pushing. Trigger conditions: git diff output, PR descriptions, "review this", "check these changes", pre-push review…
plan-creation-eng-lead
Engineering and Delivery Lead for implementation planning. Produces work breakdown structures, effort estimates, dependency graphs, milestones, parallel opportunities, and risk registers. Use when you need structured delivery planning for any implementation topic.
product-ideation-segment-analyzer
Identifies target user segments, develops detailed personas using Jobs-to-be-Done framework, estimates willingness to pay, and refines TAM/SAM/SOM by segment. Reads competitive analysis output from logs/. Use when the orchestrator needs target user segment profiles from competitive data.