codebase-overview
Skill1 starsChanged 5 months agoMITView on GitHub
Systematic codebase exploration and architecture mapping.
- Reads credentials
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 16 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
Before starting any exploration, read and follow any .claude/CLAUDE.md or CLAUDE.md in the repository root because project-specific …
- Distinctive: line 54
Check every file path against this list BEFORE reading because secrets leaked into exploration output are hard to retract and easy to miss.
- Distinctive: line 73
Start from the current working directory because that is the project the user is asking about.
- Very specific: line 87
Always detect project type before reading source files because framework context changes how you interpret code (e.g., a models/ directory …
- Very specific: line 108
Read any .claude/CLAUDE.md or CLAUDE.md in the repository root.
- Very specific: line 112
Use the DETECT Results template from references/examples-and-errors.md.
- Very specific: line 126
Use language-specific patterns from references/exploration-strategies.md.
- Very specific: line 154
Search for model, schema, and entity files.
- Distinctive: line 156
Document: entity relationships, primary data structures and their fields, database technology, migration strategy.
- Very specific: line 160
Search for route, handler, and controller files.
- Distinctive: line 162
Document: endpoint structure and URL patterns, HTTP methods and request/response formats, authentication and authorization patterns, API …
- Distinctive: line 171
Document: required environment variables and their purpose, external service dependencies (databases, APIs, caches, queues), feature flags …
- Distinctive: line 180
Document: testing framework, test organization (co-located vs separate directory), common patterns (fixtures, factories, mocks), coverage …
- Distinctive: line 192
Verify architectural claims against source files because READMEs may be outdated or incomplete.
- Distinctive: line 198
Document: core domain concepts, primary interfaces/abstractions, component communication (direct calls, events, queues).
- Distinctive: line 212
If not a git repository, note this limitation and skip this step.
- Very specific: line 222
Use the template in references/report-template.md.
- Distinctive: line 223
All file paths MUST be absolute
- Distinctive: line 224
All architectural claims MUST cite source files
- Very specific: line 225
All commands MUST come from actual config files (package.json, Makefile, etc.)
- Distinctive: line 253
Every entry MUST reference a real file that already exists.
- Distinctive: line 257
Before presenting results, scan all output for accidentally captured secrets:
- Very specific: line 264
If any matches are found: redact the matched lines (replace values with [REDACTED]), flag the finding, and note which file to review …
- Distinctive: line 270
Remove any temporary files created during exploration.
- Distinctive: line 278
When the user requests a full architectural analysis (e.g., "give me the full picture", "I'm new to this codebase", "we're considering a …
- Distinctive: line 280
Use parallel mapping when the exploration goal is broad and open-ended — full onboarding, major refactor preparation, or comprehensive …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codebase Overview Skill
Systematic 4-phase codebase exploration that produces an evidence-backed onboarding report. Phases run in strict order — DETECT, EXPLORE, MAP, SUMMARIZE — because later phases depend on context established by earlier ones. This skill accelerates reading the codebase but does not replace it.
Reference Loading Table
| Signal | Load These Files | Why |
| example-driven tasks, errors | examples-and-errors.md | Loads detailed guidance from examples-and-errors.md. |
| language-specific discovery commands per exploration phase | exploration-strategies.md | Loads detailed guidance from exploration-strategies.md. |
| writing the 12-section overview report | report-template.md | Loads detailed guidance from report-template.md. |
| statistical rule discovery, Go pattern analysis, cartographer scripts | statistical-three-lenses.md, statistical-metrics-catalog.md | Measure-first analysis lenses and 100-metric catalog (from demoted codebase-analyzer). |
| statistical analysis worked examples, phase banners, error catalog | statistical-phase-details.md, statistical-analysis-examples.md | Phase details and real-world analysis workflows (from demoted codebase-analyzer). |
Instructions
Execute all phases autonomously. Verify each gate before advancing. Consult references/exploration-strategies.md for language-specific discovery commands.
Before starting any exploration, read and follow any .claude/CLAUDE.md or CLAUDE.md in the repository root because project-specific instructions override default behavior.
This is a read-only skill — keep all project files unmodified because the goal is observation, not mutation. Likewise, leave application execution and test running to other skills because those are execution concerns outside this skill's scope. For deep domain analysis, route to a specialized agent instead.
See
references/examples-and-errors.mdfor worked examples and error handling procedures.
Sensitive-Files Guardrail
Check every file path against this list BEFORE reading because secrets leaked into exploration output are hard to retract and easy to miss. Skip silently without logging the file contents or path.
# Secrets and credentials
.env, .env.*, *.pem, *.key, credentials.json, secrets.*, *secret*, *credential*, *password*
# Authentication tokens
token.json, .npmrc, .pypirc
# Cloud provider credentials
.aws/credentials, .gcloud/, service-account*.jsonPhase 1: DETECT
Goal: Determine project type, language, framework, and tech stack.
Step 1: Examine root directory
Start from the current working directory because that is the project the user is asking about.
ls -laIdentify configuration files that indicate project type:
package.json-> Node.js/JavaScript/TypeScriptgo.mod-> Gopyproject.toml,requirements.txt,setup.py-> Pythonpom.xml,build.gradle-> JavaCargo.toml-> Rust- See
references/exploration-strategies.mdfor complete indicator table
Always detect project type before reading source files because framework context changes how you interpret code (e.g., a models/ directory means something different in Django vs. Express).
Step 2: Read primary configuration
Based on detected type, read the main config file. Preference order:
- Python:
pyproject.toml>setup.py>requirements.txt - Node.js:
package.json - Go:
go.mod
Extract: project name, dependencies, language version, build system, scripts/commands.
Step 3: Identify frameworks and tooling
ls -la manage.py next.config.js nuxt.config.js angular.json 2>/dev/null
ls -la Makefile Dockerfile docker-compose.yml 2>/dev/null
ls -la .github/workflows/ 2>/dev/nullStep 4: Check for CLAUDE.md
Read any .claude/CLAUDE.md or CLAUDE.md in the repository root. Follow its instructions throughout remaining phases.
Step 5: Document findings
Use the DETECT Results template from references/examples-and-errors.md.
Gate: Project type identified (language + framework). Tech stack documented. Build/run commands known. Proceed ONLY when gate passes — skipping this gate leads to wrong architectural assumptions downstream.
Phase 2: EXPLORE
Goal: Discover entry points, core modules, data models, API surfaces, configuration, and tests.
Explore only what is needed for the overview because speculative deep-dives waste tokens without proportional value. Limit to 20 files per category because representative samples are more useful than exhaustive coverage. If a category has more than 20 files, note the total count and state that you examined a representative sample.
On explicit user request, deep-dive into specific subsystems, generate architecture diagrams, include full file contents, export findings to a separate file, or analyze dependency vulnerability status. These are off by default because the standard overview does not require them.
Step 1: Find entry points
Use language-specific patterns from references/exploration-strategies.md. Read each entry point file to understand application bootstrapping.
For any language, look for:
mainfunctions or__main__modules- Server/app initialization files
- CLI entry points declared in config
Config files alone are not enough to understand a project because they show dependencies, not architecture — always read entry points and core modules too.
Step 2: Map directory structure
find . -type d \
-not -path '*/\.*' \
-not -path '*/node_modules/*' \
-not -path '*/venv/*' \
-not -path '*/vendor/*' \
-not -path '*/dist/*' \
-not -path '*/build/*' \
| head -50Exclude noise directories (node_modules/, venv/, vendor/, dist/, build/, __pycache__/) because they contain generated or third-party code that obscures the project's own structure.
Categorize directories by layer — see the Directory Layer Categorization table in references/examples-and-errors.md.
Step 3: Examine data layer
Search for model, schema, and entity files. Read 3-5 representative files. Use the Data Layer Findings template from references/examples-and-errors.md.
Document: entity relationships, primary data structures and their fields, database technology, migration strategy.
Step 4: Discover API surface
Search for route, handler, and controller files. Read 3-5 key API files. Use the API Surface Findings template from references/examples-and-errors.md.
Document: endpoint structure and URL patterns, HTTP methods and request/response formats, authentication and authorization patterns, API versioning strategy.
Step 5: Identify configuration
ls -la .env .env.example config.yaml config.json settings.py 2>/dev/null
ls -la config/*.yaml config/*.json config/*.toml 2>/dev/nullDocument: required environment variables and their purpose, external service dependencies (databases, APIs, caches, queues), feature flags or runtime options.
Step 6: Examine test structure
find . -name "*_test.*" -o -name "*.test.*" -o -name "*Test.*" -o -path "*/tests/*" \
2>/dev/null | head -20Document: testing framework, test organization (co-located vs separate directory), common patterns (fixtures, factories, mocks), coverage tooling.
Gate: Entry points identified. Core modules mapped. Data layer understood. API surface discovered. Configuration examined. Test structure documented. Proceed ONLY when gate passes.
Phase 3: MAP
Goal: Synthesize findings into architectural understanding.
Step 1: Identify design patterns
Based on examined files, identify and document with evidence. Every architectural claim must cite an examined file and path because uncited claims cannot be verified and mislead readers. Use the Design Patterns template from references/examples-and-errors.md.
Verify architectural claims against source files because READMEs may be outdated or incomplete.
Step 2: Map key abstractions
Identify the 5-10 most important types, classes, or modules. Use the Key Abstractions template from references/examples-and-errors.md.
Document: core domain concepts, primary interfaces/abstractions, component communication (direct calls, events, queues).
Step 3: Document data flow
Trace a typical request from entry point through the full stack. Use the Request Flow template from references/examples-and-errors.md. All file paths in output must be absolute because relative paths are ambiguous when the report is read outside the project directory.
Step 4: Analyze recent activity
git log --oneline --no-decorate -10Include recent commit themes (last 10 commits). Categorize: Feature development, Bug fixes, Refactoring, Infrastructure.
If not a git repository, note this limitation and skip this step.
Gate: Design patterns identified with file evidence. Key abstractions mapped (5-10 concepts). Data flow documented with absolute paths. Recent activity analyzed. Proceed ONLY when gate passes.
Phase 4: SUMMARIZE
Goal: Generate structured overview report.
Step 1: Generate report
Use the template in references/report-template.md. Fill every section with evidence from examined files. Requirements:
- All file paths MUST be absolute
- All architectural claims MUST cite source files
- All commands MUST come from actual config files (package.json, Makefile, etc.)
- Empty sections MUST note why information is unavailable
Report facts without self-congratulation — show evidence, not descriptions of how thorough the exploration was. Every claim must have file-backed evidence because "report looks complete" is not the same as "report is complete."
Step 2: Quality check
Before outputting, verify:
- All 13 template sections addressed
- No placeholder text remains
- Every claim backed by file evidence
- Paths are absolute, not relative
- Commands are real, not guessed
Adjust the 20-files-per-category limit if a specific area needs deeper sampling — some projects concentrate complexity in one layer. Note any such adjustments in the report.
Step 3: Generate "Where to Add New Code" section
Append a prescriptive section to the report. For each major code category discovered during exploration, provide the directory, a concrete example file to use as a template, and any naming conventions.
## Where to Add New Code
| I want to add... | Put it in... | Follow the pattern in... |
|-------------------|-------------|-------------------------|
| [category from exploration] | [directory path] | [concrete example file path] |Every entry MUST reference a real file that already exists. If a category has no clear home, note that explicitly rather than guessing.
Step 4: Post-exploration secret scan
Before presenting results, scan all output for accidentally captured secrets:
grep -iE '(password|secret|token|api[_-]?key|auth|credential)\s*[:=]' <output_file> || true
grep -E '(AIza|sk-|ghp_|gho_|AKIA|-----BEGIN)' <output_file> || trueIf any matches are found: redact the matched lines (replace values with [REDACTED]), flag the finding, and note which file to review manually.
Step 5: Output report
Display complete markdown report to stdout. Generate the report to stdout by default because most users need inline context, not a separate file. If export behavior is explicitly requested, also write to file.
Remove any temporary files created during exploration.
Gate: Report has all sections filled. All paths are absolute. All claims cite evidence. "Where to Add New Code" section populated with real file references. Secret scan passed (no unredacted secrets in output). Report is actionable for onboarding. Quality check passes. Total files examined count is accurate.
Parallel Domain-Specific Mapping (Deep Dive Mode)
When the user requests a full architectural analysis (e.g., "give me the full picture", "I'm new to this codebase", "we're considering a major refactor"), use parallel domain-specific agents instead of single-threaded sequential exploration.
Use parallel mapping when the exploration goal is broad and open-ended — full onboarding, major refactor preparation, or comprehensive architectural review. Use the standard 4-phase flow for targeted questions about a single subsystem.
Launch 4 parallel agents using Task, each focused on a specific domain. Each agent follows the sensitive-files guardrail and writes a structured document.
See
references/examples-and-errors.mdfor the agent domain table, orchestration rules, and the agent instructions template.
Post-Parallel Gate: At least 3 of 4 domain agents completed. All output files exist. Secret scan passed across all output files. Each file contains file-backed evidence (not generic descriptions).
References
Reference Files
${CLAUDE_SKILL_DIR}/references/report-template.md: Standard markdown report template with all sections${CLAUDE_SKILL_DIR}/references/exploration-strategies.md: Language-specific discovery commands and patterns${CLAUDE_SKILL_DIR}/references/examples-and-errors.md: Worked examples, error handling, parallel agent template and domain table${CLAUDE_SKILL_DIR}/references/statistical-three-lenses.md: Three statistical analysis lenses (Consistency, Signature, Idiom) for Go codebases${CLAUDE_SKILL_DIR}/references/statistical-metrics-catalog.md: 100-metric catalog across 25 categories for Go pattern analysis${CLAUDE_SKILL_DIR}/references/statistical-phase-details.md: Phase banners, reconciliation matrix, rule format for statistical analysis${CLAUDE_SKILL_DIR}/references/statistical-analysis-examples.md: Real-world statistical analysis examples and workflows${CLAUDE_SKILL_DIR}/scripts/cartographer_omni.py: Full 100-metric Go codebase statistical analyzer${CLAUDE_SKILL_DIR}/scripts/cartographer.py: Quick ~15-category Go pattern overview${CLAUDE_SKILL_DIR}/scripts/cartographer_ultimate.py: 6-category focused performance pattern detection
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- redhat-community-ai-tools/UnifAI★ 45same name
- erikediner/skills★ 1same name
- husnain067/codebase-knowledge-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- skills/book-to-skill/AGENTS.mdAGENTS.md
- skills/book-to-skill/CLAUDE.mdCLAUDE.md
- ai-paper-digestSkill
- battery-statusSkill
- book-to-skillSkill
- codebase-mapSkill
- codebase-summarySkill
- concept-wiki-htmlSkill
- frontend-designSkill
- gh-address-commentsSkill
- gh-fix-ciSkill
- githubSkill
- grounded-file-qaSkill
- imagegenSkill
- learn-codebaseSkill
- lecture-note-writerSkill
- ning-python-scientific-plottingSkill
- openai-docsSkill
- plugin-creatorSkill
- ponytail-auditSkill
- ponytail-debtSkill
- ponytail-gainSkill
- ponytail-helpSkill
- ponytail-reviewSkill
- ponytailSkill
- repo-quick-scanSkill
- review-agentSkill
- skill-creatorSkill
- skill-installerSkill
- use-code-wikiSkill
- yeetSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

