acquire-codebase-knowledge
Skill2 starsChanged 41 days agoMITView on GitHub
Maps an unfamiliar codebase into seven evidence-backed documents (stack, structure, architecture, conventions, integrations, testing, concerns) instead of a single freeform summary. Use when asked to map, document, or onboard into an existing codebase — "map this codebase," "document this architecture," "onboard me to this repo." Not for routine feature implementation, bug fixes, or narrow edits unless repository-level discovery is explicitly requested.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- AgnesAI-Labs/agnet-skills-cntheir own version, first seen Nov 1, 2026
- github/awesome-copilottheir own version, first seen Oct 25, 2026
- sb-dev/narrative-production-skillstheir own version, first seen Oct 20, 2026
- patterson-agents/skillstheir own version, first seen Aug 12, 2026
- ReaperOAK/ForgeOStheir own version, first seen Jun 8, 2026
- 5kuper/ai-docs-kittheir own version, first seen May 25, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- github/awesome-copilot★ 41ksame name
- sb-dev/narrative-production-skills★ 2same name
- AgnesAI-Labs/agnet-skills-cn★ 1same name
- 5kuper/ai-docs-kit★ 0same name
- arcobaleno64/council-forge★ 0same name
- patterson-agents/skills★ 0same name
- ReaperOAK/ForgeOS★ 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 repository191 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- skills/postgres-best-practices/AGENTS.mdAGENTS.md
- skills/react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibility-compliance-accessibility-auditSkill
- advanced-evaluationSkill
- agent-evaluationSkill
- alexSkill
- ariaSkill
- depSkill
- lunaSkill
- masonSkill
- maxSkill
- quinnSkill
- rexSkill
- agent-squadSkill
- ai-agent-developmentSkill
- ai-agents-architectSkill
- ai-engineering-toolkitSkill
- api-and-interface-designSkill
- api-design-principlesSkill
- api-documentation-generatorSkill
- api-documentationSkill
- api-documenterSkill
- api-endpoint-builderSkill
- api-fuzzing-bug-bountySkill
- api-patternsSkill
- api-security-testingSkill
- api-testing-observability-api-mockSkill
- application-performance-performance-optimizationSkill
- architecture-decision-recordsSkill
- architecture-patternsSkill
- async-python-patternsSkill
- attack-tree-constructionSkill
- autonomous-agent-patternsSkill
- aws-cost-optimizerSkill
- aws-serverlessSkill
- awt-e2e-testingSkill
- azure-functionsSkill
- backend-architectSkill
- backend-dev-guidelinesSkill
- backend-security-coderSkill
- brainstormingSkill
- breakdown-feature-implementationSkill
- breakdown-feature-prdSkill
- broken-authenticationSkill
- browser-testing-with-devtoolsSkill
- ci-cd-and-automationSkill
- clean-codeSkill
- cloud-architectSkill
- cloud-devopsSkill
- cloudformation-best-practicesSkill
- code-refactoring-refactor-cleanSkill
- code-refactoring-tech-debtSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- comprehensive-review-full-reviewSkill
- comprehensive-review-pr-enhanceSkill
- container-security-hardeningSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
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 17
NOT for a routine feature implementation, bug fix, or narrow edit — read only what that task needs.
- Very specific: line 37
Check every document against the checklist in references/codebase-knowledge-templates.md: no empty required section, no unsupported claim, …
“Common” is measured: kept by at least 6 in 10 of the 7 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
Acquire Codebase Knowledge
Overview
"Get familiar with this codebase" usually produces a shallow, unstructured summary that misses exactly the things a newcomer needs and can't be checked against anything. This skill instead produces seven fixed documents, each scoped to one question a new contributor actually asks, with every claim traced back to a file, config value, or command output. What can't be determined gets marked [TODO]; what depends on team intent rather than the code gets marked [ASK USER] — the summary is honest about what it doesn't know instead of quietly guessing.
When to Use
- Asked to map, document, or produce onboarding material for an existing codebase
- Starting substantial work in a codebase with no existing architecture documentation
- A codebase's documentation is stale or missing and repository-level discovery is explicitly wanted
- NOT for a routine feature implementation, bug fix, or narrow edit — read only what that task needs; running this full process for a one-line change is disproportionate
Process
1. Read intent before code
Search for and read README, PRD, TRD, ROADMAP, SPEC, and DESIGN documents first, and summarize what the project claims about itself before reading a line of source. This summary becomes the thing you check the code against in every later step — a README that turns out to describe a different architecture than what's actually there is itself a finding, not a fact to repeat.
2. Investigate each of the seven areas
Work through STACK, STRUCTURE, ARCHITECTURE, CONVENTIONS, INTEGRATIONS, TESTING, and CONCERNS in that order — later documents build on facts established in earlier ones (you can't state INTEGRATIONS accurately without STACK's dependency list already in hand). See references/codebase-knowledge-templates.md for what each document must cover, the investigation order and evidence sources for each, and the gotchas that produce false claims if skipped (monorepos, stale READMEs, path aliases, generated output, dev-vs-runtime dependencies).
If the user names a focus area ("architecture only," "testing and concerns"), still read intent documents in full first, then fully complete the named area(s) before doing a lighter pass on the rest — every document still needs its required sections present, with unknowns marked [TODO] rather than left blank.
3. Populate the seven documents
Write STACK.md, STRUCTURE.md, ARCHITECTURE.md, CONVENTIONS.md, INTEGRATIONS.md, TESTING.md, and CONCERNS.md to codebase/ under the project's external output location (see references/external-output-paths.md) — outside the project's own repo, never a path git in this project tracks or ignores. Every non-trivial claim needs a short evidence pointer (a file path, a config key, a command's output) — a claim with no evidence pointer is a guess, not a documented fact. Mark anything undeterminable [TODO] and anything requiring team intent [ASK USER], per the convention in references/codebase-knowledge-templates.md.
4. Validate before presenting
Check every document against the checklist in references/codebase-knowledge-templates.md: no empty required section, no unsupported claim, every unknown properly marked. Fix and re-check until all seven pass — don't present a document with a gap and call it done.
5. Present findings and open questions
Summarize all seven documents, then list every [ASK USER] item as a numbered question, and separately call out any place where the intent documents from Step 1 diverged from what the code actually shows.
Common Rationalizations
| Rationalization | Reality |
| "The README already explains the architecture" | Cross-check it against the actual file structure before repeating it — READMEs describe intent, and intent drifts from reality. |
"I can infer the database from a variable name like dbUrl" | Check the manifest for the actual client library (pg, mongoose, prisma, ...) instead of pattern-matching a name. |
| "One clean summary is faster than seven documents" | The seven-document split is what makes each one answerable and checkable — a single freeform summary is exactly the shallow, unstructured output this skill exists to avoid. |
| "I'll fill in the gap with what's probably true" | That's exactly what [TODO] and [ASK USER] prevent. An unverified guess presented as fact is worse than an honest gap. |
| "This is a big repo, I'll skip the intent documents" | Skipping Step 1 removes the only thing later steps get checked against — do it first, even briefly. |
Red Flags
- A document with a claim that has no evidence pointer
- An unknown filled in with a plausible guess instead of marked
[TODO] - A team-intent question answered instead of marked
[ASK USER]and surfaced to the user - Directory conventions documented from
dist/,build/, or another generated output directory - A monorepo documented as if its root manifest were the whole stack
- Presenting the seven documents without running the Step 4 validation pass first
Verification
- All seven documents exist in
codebase/under the project's external output location (seereferences/external-output-paths.md) with every required section present - Every non-trivial claim carries an evidence pointer to a real file, config value, or command output
- Every undeterminable fact is marked
[TODO], not guessed - Every team-intent question is marked
[ASK USER]and listed in the final summary - Intent-vs-reality divergences from Step 1 are explicitly called out, not silently resolved in the code's favor
See Also
references/codebase-knowledge-templates.md— the seven document templates, investigation order, and gotchassource-driven-development— for verifying framework-specific patterns against official docs once you're implementing, rather than mapping the codebase as a wholecontext-engineering— for managing what stays in context during the implementation work this skill's output feeds into
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.

