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"
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>
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?