codebase-map

Maps unfamiliar codebases into functional clusters with parallel subagents and generates architecture documentation.

9|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/jerrylin96/dotgemini --skill codebase-map-jerrylin96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-map
Source: https://github.com/jerrylin96/dotgemini/tree/main/skills/codebase-map
Command: npx skills add https://github.com/jerrylin96/dotgemini --skill codebase-map-jerrylin96

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Onboarding onto an unfamiliar repository is slow and overwhelms a single context window. This Skill partitions a codebase into orthogonal functional clusters, detects entrypoints across languages, and dispatches parallel explorer subagents to produce a unified architecture map without context degradation. ## Core Features & Use Cases - Multi-Agent Cluster Mapping: Partitions repositories into domain clusters and dispatches parallel read-only explorer subagents that emit structured Domain Cards with line-number citations. - Polyglot Entrypoint Detection: Identifies CLI, web/API, worker, and executable entrypoints across Python, JavaScript/TypeScript, Go, and Rust, with a library/SDK fallback that extracts public package exports. - Intent-Guided Scoping: Accepts plain-English goals (e.g. "how session auth works") to filter files by keyword variants and expand one-hop internal imports before mapping. - Use Case: Before drafting a feature spec for Stripe webhooks, run an intent-scoped map to get a focused architecture document with Mermaid diagrams, dataflow traces, and a developer cookbook for the relevant subsystems. ## Quick Start Ask the agent to map a repository by running the codebase-map skill with a repo path or a plain-English goal such as "map how user authentication works in this project".

Frequently Asked Questions about codebase-map

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

FAQPage Schema
How do I generate an architecture map of an unfamiliar codebase?

Run the map_codebase.py script with the --repo flag pointing at the target repository. It partitions source files into functional clusters, detects entrypoints, and the orchestrator dispatches parallel subagents whose findings are synthesized into a codebase_map.md document.

How do I map only the part of a repo related to a specific feature?

Pass a plain-English goal via the --goal flag, such as "how session auth works". The engine filters files by keyword variants in paths and content, then expands one-hop internal imports to scope the relevant subsystem before clustering.

What programming languages does codebase entrypoint detection support?

Entrypoint detection covers Python (argparse, Click, Typer, FastAPI, Flask, Celery), JavaScript/TypeScript (Express, Next.js routes, npm bin), Go (main packages, HTTP routers), and Rust (fn main). Repositories without entrypoints fall back to library/SDK mode using package export files.

What happens when mapping a very small or empty repository?

If no source files are found, the engine exits cleanly with code 0 and an empty summary. If the repo has under 300 lines and at most 3 files, is_small_repo is set and the orchestrator maps it directly without dispatching subagents.

Why does map_codebase.py print a warning about codebase-audit utilities?

The script optionally imports shared clustering utilities from a sibling codebase-audit skill. If that import fails, it prints a warning and uses an embedded fallback clustering implementation with reduced semantics, so mapping still works.