Skip to content
Skillpedia
Documentation40k Β· #7034

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.md

Copy 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

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/acquire-codebase-knowledge/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

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

  1. 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.
  2. 2Open your agent inside the root folder of the project you want to document. The scan script must run from the project root.
  3. 3Ask for a map of the codebase. Optionally name a focus area, such as "architecture only" or "testing and concerns".
  4. 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.
  5. 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:

  1. Exactly these files exist in docs/codebase/: STACK.md, STRUCTURE.md, ARCHITECTURE.md, CONVENTIONS.md, INTEGRATIONS.md, TESTING.md, CONCERNS.md.
  2. Every claim is traceable to source files, config, or terminal output.
  3. Unknowns are marked as [TODO]; intent-dependent decisions are marked [ASK USER].
  4. Every document includes a short "evidence" list with concrete file paths.
  5. 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"):

  1. Always run Phase 1 in full.
  2. Fully complete focus-area documents first.
  3. For non-focus documents not yet analyzed, keep required sections present and mark unknowns as [TODO].
  4. Still run the Phase 4 validation loop on all seven documents before final output.

Phase 1: Scan and Read Intent

  1. Run the scan script from the target project root:

    python3 "$SKILL_ROOT/scripts/scan.py" --output docs/codebase/.codebase-scan.txt
    

    Where $SKILL_ROOT is 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.txt
    
  2. Search for PRD, TRD, README, ROADMAP, SPEC, DESIGN files and read them.

  3. 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:

  1. STACK.md β€” language, runtime, frameworks, all dependencies
  2. STRUCTURE.md β€” directory layout, entry points, key files
  3. ARCHITECTURE.md β€” layers, patterns, data flow
  4. CONVENTIONS.md β€” naming, formatting, error handling, imports
  5. INTEGRATIONS.md β€” external APIs, databases, auth, monitoring
  6. TESTING.md β€” frameworks, file organization, mocking strategy
  7. 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:

  1. Validate each doc against references/inquiry-checkpoints.md.
  2. For each non-trivial claim, confirm at least one evidence reference exists.
  3. If any required section is missing or unsupported:
  • Fix the document.
  • Re-run validation.
  1. 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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills