Agent skill

df:map-codebase

Analyze codebase with parallel mapper agents to produce .planning/codebase/ documents and CLAUDE.md. Use when the user wants to understand, analyze, or map an existing codebase. Triggers on: "understand this codebase", "map the code", "analyze architecture", "what does this codebase look like?", "explore the code structure"

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/df-map-codebase

SKILL.md

Each mapper agent explores a focus area and writes documents directly to .planning/codebase/. The orchestrator only receives confirmations, then reads the 8 docs to generate CLAUDE.md with coding rules that Claude Code auto-loads every session.

Output: .planning/codebase/ folder with 8 structured documents + CLAUDE.md at project root.

<execution_context> @~/.claude/devflow/workflows/map-codebase.md </execution_context>

Load project state if exists: Check for .planning/STATE.md - loads context if project already initialized

This command can run:

  • Before /df:new-project (brownfield codebases) - creates codebase map first
  • After /df:new-project (greenfield codebases) - updates codebase map as code evolves
  • Anytime to refresh codebase understanding

<when_to_use> Use map-codebase for:

  • Brownfield projects before initialization (understand existing code first)
  • Refreshing codebase map after significant changes
  • Onboarding to an unfamiliar codebase
  • Before major refactoring (understand current state)
  • When STATE.md references outdated codebase info

Skip map-codebase for:

  • Greenfield projects with no code yet (nothing to map)
  • Trivial codebases (<5 files) </when_to_use>

<success_criteria>

  • .planning/codebase/ directory created
  • All 8 codebase documents written by mapper agents
  • Documents follow template structure
  • Parallel agents completed without errors
  • CLAUDE.md generated at project root with prescriptive coding rules
  • CLAUDE.md uses markers (preserves user content on re-run)
  • User knows next steps </success_criteria>

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results