acquire-codebase-knowledge
What it does
This tool creates a set of documents explaining how a software project is organized, what technologies it uses, and how it works. It helps new people understand the code quickly.
When to use it
- βWhen you need to understand a code project you're unfamiliar with.
- βWhen onboarding a new team member to a development project.
- βTo document the structure and workings of an existing system.
Skill link
https://github.com/github/awesome-copilot/blob/main/skills/acquire-codebase-knowledge/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHelp me understand this code project by documenting its structure, technologies, and how it works.β
5 new skills a week. 1 minute to read.
acquire-codebase-knowledge: full guide
Joining an unfamiliar repository usually means weeks of reading files, asking colleagues and guessing. The README is often out of date, and nobody remembers why the code is laid out the way it is. This skill gives your agent a fixed routine for that first pass. It scans the project, reads any intent documents it finds (README, PRD, ROADMAP, SPEC, DESIGN), and writes seven documents into docs/codebase/ that you can read in one sitting.
It is for new hires, contractors, open source contributors and anyone who inherits a project. It also suits a team lead who has never written down how the system works. It is built for repository-level discovery, not for everyday edits. The skill asks to run only when you explicitly request mapping, onboarding or codebase docs, and it needs Python 3.8+ and git installed.
Use cases
Your first week on a legacy service
You join a team that owns a ten-year-old backend. Nobody wrote architecture notes. You ask the agent to map it. You get the stack, folder layout, test setup and a list of fragile files, taken from the code and recent git history.
A monorepo with several apps
The root package.json has no source code, only workspaces and an apps/ folder. The skill warns that each workspace can have its own dependencies and conventions, so it maps each sub-package separately instead of describing the whole repo as one project.
Checking the README against reality
Your README says the project follows a layered design, but you doubt it. The skill reads the stated intent first, then the actual files, and reports where they differ. You get a clear list of README claims the code does not support.
Step by step
- 1Install the skill by placing the folder in ~/.claude/skills/acquire-codebase-knowledge/ (or your project's .claude/skills/). Check that Python 3.8+ and git are available on your machine.
- 2Open your agent inside the root folder of the project you want to document. The scan script must run from the project root.
- 3Ask for a map of the codebase. Optionally name a focus area, such as "architecture only" or "testing and concerns".
- 4Let the agent run the scan and read your README, PRD or SPEC files. It then fills the seven files in docs/codebase/ using the bundled templates.
- 5Read the numbered [ASK USER] questions at the end, answer them, and review any places where the code differs from the stated intent.
Example
What to ask
βMap this codebase and document it. I am new to the team and need to know how it is built, how to run the tests, and which parts are risky. Focus on testing and concerns.β
What you get
The agent creates all seven files in docs/codebase/, with TESTING.md and CONCERNS.md filled in first. It lists the test framework and folders, flags the most recently changed files as fragile, and ends with numbered questions, such as which database is meant for production.
Tips
- βName a focus area if you are short on time. The skill still creates all seven files, but only the focus ones are complete. The rest keep required sections with [TODO] marks.
- βAnswer every [ASK USER] question. These are choices that only your team can make, such as the intended architecture, and the agent will not guess them.
- βDo not use it for bug fixes or small edits. It is built for whole-repository discovery and does not run for routine tasks unless you ask.
- βTreat the output as a snapshot. Run it again after major refactors, because the files will not update themselves.
Alternatives
- understand-onboard
Pick this when you want a short welcome guide for a new team member, instead of seven reference documents about the code.
- code-documentation
Pick this when you need a README, API reference or changelog written from the code, not a full discovery pass.
- architecture-decision-records
Pick this when you want to record why a design decision was made, which a scan of existing code cannot show.
Questions and answers
Where do the generated files end up, and can I commit them?
They are written to docs/codebase/ in your project. The scan also leaves a .codebase-scan.txt file there. Committing the seven documents is fine. Review the scan output first and decide whether to keep it.
Does it work on a monorepo or a project with several languages?
The skill supports manifest detection for 25+ languages. For monorepos it checks for workspaces, packages/ or apps/ folders and maps each sub-package separately, because each may have its own dependencies and conventions.
Will it describe the build output folders like dist/ or build/?
No. It treats dist/, build/, generated/, .next/, out/ and __pycache__/ as artefacts and documents only conventions from source files. It also separates TODOs in test folders from real production debt in CONCERNS.md.
How it works
The tool analyzes project files and runs commands to gather information. It then fills out seven types of documents based on what it finds, marking anything it can't figure out.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Acquire Codebase Knowledge
Produces seven populated documents in docs/codebase/ covering everything needed to work effectively on the project. Only document what is verifiable from files or terminal output β never infer or assume.
Output Contract (Required)
Before finishing, all of the following must be true:
- Exactly these files exist in
docs/codebase/:STACK.md,STRUCTURE.md,ARCHITECTURE.md,CONVENTIONS.md,INTEGRATIONS.md,TESTING.md,CONCERNS.md. - Every claim is traceable to source files, config, or terminal output.
- Unknowns are marked as
[TODO]; intent-dependent decisions are marked[ASK USER]. - Every document includes a short "evidence" list with concrete file paths.
- Final response includes numbered
[ASK USER]questions and intent-vs-reality divergences.
Workflow
Copy and track this checklist:
- [ ] Phase 1: Run scan, read intent documents
- [ ] Phase 2: Investigate each documentation area
- [ ] Phase 3: Populate all seven docs in docs/codebase/
- [ ] Phase 4: Validate docs, present findings, resolve all [ASK USER] items
Focus Area Mode
If the user supplies a focus area (for example: "architecture only" or "testing and concerns"):
- Always run Phase 1 in full.
- Fully complete focus-area documents first.
- For non-focus documents not yet analyzed, keep required sections present and mark unknowns as
[TODO]. - Still run the Phase 4 validation loop on all seven documents before final output.
Phase 1: Scan and Read Intent
Run the scan script from the target project root:
python3 "$SKILL_ROOT/scripts/scan.py" --output docs/codebase/.codebase-scan.txtWhere
$SKILL_ROOTis the absolute path to the skill folder. Works on Windows, macOS, and Linux.Quick start: If you have the path inline:
python3 /absolute/path/to/skills/acquire-codebase-knowledge/scripts/scan.py --output docs/codebase/.codebase-scan.txtSearch for
PRD,TRD,README,ROADMAP,SPEC,DESIGNfiles and read them.Summarise the stated project intent before reading any source code.
Phase 2: Investigate
Use the scan output to answer questions for each of the seven templates. Load references/inquiry-checkpoints.md for the full per-template question list.
If the stack is ambiguous (multiple manifest files, unfamiliar file types, no package.json), load references/stack-detection.md.
Phase 3: Populate Templates
Copy each template from assets/templates/ into docs/codebase/. Fill in this order:
- STACK.md β language, runtime, frameworks, all dependencies
- STRUCTURE.md β directory layout, entry points, key files
- ARCHITECTURE.md β layers, patterns, data flow
- CONVENTIONS.md β naming, formatting, error handling, imports
- INTEGRATIONS.md β external APIs, databases, auth, monitoring
- TESTING.md β frameworks, file organization, mocking strategy
- CONCERNS.md β tech debt, bugs, security risks, perf bottlenecks
Use [TODO] for anything that cannot be determined from code. Use [ASK USER] where the right answer requires team intent.
Phase 4: Validate, Repair, Verify
Run this mandatory validation loop before finalizing:
- Validate each doc against
references/inquiry-checkpoints.md. - For each non-trivial claim, confirm at least one evidence reference exists.
- If any required section is missing or unsupported:
- Fix the document.
- Re-run validation.
- Repeat until all seven docs pass.
Then present a summary of all seven documents, list every [ASK USER] item as a numbered question, and highlight any Intent vs. Reality divergences from Phase 1.
Validation pass criteria:
- No unsupported claims.
- No empty required sections.
- Unknowns use
[TODO]rather than assumptions. - Team-intent gaps are explicitly marked
[ASK USER].
Gotchas
Monorepos: Root package.json may have no source β check for workspaces, packages/, or apps/ directories. Each workspace may have independent dependencies and conventions. Map each sub-package separately.
β¦
FAQ
What are the seven documents it creates?
They are documents about the project's technology stack (STACK), structure (STRUCTURE), architecture (ARCHITECTURE), conventions (CONVENTIONS), integrations (INTEGRATIONS), testing (TESTING), and general concerns (CONCERNS).
What do '[TODO]' or '[ASK USER]' mean?
'[TODO]' indicates something the tool couldn't discover. '[ASK USER]' means the tool needs a question answered by you to complete the documentation.
Can the tool guess information about the code?
No, the tool only documents what can be verified directly from files or command output. It does not invent or assume information.
Details
Original description by the author
Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #7034
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
acreadiness-assess
40kEnables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
acreadiness-generate-instructions
40kHelps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
acreadiness-policy
40kEnables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
ad-campaign-analyzer
40kHelps your agent analyze ad campaign data. It identifies what to cut, scale, or test to optimize spending.
Similar skills
technical-documentation
394kHelps your agent write and review clear technical docs and agent instruction files, so people and AI tools can follow them easily.
architecture-decision-records
280kHas your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
code-tour
280kLets your agent create step-by-step code walkthroughs with exact file and line references. Useful for intros, explanations, and reviews.