Back to Skills

acquire-codebase-knowledge

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.

37,902stars4,780forksUpdated 8/16/2026

Security Assessment

Safe(95/100)
Security Score95/100

About acquire-codebase-knowledge

The acquire-codebase-knowledge skill maps, documents, and onboards a developer into an existing codebase by producing seven populated documents under docs/codebase/: STACK, STRUCTURE, ARCHITECTURE, CONVENTIONS, INTEGRATIONS, TESTING, and CONCERNS. It solves the onboarding and knowledge-capture problem where a repository lacks trustworthy, verifiable documentation, and it enforces a strict evidence rule: only document what is verifiable from files or terminal output, never infer or assume, marking unknowns as [TODO] and intent-dependent decisions as [ASK USER].

The workflow runs in four phases. Phase 1 runs a bundled scan script (scripts/scan.py, invoked with python3 and an output path) and reads intent documents such as PRD, README, ROADMAP, and SPEC. Phase 2 investigates each documentation area using inquiry checkpoints and a stack-detection reference for ambiguous stacks. Phase 3 copies the provided Markdown templates into docs/codebase/ and fills them in a defined order. Phase 4 runs a mandatory validation loop. The skill advertises multi-language manifest detection, CI/CD and container/orchestration detection, code metrics, and security/compliance config detection, and it supports a focus-area mode to prioritize specific documents. Every document carries an evidence list of concrete file paths, and the final output surfaces numbered [ASK USER] questions and intent-versus-reality divergences.

It targets engineers, tech leads, and teams onboarding to unfamiliar repositories or generating architecture documentation. It requires Python 3.8+ and git, and the scan script is run from the target project root as a read-only inventory step.

FAQ

What does it produce?

Exactly seven documents in docs/codebase/ (STACK, STRUCTURE, ARCHITECTURE, CONVENTIONS, INTEGRATIONS, TESTING, CONCERNS), each with an evidence list of file paths and unknowns marked as [TODO] or [ASK USER].

What are the prerequisites?

The skill states it is cross-platform and requires Python 3.8+ and git. The bundled scan script (scripts/scan.py) is run from the target project root.

Can I document only part of the codebase?

Yes. A focus-area mode lets you target specific documents (for example 'architecture only'); Phase 1 still runs in full and the validation loop still runs over all seven documents, with non-focus docs keeping required sections but marking unknowns as [TODO].

Does it invent architecture details if evidence is missing?

No. Its core contract is that every claim must be traceable to source files, config, or terminal output. Anything that cannot be determined from code is marked [TODO], and intent-dependent decisions are marked [ASK USER].

All Files

11 files
assets/templates/ARCHITECTURE.md1.2 KB
View
assets/templates/INTEGRATIONS.md1.3 KB
View
assets/templates/TESTING.md1.3 KB
View
scripts/scan.py23.2 KB
View
assets/templates/CONCERNS.md1.7 KB
View
assets/templates/STACK.md1.3 KB
View
references/inquiry-checkpoints.md4.0 KB
View
SKILL.md8.9 KB
View
assets/templates/CONVENTIONS.md1.3 KB
View
assets/templates/STRUCTURE.md1.1 KB
View
references/stack-detection.md5.5 KB
View

Install acquire-codebase-knowledge

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill