codemap
CLAUDE.md704 starsChanged 8 months agoMITView on GitHub
Run codemap from the git repository root. Hooks and context files resolve from the current working directory, so running from a subdirectory can break hook context. codemap expects these at repo root: - .git/ - .codemap/ - .claude/settings.local.json (project-local hooks) BEFORE starting any task, run codemap . first. Treat codemap as part of the execution loop, not as optional reference material: Use rg for exact string lookup after codemap has established structure or blast radius. ALWAYS run codemap --deps when:…
In this repository2 other files it gives its agents.
- codemapSkill
- config-setupSkill
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 0 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Run codemap from the git repository root.
- Very specific: line 27
Treat codemap as part of the execution loop, not as optional reference material:
- Very specific: line 29
Before the first real code exploration in a task: codemap .
- Very specific: line 30
Before editing any file: codemap --importers <file>
- Very specific: line 31
Before refactors, moves, or dependency-heavy changes: codemap --deps
- Very specific: line 32
Before summarizing, reviewing, or committing: codemap --diff
- Very specific: line 33
If a codemap hook prints Next codemap: or Run now:, do that before continuing
- Very specific: line 35
Use rg for exact string lookup after codemap has established structure or blast radius.
- Very specific: line 46
Use --ref <branch> when comparing against something other than main
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🛑 STOP — Run codemap before ANY task
Repo Root Requirement (Critical)
Run codemap from the git repository root. Hooks and context files resolve from the current working directory, so running from a subdirectory can break hook context.
cd "$(git rev-parse --show-toplevel)"codemap expects these at repo root:
.git/.codemap/.claude/settings.local.json(project-local hooks)
codemap . # Project structure
codemap --deps # How files connect
codemap --diff # What changed vs main
codemap --diff --ref <branch> # Changes vs specific branchRequired Usage
BEFORE starting any task, run codemap . first.
Treat codemap as part of the execution loop, not as optional reference material:
- Before the first real code exploration in a task:
codemap . - Before editing any file:
codemap --importers <file> - Before refactors, moves, or dependency-heavy changes:
codemap --deps - Before summarizing, reviewing, or committing:
codemap --diff - If a codemap hook prints
Next codemap:orRun now:, do that before continuing
Use rg for exact string lookup after codemap has established structure or blast radius.
ALWAYS run codemap --deps when:
- User asks how something works
- Refactoring or moving code
- Tracing imports or dependencies
ALWAYS run codemap --diff when:
- Reviewing or summarizing changes
- Before committing code
- User asks what changed
- Use
--ref <branch>when comparing against something other than main
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

