agentleFS
shalombshalomb/agent-skills/skills/codemap/SKILL.md

codemap

Skill3 starsChanged 3 months agoMITView on GitHub

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.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use clonedeps, deepwork and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • hbollonSkill

    clonedeps

    Clone important project dependency source code into an ignored local workspace so OpenCode can inspect library internals. Use when the user asks to clone dependencies, inspect dependency/source internals, understand SDK/framework behavior from source, debug library implementation details, or make core dependency repos locally readable. Do not use for ordinary API/docs questions where @librarian is enough.

    Also in 4 projects that use this

  • hbollonSkill

    deepwork

    Orchestrator-only workflow for heavy coding sessions, multi-phase implementation, and risky refactors. Use for complex work that needs planning, review gates, and persistent progress tracking.

    Also in 3 projects that use this

  • Hugging FaceSkill

    simplify

    Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.

    Also in 4 projects that use this

  • Microsoft AzureSkill

    reflect

    Learning capture system that extracts HIGH/MED/LOW confidence patterns from conversations to prevent repeating mistakes. Use after user corrections ("no", "wrong"), praise ("perfect", "exactly"), or when discovering edge cases. Complements .squad/agents/{agent}/history.md and .squad/decisions.md.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before deeper analysis in a new repo:

    line 28
  2. Very specific:

    Run codemap . — if output is noisy or config is missing, run codemap skill show config-setup first

    line 29
  3. Very specific:

    Run codemap --deps . — dependency graph and hub files

    line 30

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Codemap

Gives instant architectural context: project tree, dependency flow, hub detection, diff, intent classification, and multi-agent handoff.

Commands

codemap .                       # Project tree with file counts and top files
codemap --deps .                # Dependency flow + hub files (requires ast-grep)
codemap --diff                  # Changes vs main branch
codemap --diff --ref <branch>   # Changes vs specific branch
codemap --importers <file>      # Who imports this file? Is it a hub?
codemap handoff .               # Build + save cross-agent handoff artifact
codemap handoff --latest .      # Read latest saved handoff
codemap skill list              # Show available skills
codemap skill show <name>       # Load full skill instructions
codemap config show             # Show current project config
codemap context --compact       # Minimal JSON context envelope

First-Use Setup

Before deeper analysis in a new repo:

  1. Run codemap . — if output is noisy or config is missing, run codemap skill show config-setup first
  2. Run codemap --deps . — dependency graph and hub files
  3. Config is repo memory: once tuned, all future calls benefit automatically

When to use

SituationCommand
Starting any taskcodemap .
"Where is X?" / "What uses Y?"codemap --deps .
About to edit a filecodemap --importers <file>
"What changed?" / before committingcodemap --diff
Switching agents / resuming workcodemap handoff .
Config missing or output noisycodemap skill show config-setup
Risk warning in hook outputcodemap 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

SkillWhen to load
config-setupConfig missing, boilerplate, or output noisy
hub-safetyEditing a file with 3+ importers
exploreUnderstanding how code works
handoffSwitching between agents

Reference

For MCP tools and HTTP API endpoints, load references/codemap-api.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.