legion:codebase-mapper

Detect codebase structure, dependencies, and entry points to generate CODEBASE.md.

72|8|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/9thLevelSoftware/legion --skill legion-codebase-mapper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: legion:codebase-mapper
Source: https://github.com/9thLevelSoftware/legion/tree/main/skills/codebase-mapper
Command: npx skills add https://github.com/9thLevelSoftware/legion --skill legion-codebase-mapper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Brownfield codebase analysis and mapping to CODEBASE.md, enabling teams to understand architecture, dependencies, entry points, and risk in one structured artifact.

Core Features & Use Cases

  • Architecture mapping, language distribution, entry-point detection, and monorepo support for scalable codebases.
  • Dependency and risk signals generation to inform planning and refactoring.
  • Standalone re-analysis and incremental updates to CODEBASE.md for ongoing governance.

Quick Start

Ask Legion to run a brownfield analysis on the current repository to produce CODEBASE.md.

Frequently Asked Questions about legion:codebase-mapper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map codebase architecture and dependencies into a structured document?

To map codebase architecture, you generate a structured CODEBASE.md file that documents structure, dependencies, and entry points. This process captures language distribution and risk signals for both greenfield and brownfield projects.

Can I analyze a monorepo with multiple languages like Node.js, Python, and Go?

Yes, you can analyze a monorepo containing Node.js, Python, Ruby, and Go. The codebase analysis detects language distribution and entry points across these various ecosystems within a single repository.

What is a CODEBASE.md specification and when do I need it?

A CODEBASE.md specification is a structured artifact documenting codebase architecture, dependencies, and risk signals. You need it for brownfield codebase analysis and ongoing governance to help teams understand project structure during planning and refactoring.

How do I perform incremental re-analysis on an existing repository?

You perform incremental re-analysis by running a standalone update on the current repository to refresh the CODEBASE.md. This process supports ongoing governance with safe fallbacks to ensure continuous architecture mapping.

Does codebase dependency analysis generate risk signals for refactoring?

Yes, codebase dependency analysis generates risk signals to inform planning and refactoring. By detecting dependencies and architecture structure, it highlights potential issues within both brownfield and greenfield codebases.