Generate a comprehensive product knowledge base from any codebase using Claude Code.
This template repo provides a Claude Code skill (/generate-knowledge-base) that analyzes your source code and produces an interconnected Obsidian vault — complete with architecture docs, API references, domain logic, data models, and infrastructure documentation.
A fully cross-referenced Obsidian vault containing:
- Architecture docs — system topology, tech stack, data flows
- Data model docs — database schemas, entity relationships, migrations
- API docs — endpoints, auth, request/response shapes
- Domain docs — business logic, state machines, feature specifications
- Infrastructure docs — cloud architecture, CI/CD, monitoring
Every document cites exact source file paths and links to related topics via [[wikilinks]].
Click "Use this template" on GitHub, or clone directly:
git clone https://github.com/your-org/product-knowledge.git my-product-kb
cd my-product-kbclaude/generate-knowledge-base /path/to/your/codebase
Claude will:
- Detect your tech stack automatically
- Map your directory structure
- Present a generation plan for approval
- Generate 30-80 documents across all categories
- Cross-reference everything with wikilinks
- Validate all links
Open the generated vault directory in Obsidian to browse the interconnected knowledge graph.
| Language | Frameworks | Detection |
|---|---|---|
| JavaScript/TypeScript | Next.js, Express, NestJS, React | package.json |
| Python | Django, FastAPI, Flask | requirements.txt, pyproject.toml |
| Java/Kotlin | Spring Boot, Ktor | pom.xml, build.gradle.kts |
| Go | Gin, Echo, stdlib | go.mod |
| Rust | Actix, Rocket, Axum | Cargo.toml |
| Ruby | Rails | Gemfile |
| PHP | Laravel | composer.json |
See docs/supported-tech-stacks.md for details.
- Getting Started — step-by-step setup guide
- How It Works — skill architecture and generation pipeline
- Customization — adapting categories, adding domains
- Supported Tech Stacks — detection and analysis patterns
See examples/sample-vault/ for a small example of the generated output format.
product-knowledge/
├── .claude/skills/generate-knowledge-base/ # The core skill
│ ├── SKILL.md # Skill definition
│ ├── references/ # Format specs & patterns
│ ├── scripts/ # Post-generation tools
│ └── assets/ # Templates
├── docs/ # User-facing guides
└── examples/sample-vault/ # Example output
MIT