Skip to content

Latest commit

 

History

History
106 lines (71 loc) · 2.66 KB

File metadata and controls

106 lines (71 loc) · 2.66 KB

Getting Started

This guide walks you through generating a product knowledge base from your codebase.

Prerequisites

  1. Claude Code installed and configured (install guide)
  2. Obsidian to view the generated vault (download)
  3. A codebase to analyze

Step 1: Set Up the Template

Clone or create from the template:

# Option A: Use GitHub template
# Click "Use this template" on the GitHub repo page

# Option B: Clone directly
git clone https://github.com/your-org/product-knowledge.git my-product-kb
cd my-product-kb

Step 2: Open in Claude Code

Navigate to your new repo and start Claude Code:

cd my-product-kb
claude

Claude Code automatically loads the skill from .claude/skills/generate-knowledge-base/SKILL.md.

Step 3: Run the Skill

Invoke the skill with your codebase path:

/generate-knowledge-base /path/to/your/codebase

Or without a path — Claude will ask you:

/generate-knowledge-base

Step 4: Answer Setup Questions

Claude will ask you:

  1. Product name — used in document titles and the README
  2. Codebase path — where your source code lives (auto-filled if you passed it as an argument)
  3. Output directory — where to write the vault (defaults to a sibling directory)

Step 5: Review the Plan

Claude analyzes your codebase and presents a generation plan:

## Generation Plan

Product: MyApp
Output: /path/to/myapp-knowledge/
Tech Stack: TypeScript with Next.js + Express

### Documents to Generate (~45 total)

Architecture (5 docs)
- architecture/overview.md
- architecture/tech-stack.md
...

Shall I proceed?

Review the plan. You can ask Claude to add or remove categories, adjust the domain list, or change any aspect before approving.

Step 6: Wait for Generation

Once approved, Claude generates documents across all categories. For a medium-sized codebase, this produces 30-80 documents.

The process runs through:

  1. Architecture docs (3-8 docs)
  2. Data model docs (2-10 docs)
  3. API docs (3-20 docs)
  4. Domain docs (10-30 docs, generated in batches)
  5. Infrastructure docs (2-5 docs)
  6. README and CLAUDE.md finalization
  7. Wikilink validation

Step 7: Open in Obsidian

  1. Open Obsidian
  2. Click "Open folder as vault"
  3. Select the generated output directory
  4. Browse the knowledge graph

The vault's README.md serves as the master index with links to every document.

What's Next