スキル一覧に戻る
philoserf

map-codebase

by philoserf

Comprehensive Claude Code configuration with agents, skills, hooks, and automation

4🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: map-codebase description: Analyze codebase with parallel Explore agents to produce .planning/codebase/ documents. Use for brownfield project onboarding, refreshing codebase understanding after significant changes, before major refactoring, or when onboarding to unfamiliar codebases. Creates structured documentation of stack, architecture, structure, conventions, testing, integrations, and concerns. allowed-tools:

  • Read
  • Write
  • Glob
  • Grep
  • Bash
  • Task

model: inherit


Reference Files

Workflow & Process:

Core Templates (always use):

Optional Templates (use as applicable):


Map Codebase

Analyzes existing codebases using parallel Explore agents to produce structured documentation in .planning/codebase/.

Objective

Spawns multiple Explore agents to analyze different aspects of the codebase in parallel, each with fresh context. Results are structured documents in .planning/ that provide a comprehensive map of the codebase state.

Core Output (always generated):

  • STACK.md — Languages, frameworks, key dependencies
  • ARCHITECTURE.md — System design, patterns, data flow
  • STRUCTURE.md — Directory layout, module organization
  • CONVENTIONS.md — Code style, naming, patterns

Optional Output (generate as applicable):

  • TESTING.md — Test structure, coverage, practices (if tests exist)
  • INTEGRATIONS.md — APIs, databases, external services (if external dependencies exist)
  • CONCERNS.md — Technical debt, risks, issues (for complex/brownfield projects)

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 thoroughly
  • When STATE.md references outdated codebase info — refresh understanding

Skip map-codebase for:

  • Greenfield projects with no code yet — nothing to map
  • Trivial codebases (<5 files) — not worth the overhead

Process

Step 1: Check Existing Documents

Check if codebase documents already exist in .planning/:

  • If yes: Offer to refresh (overwrite) or skip
  • If no: Proceed with creation

Step 2: Determine Template Set

Ask user which optional templates to generate (or use defaults):

  • Always: STACK.md, ARCHITECTURE.md, STRUCTURE.md, CONVENTIONS.md
  • Optional: TESTING.md (if tests exist), INTEGRATIONS.md (if external services), CONCERNS.md (if complex project)

Step 3: Load Project Context

Check for .planning/STATE.md to load existing project context if available. Helps agents understand project-specific terminology and patterns.

Step 4: Process Focus Area Argument

If user provided a focus area (e.g., "api" or "auth"), instruct agents to pay special attention to that subsystem while still providing holistic analysis.

Step 5: Spawn Parallel Explore Agents

Launch 4 Explore agents in parallel, each with "very thorough" exploration level:

Agent 1: Technology Stack & Integrations

  • Focus: Languages, frameworks, dependencies, external services
  • Outputs: Data for STACK.md and INTEGRATIONS.md

Agent 2: Architecture & Structure

  • Focus: System design, patterns, directory organization
  • Outputs: Data for ARCHITECTURE.md and STRUCTURE.md

Agent 3: Conventions & Testing

  • Focus: Code style, naming patterns, test infrastructure
  • Outputs: Data for CONVENTIONS.md and TESTING.md

Agent 4: Concerns & Technical Debt

  • Focus: Issues, risks, technical debt, potential improvements
  • Outputs: Data for CONCERNS.md

Step 5: Collect Agent Findings

Wait for all agents to complete. Collect and organize findings by document type.

Step 6: Write Core Documents

Write 4 core markdown documents in .planning/:

STACK.md: Languages, versions, frameworks, build tools, key dependencies
ARCHITECTURE.md: System design, patterns, component relationships, data flow
STRUCTURE.md: Directory layout, modules, naming patterns, organization
CONVENTIONS.md: Code style, naming conventions, patterns, documentation

Step 7: Write Optional Documents (if selected)

Generate only selected optional documents:

TESTING.md (if applicable): Test frameworks, structure, coverage, practices
INTEGRATIONS.md (if applicable): External APIs, databases, third-party services, config
CONCERNS.md (if applicable): Tech debt, issues, security, performance, improvements

Step 8: Provide Next Steps

Inform user codebase mapping is complete:

  • Review generated documents in .planning/
  • Use findings to inform refactoring or development
  • Update STATE.md with new insights if needed

Success Criteria

  • 4 core documents created in .planning/ (STACK, ARCHITECTURE, STRUCTURE, CONVENTIONS)
  • Optional documents created based on user selection
  • All documents have substantive, actionable content
  • Documents follow template structure
  • Parallel agents completed without errors
  • User informed of completion and next steps

Integration Notes

Command Integration:

  • Invoked via /map-codebase [optional: focus-area] command
  • Focus area argument is passed to agents for targeted analysis

Project Lifecycle:

  • Can run before initial project setup on brownfield codebases
  • Can run after initial project setup to refresh as code evolves
  • Can run anytime to refresh codebase understanding

スコア

総合スコア

65/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です