3 KiB
3 KiB
| title | aliases | tags | sources | created | updated | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Claude Code + Obsidian Setup |
|
|
|
2026-04-15 | 2026-04-15 |
Claude Code + Obsidian Setup
Practical setup guide for the Karpathy-style LLM knowledge base.
Key Takeaways
- CLAUDE.md is the most important file — it defines Claude as "the librarian"
- Web Clipper + Local Images Plus = one-click article ingestion
_master-index.mdis the LLM's table of contents — always kept current- Sessions auto-captured via hooks → compiled to wiki after 21:00
Tools Required
| Tool | Purpose | Required |
|---|---|---|
| Obsidian | Frontend (graph view, search, browse) | Yes |
| Claude Code | LLM backend (compile, query, audit) | Yes |
| Obsidian Web Clipper | Browser extension → raw/ | Recommended |
| Local Images Plus | Downloads images from clipped pages | Recommended |
| claude-memory-compiler | Auto-captures sessions → daily logs | Installed |
Vault Structure (This Vault)
VadymSamoilenko/
├── raw/ ← dump articles here (Web Clipper target)
│ └── _processed/ ← compiled files move here
├── wiki/ ← LLM's domain, do not edit manually
│ ├── _master-index.md
│ ├── obsidian-rag/ ← example topic folder
│ ├── concepts/ ← auto-generated from sessions
│ ├── connections/ ← auto-generated cross-links
│ └── qa/ ← filed query answers
└── output/ ← query results, reports
Hook System (Already Configured)
| Hook | When | What it does |
|---|---|---|
| SessionStart | Every session start | Injects _master-index.md + recent daily log |
| SessionEnd | Session ends | Captures transcript → flush.py → daily log |
| PreCompact | Before context compaction | Safety net — saves context |
| PostCompact | After compaction | Haiku writes structured entry to project note |
Auto-compilation fires after 21:00 when a session ends.
The Compile Workflow
- Clip article with Web Clipper → lands in
raw/ - Open Claude Code, say: "compile"
- Claude reads raw/, creates wiki article, updates
_index.mdand_master-index.md - Processed file moves to
raw/_processed/ - Article appears in Obsidian with wikilinks
Query Pattern (3 hops)
Question → _master-index.md → topic/_index.md → article → answer
Manual query:
cd ~/.claude/memory-compiler && uv run python scripts/query.py "your question"
With auto-filing:
uv run python scripts/query.py "your question" --file-back
Audit Command
audit the wiki
Claude reviews for: broken links, orphan articles, contradictions, gaps. Reports without making changes.