map-codebase
Skill288 starsChanged 5 days agoMITView on GitHub
Derives the tech-stack doc from scratch by scanning the codebase — analyzes stack, architecture, and gray areas (error handling, API shapes) and persists findings into specs/tech-architecture/tech-stack.md. Run when the tech doc doesn't exist yet; use survey-context to consume it once it does.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- buildomator/buildomatortheir own version, first seen Nov 4, 2026
- Steelwool9925/claude-skillstheir own version, first seen Oct 11, 2026
- AliOsm/skillstheir own version, first seen Aug 19, 2026
- julienlegoux/skillstheir own version, first seen Aug 8, 2026
- YehudaFrankel/clankbraintheir own version, first seen Apr 16, 2026
- gclm/super-stacktheir own version, first seen Mar 29, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- buildomator/buildomator★ 102same name
- YehudaFrankel/clankbrain★ 16same name
- julienlegoux/skills★ 4same name
- AliOsm/skills★ 1same name
- gclm/super-stack★ 0same name
- Steelwool9925/claude-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 repository162 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- website/AGENTS.mdAGENTS.md
- .cursor/rules/align-grid.mdcCursor rule
- .cursor/rules/assess-impact.mdcCursor rule
- .cursor/rules/audit-code.mdcCursor rule
- .cursor/rules/audit-plan.mdcCursor rule
- .cursor/rules/build-epic.mdcCursor rule
- .cursor/rules/change-request.mdcCursor rule
- .cursor/rules/commit-message.mdcCursor rule
- .cursor/rules/compose-workflow.mdcCursor rule
- .cursor/rules/craft-skill.mdcCursor rule
- .cursor/rules/deepen-architecture.mdcCursor rule
- .cursor/rules/define-language.mdcCursor rule
- .cursor/rules/define-success.mdcCursor rule
- .cursor/rules/delegate-task.mdcCursor rule
- .cursor/rules/deploy.mdcCursor rule
- .cursor/rules/design-interface.mdcCursor rule
- .cursor/rules/develop-tdd.mdcCursor rule
- .cursor/rules/diagnose-root.mdcCursor rule
- .cursor/rules/diagnose-stall.mdcCursor rule
- .cursor/rules/dispatch-agents.mdcCursor rule
- .cursor/rules/edit-document.mdcCursor rule
- .cursor/rules/elaborate-spec.mdcCursor rule
- .cursor/rules/enforce-first.mdcCursor rule
- .cursor/rules/evolve-skill.mdcCursor rule
- .cursor/rules/execute-plan.mdcCursor rule
- .cursor/rules/extract-design.mdcCursor rule
- .cursor/rules/find-way.mdcCursor rule
- .cursor/rules/fix-bug.mdcCursor rule
- .cursor/rules/gate-trace.mdcCursor rule
- .cursor/rules/generate-allure-report.mdcCursor rule
- .cursor/rules/grill-me.mdcCursor rule
- .cursor/rules/grill-with-docs.mdcCursor rule
- .cursor/rules/guard-git.mdcCursor rule
- .cursor/rules/harden-vps.mdcCursor rule
- .cursor/rules/hook-commits.mdcCursor rule
- .cursor/rules/inspect-quality.mdcCursor rule
- .cursor/rules/investigate-bug.mdcCursor rule
- .cursor/rules/kickoff-branch.mdcCursor rule
- .cursor/rules/maintain-wiki.mdcCursor rule
- .cursor/rules/map-codebase.mdcCursor rule
- .cursor/rules/migrate-spec.mdcCursor rule
- .cursor/rules/model-domain.mdcCursor rule
- .cursor/rules/orchestrate-project.mdcCursor rule
- .cursor/rules/organize-workspace.mdcCursor rule
- .cursor/rules/plan-refactor.mdcCursor rule
- .cursor/rules/plan-release.mdcCursor rule
- .cursor/rules/plan-tests.mdcCursor rule
- .cursor/rules/plan-work.mdcCursor rule
- .cursor/rules/publish-package.mdcCursor rule
- .cursor/rules/quick-fix.mdcCursor rule
- .cursor/rules/release-branch.mdcCursor rule
- .cursor/rules/request-review.mdcCursor rule
- .cursor/rules/research-first.mdcCursor rule
- .cursor/rules/reset-baseline.mdcCursor rule
- .cursor/rules/respond-review.mdcCursor rule
- .cursor/rules/run-benchmark.mdcCursor rule
- .cursor/rules/run-evals.mdcCursor rule
- .cursor/rules/run-planning.mdcCursor rule
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Look for established patterns (e.g., hexagonal, layered, feature-folders).
- Distinctive: line 30
Search for patterns and anti-patterns in these categories:
- Distinctive: line 38
Look for signals that will influence upcoming plans:
- Distinctive: line 69
When first joining a project.
- Distinctive: line 70
Before a major refactor or architectural change.
- Very specific: line 71
When survey-context reveals a lack of domain knowledge.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Map Codebase
Perform a deep architectural and structural analysis of the codebase. Unlike survey-context which identifies "where we are", map-codebase identifies "what we are dealing with" and "how things are done".
Use this vs survey-context:
map-codebaseBUILDS the tech-stack doc by scanning the codebase from scratch.survey-contextREADS existing specs/tech-architecture docs without re-deriving them. Runmap-codebasewhenspecs/tech-architecture/tech-stack.mddoesn't exist yet; runsurvey-contextwhen it does.
HARD GATE — Cold analysis only. Do NOT assume architectural patterns without reading the code. If the codebase structure surprises you, call out the delta.
Process
1. Identify Core Stack & Dependencies
- Scan
package.json,Cargo.toml,requirements.txt, etc. - Identify primary framework, runtime, and critical libraries (ORM, Auth, State, UI).
- Note version constraints and any deprecated or unusual dependencies.
2. Map High-Level Architecture
- Identify the entry points (CLI, Web, API).
- Map the primary data flow (e.g., Controller → Service → Repository).
- Identify where business logic lives vs. where I/O lives.
- Look for established patterns (e.g., hexagonal, layered, feature-folders).
3. Analyze "Gray Areas" (The "How")
Search for patterns and anti-patterns in these categories:
- Error Handling: Are exceptions caught early or bubbled? Is there a global error handler? Are error messages structured?
- API Shapes: Is it REST, GraphQL, or RPC? What is the casing (camelCase, snake_case)? How are responses structured?
- Type Safety: Is it strictly typed? Are there many
anyorunsafeblocks? Are interfaces used for DIP? - Observability: Is there structured logging? Are there health checks? Where do logs go?
- Testing: What is the test coverage strategy? Are mocks used? Where do tests live?
4. Identify Planning "Signals"
Look for signals that will influence upcoming plans:
- Consistency Gaps: "Half the project uses async/await, the other half uses Promises."
- Debt Hotspots: "The
AuthManageris 1500 lines and handles both JWT and session logic." - Integration Points: "We need to talk to the Stripe API, but there's no wrapper yet."
- Conventions: "The team always uses functional components over classes."
5. Persist to specs/tech-architecture/tech-stack.md
Compile all findings into specs/tech-architecture/tech-stack.md. This file serves as the project's "Long-Term Memory".
# Project Context
## Stack
- [Framework/Language]
- [Key Libraries]
## Architecture
- [Pattern Description]
- [Data Flow]
## Conventions (Observed)
- [Error Handling Pattern]
- [API Design]
- [Type System]
## Signals / Active Considerations
- [Gap 1]
- [Hotspot 2]When to Use
- When first joining a project.
- Before a major refactor or architectural change.
- When
survey-contextreveals a lack of domain knowledge. - To refresh
specs/tech-architecture/tech-stack.mdafter significant changes.
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.

