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/acaprino/daodan/map-codebasegit clone --depth 1 https://github.com/acaprino/daodanWhat 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.00089 | $0.02415 |
| Opus 5 | $0.00044 | $0.01208 |
| Sonnet 5 | $0.00018 | $0.00483 |
| Haiku 4.5 | $0.00009 | $0.00242 |
Grade A, and why
map-codebase 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 yesterday.
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 — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Map Codebase
Generate a human-readable guide for an unfamiliar codebase. Produces 10 narrative documents with inline Mermaid diagrams, organized for progressive learning.
Pre-flight
-
Determine target path: Use the argument if provided, otherwise use the current working directory.
-
Check for existing output:
ls .codebase-map/ 2>/dev/null- If
.codebase-map/exists with content, ask the user: "A codebase map already exists. Overwrite it? (y/n)" - If user declines, stop here
- If
-
Create output directories:
mkdir -p .codebase-map/_internal
Phase 1: Explore (sequential)
Spawn a single codebase-explorer agent:
Agent task:
Explore this project and write a context brief to
.codebase-map/_internal/context-brief.md. Follow your exploration strategy to understand what the project does, its tech stack, directory structure, key entry points, data model, and main workflows. Read actual code - do not guess from file names. Include file paths for every claim.
Verify: Check that .codebase-map/_internal/context-brief.md exists and is non-empty.
If the context brief is missing or empty, stop and report the error.
Phase 1.5: Confirm Project Profile (sequential)
The codebase-explorer wrote a ## Project Profile section as the first section of .codebase-map/_internal/context-brief.md. Surface it for a quick confirmation before the writers run.
- Read the
## Project Profilesection from.codebase-map/_internal/context-brief.md. - Present a compact summary to the user: project type and domain, primary audience, register, scope, and any items the explorer marked low-confidence.
- Ask the user to confirm or adjust (use AskUserQuestion). The default is the inferred profile; the user only corrects.
- If the user adjusts anything, overwrite the
## Project Profilesection incontext-brief.mdwith the corrected values, so the writers read the confirmed profile.
This is the only interactive checkpoint. Profiling itself is autonomous; this step is a light safety net, not a questionnaire. Keep it to one question.
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.
- yesterday First seen · 131 lines · 89 tokens per session scan A c510a8786e38
map-codebase is a command published in the GitHub repository acaprino/daodan (8 stars, last pushed 6d ago), licensed MIT. It adds 89 tokens to every session and 2,415 once invoked, about $0.0004 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
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.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.