| name | codemap |
| description | Analyze codebase structure, dependencies, changes, and multi-agent handoffs using codemap. Use this skill as the primary entry point when a task requires understanding project architecture, mapping dependencies, tracing logic, or generating cross-agent handoff artifacts. Always trigger this first when exploring unfamiliar code or when codemap output indicates noisy configurations. |
Codemap
Gives instant architectural context: project tree, dependency flow, hub detection, diff, intent classification, and multi-agent handoff.
Commands
codemap .
codemap --deps .
codemap --diff
codemap --diff --ref <branch>
codemap --importers <file>
codemap handoff .
codemap handoff --latest .
codemap skill list
codemap skill show <name>
codemap config show
codemap context --compact
First-Use Setup
Before deeper analysis in a new repo:
- Run
codemap . — if output is noisy or config is missing, run codemap skill show config-setup first
- Run
codemap --deps . — dependency graph and hub files
- Config is repo memory: once tuned, all future calls benefit automatically
When to use
| Situation | Command |
|---|
| Starting any task | codemap . |
| "Where is X?" / "What uses Y?" | codemap --deps . |
| About to edit a file | codemap --importers <file> |
| "What changed?" / before committing | codemap --diff |
| Switching agents / resuming work | codemap handoff . |
| Config missing or output noisy | codemap skill show config-setup |
| Risk warning in hook output | codemap skill show <matched-skill> |
Hook output
The prompt-submit hook fires on every message and emits:
<!-- codemap:intent {"category":"refactor","risk":"high",...} -->
<!-- codemap:skills [{"name":"hub-safety","score":5},...] -->
Skills matched: hub-safety, explore — run `codemap skill show <name>` for guidance
Skills are pull-based — names are surfaced automatically, full body loaded only when needed.
Builtin skills
| Skill | When to load |
|---|
config-setup | Config missing, boilerplate, or output noisy |
hub-safety | Editing a file with 3+ importers |
explore | Understanding how code works |
handoff | Switching between agents |
Reference
For MCP tools and HTTP API endpoints, load references/codemap-api.md.