Skip to content
Agentmart
Submit a tool

code-mapping

Creates and navigates hierarchical code maps (L0/L1/L2/L3) for AI agent and human orientation.

Skill by durandom

IndexedGPL-3.0★ 7
Write a review

Chalk Labs

Need help deploying code-mapping?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/durandom-code-mapping

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Creates and navigates hierarchical code maps (L0/L1/L2/L3) for AI agent and human orientation. Use when bootstrapping codebase understanding, creating navigation documentation, exploring architecture, or validating map integrity.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/code-mapping

What's inside

Skill name
code-mapping
Description
Creates and navigates hierarchical code maps (L0/L1/L2/L3) for AI agent and human orientation. Use when bootstrapping codebase understanding, creating navigation documentation, exploring architecture, or validating map integrity.
License
GPL-3.0
Instructions
132 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (24)

  • SKILL.md
  • domains.md · references/
  • l0-architecture.md · references/examples/
  • l1-domain.md · references/examples/
  • l2-module.md · references/examples/
  • readme.md · references/examples/
  • format-spec.md · references/
  • code_map.py · scripts/
  • __init__.py · scripts/generate/
  • differ.py · scripts/generate/
  • generator.py · scripts/generate/
  • models.py · scripts/generate/
  • parser.py · scripts/generate/
  • renderer.py · scripts/generate/
  • templates.py · scripts/generate/
  • ARCHITECTURE.md · scripts/generate/templates/
  • README.md · scripts/generate/templates/
  • domain.md · scripts/generate/templates/
  • module.md · scripts/generate/templates/
  • __init__.py · scripts/validate/
  • lsp_client.py · scripts/validate/
  • validate_map.py · scripts/validate/
  • create.md · workflows/
  • explore.md · workflows/

SKILL.md (first lines)

<essential_principles>

**Maps are hierarchical**: L0 (architecture) links to L1 (domains) which link to L2 (modules) which link to L3 (source code). Always start at L0 and drill down as needed.

**Anchors enable grep navigation**: Headings contain `[Lx:identifier]` markers. Find any section with `grep "\[L1:auth\]" docs/map/`.

**Size limits enforce abstraction**:

- L0: 500 lines max (system overview)
- L1: 300 lines max (domain docs)
- L2: 200 lines max (module docs)

If a doc exceeds its limit, split it into the next level down.

**Code is truth, map is derivative**: When code and map conflict, the code wins. Update the map to reflect reality.

**Bootstrap pattern**: Agents read README.md first, then ARCHITECTURE.md, then relevant domain docs based on task.

</essential_principles>

<auto_routing>

**Route based on user intent** (match first):

| User says | Action |
|-----------|--------|
| "explore", "read", "understand", "navigate", "find", "where is" | Read `workflows/explore.md`, then follow it |
| "create", "generate", "new", "build", "document", "map" | Read `workflows/create.md`, then follow it |
| "validate", "check", "verify", "lint" | Run: `uv run python scripts/code_map.py validate <map-dir>` (path relative to this SKILL.md) |

**If intent is ambiguous**, ask:
> What would you like to do?
>
> 1. **Explore** - Navigate existing map to understand codebase
> 2. **Create** - Generate a new code map
> 3. **Validate** - Check map integrity

</auto_routing>

<quick_reference>

**Directory structure**:

```
docs/map/
├── README.md           # Entry point + domains index
├── ARCHITECTURE.md     # L0: System overview
└── domains/            # L1: Domain docs
    ├── auth.md
    └── api.md
```

**Anchor format**: `## [L1:identifier] Heading Text`

**Code link format**: `` [`symbol`](path/to/file.py#L42) ``

**Cross-reference format**: `[Domain Name](domains/name.md)`

</quick_reference>

<reference_index>

**Domain Knowledge** (`references/`):

| Reference | Purpose |
|-----------|---------|
| format-spec.md | Format rules for anchors, links, and size limits |
| examples/ | Input/output examples (l0-architecture.md, l1-domain.md, l2-module.md, readme.md) |
| domains.md | What domain docs should capture |

</reference_index>

<cli>

## Running the Scripts

The scripts use Python 3.11+ stdlib only (no external dependencies).

Script paths are **relative to this SKILL.md file** (not the working directory).
Derive the absolute script path from this file's location:

- If this SKILL.md is at `/path/to/code-mapping/SKILL.md`
- Then the script is at `/path/to/code-mapping/scripts/code_map.py`

```bash
# Validate an existing map
uv run python scripts/code_map.py validate <map-dir>

# Generate map skeletons from source
uv run python scripts/code_map.py generate <src-dir> <map-dir>
```

**Generate command features:**

- Creates one `.md` file per source file (1:1 mapping)
- Uses `<!-- TODO: description -->` placeholders
- Preserves filled descriptions on subsequent runs
- Reports new sections, removed sections, and unfilled placeholders

</cli>

<workflows_index>

**Workflows** (`workflows/`):

| Workflow | Purpose | Status |
|----------|---------|--------|
| explore.md | Navigate existing map to understand codebase | Ready |
| create.md | Generate new map for a codebase | Ready |

**Scripts** (`scripts/`):

| Script | Purpose | Status |
|--------|---------|--------|
| code_map.py | CLI entry point (validate, generate) | Ready |
| generate/ | Map skeleton generation from source | Ready |
| validate/ | Map validation (links, sizes, symbols) | Ready |

</workflows_index>

From durandom/skills, GPL-3.0.

More from durandom/skills

Signals

Stars
7
Forks
3
Open issues
2
Last commit (this folder)
May 7, 2026 (5 months ago)
Last release
May 7, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
GPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from durandom

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get code-mapping running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying code-mapping?

CallGet help
Cite this page

code-mapping skill. Agent Mart. https://agentmart.dev/skills/durandom-code-mapping (last updated 2026-10-24)