π§ claude-obsidian-kit
LLM wiki kit
First committed by selmakcby
Published in selmakcby/claude-obsidian-kit. Publisher page
26 GitHub stars
What it is
Give your Claude Code agents a shared, persistent brain β an Obsidian vault that survives sessions. Includes a retrofit guide for folders you already have, and a runnable vault linter.
AutoGineer overview, from the brainβs own files
claude-obsidian-kit transforms ephemeral Claude Code sessions into a persistent knowledge base. By introducing specialized agentsβthe archivist for reading and linting, and the scribe for writingβit enables agents to maintain context across sessions. The kit provides a structured vault template, a schema-driven constitution, and a linter to ensure the integrity of the knowledge graph, effectively turning a project's reasoning into a searchable, long-term asset.
How it works
Memory model: LLM wiki
AutoGineer overview, from the brainβs own files
The kit installs two specialized agents into your project: an archivist that handles queries and vault health, and a scribe that performs efficient writes. It uses a structured Obsidian vault layout with predefined folders for architecture, decisions, design, entities, and concepts. Agents follow a specific llm-wiki skill protocol for ingesting information, querying the vault, and linting for issues like broken links or orphans. A provided Python script allows for command-line linting of the vault's health.
| Folder | Role | Files |
|---|---|---|
| agents | agent-instructions | 2 |
| scripts | scripts | 2 |
| skills | agent-instructions | 4 |
| obsidian | folder | 3 |
| vault-template | folder | 10 |
Requirements
Databases: PostgreSQL
Set it up
This brain runs code automatically: 1 script. Review scripts/install.sh before opening the folder in Claude Code. No step below turns a hook on for you.
scripts/install.sh:sh scripts/install.sh
- Download the brain as a ZIP and unzip it where you keep your notes or project: https://mp-staging.autogineer.com/agent-brains/selmakcby/claude-obsidian-kit/download
cd claude-obsidian-kit && claude
AutoGineer scanned these files at commit 2826401.
- Not scanned by AutoGineerThe authorβs README also describes installing it from a clone of its repository. Read its install section: AutoGineer did not scan that path. https://github.com/selmakcby/claude-obsidian-kit/blob/282640137e4761c5a6b0aa75aa509cf39199d6c4/README.md#install
First committed by selmakcby. Published in selmakcby/claude-obsidian-kit. Licence: MIT License.
Usage
AutoGineer overview, from the brainβs own files
- Automating the ingestion of project decisions into a persistent vault.
- Querying past architectural decisions to inform current development.
- Running automated health checks on the knowledge base to identify stale notes or broken links.
- Maintaining a shared knowledge graph that survives individual agent sessions.
- βWhy did we choose Stripe webhooks for the payment integration?β
- The archivist agent reads the relevant decision note from the vault and synthesizes the rationale in seconds.
- βCheck vault health.β
- The archivist scans the vault for orphans, broken links, and contradictions, returning a severity-sorted report.
Documentation by selmakcby
<div align="center">
π§ claude-obsidian-kit
Give your Claude Code agents a shared, persistent brain.
Turn ephemeral sessions into accumulating knowledge β stored in an Obsidian vault. Built for efficiency: right model for each job, cheap writes, index-first reads.
ββ planner (opus) ββ
β ui-agent (sonnet)β QUERY / LINT
β builder (sonnet)β ββββββΆ archivist (sonnet Β· read-only)
β reviewer (sonnet)β β
ββββββββββββββββββββ βΌ
β VAULT
βββββββ INGEST βββΆ scribe (haiku Β· writes)
β²
β
Main Claude
(orchestrator)Install Β· Retrofit Β· Lint Β· Efficiency Β· FAQ Β· Prompts πΉπ·
</div>
What this is
A drop-in kit that extends Claude Code with:
Two agents:
archivistβ vault reader + health guardian (QUERY, LINT)scribeβ dedicated vault writer (INGEST, runs on haiku for efficiency)
One skill β
llm-wikiβ the INGEST Β· QUERY Β· LINT protocolsOne constitution β
vault-template/CLAUDE.mdβ the schema every agent reads before touching the vault (πΉπ· TΓΌrkΓ§e)One vault template β pre-structured Obsidian vault with conventions
One linter β
vault-lint.py, the LINT protocol as a runnable command (no dependencies)One retrofit guide β RETROFIT.md, for when you already have months of material
Obsidian config β graph colours by layer, and the
[!conflict]callout the skill needs
After install, your agents read from and write to a shared markdown knowledge graph that survives sessions. Yesterday's decisions are tomorrow's context.
The problem this solves
Default Claude Code agents are stateless:
Monday: agents plan a feature, build it β close session
Tuesday: new session β "why did we use Stripe webhooks?"
Claude: "I don't know. Let me re-analyze from scratch..."Every session starts from zero. Context dies with the conversation. The project's reasoning evaporates even when the code persists.
With this kit:
Monday: agents plan β scribe files to vault/decisions/
Tuesday: "why Stripe webhooks?"
archivist β reads vault/decisions/2026-04-21-stripe-webhooks.md β answers in 1 second with full rationaleInstall
Quick
git clone https://github.com/selmakcby/claude-obsidian-kit ~/claude-obsidian-kit
cd ~/claude-obsidian-kit
./scripts/install.sh ~/my-projectInstalls:
~/my-project/.claude/agents/archivist.md~/my-project/.claude/agents/scribe.md~/my-project/.claude/skills/llm-wiki/~/my-project/vault/(if doesn't exist)
Final step
Update your project's CLAUDE.md with vault permissions:
{
"permissions": {
"allow": [
"Write(vault/**)",
"Edit(vault/**)",
"Read(vault/**)"
]
}
}How it works
The 6-agent team
After this kit, your full team:
| Agent | Role | Model | Why this model |
|---|---|---|---|
| planner | Architecture + planning | opus | Deep reasoning |
| ui-agent | Design + components | sonnet | Balanced |
| builder | Backend implementation | sonnet | Coding quality |
| reviewer | Quality + security | sonnet | Thorough analysis |
| archivist | Vault reads (QUERY, LINT) | sonnet | Synthesis + audit |
| scribe | Vault writes (INGEST) | haiku | Cheap + fast |
The scribe / archivist split is token-efficient by design β see EFFICIENCY.md.
Three operations
π’ INGEST (scribe)
Other agents produce findings. Main Claude passes findings to scribe. Scribe formats into proper note + writes to correct folder + updates index.
planner: "We should use monthly/annual pricing toggle"
β
main Claude: Task(scribe, finding="...", type=decision)
β
scribe: writes vault/decisions/2026-04-23-pricing-toggle.mdπ΅ QUERY (archivist)
you: "Why did we choose monthly/annual toggle?"
β
archivist: reads index.md β greps "toggle" β reads 2-3 notes β synthesizes answerπ‘ LINT (archivist)
you: "Check vault health"
β
archivist: scans for orphans, broken links, stale notes, contradictions
archivist: returns severity-sorted report with fix suggestionsRetrofit β you already have a folder
vault-template/ assumes you are starting clean. Almost nobody is. The realistic situation is
months of accumulated material β transcripts, drafts, half-finished projects, and often an older
vault somewhere inside that already works.
RETROFIT.md is the guide for that case. It covers the two decisions you make before writing anything (the vault root is the folder you already have; an existing vault inside it is canonical and read-only), and the parallel-ingest design that keeps agents from writing the same entity page twice:
Phase 1 domain agents βββΆ project + decision pages only
(reference [[entities]], write none)
β
βΌ union + dedupe + deterministic split, in code
Phase 2 node agents βββΆ disjoint slices of the entity/concept list
β
βΌ
Phase 3 index + lint βββΆ one owner for index.md, one auditSplitting by page type rather than only by domain makes collisions impossible by construction rather than by instruction. Reference run: 1.9 GB, ~1,000 text files, 226 pages, 3,484 links, zero broken links, zero fabricated source citations.
Lint, as a command
skills/llm-wiki/lint.md specifies the checks and a health-score formula. vault-lint.py
implements that spec so the result is measured rather than asserted. Single file, standard
library only, read-only:
python3 scripts/vault-lint.py path/to/vault
# retrofit case: audit the wiki layer, resolve links against the whole folder
python3 scripts/vault-lint.py . --notes 'wiki/*' --notes 'index.md'
# non-English frontmatter
python3 scripts/vault-lint.py . --fields tur,durum,guncelleme --date-field guncelleme
# CI
python3 scripts/vault-lint.py . --fail-under 85| Check | Why it earns its place |
|---|---|
| Broken links | Code spans are stripped first β an [[example]] inside backticks is not a broken link |
| Orphans | Entry points (index, log, README) are exempt |
| Unverifiable sources | Every path a note cites in source: is checked against disk. This is how you catch a citation the agent invented |
| Ambiguous targets | Two files sharing a basename means [[name]] resolves by proximity β possibly not the file you meant |
| Missing concept pages | A link referenced 3+ times with no page behind it |
| Frontmatter, stale notes | Per the schema; stale = old date still in draft |
Flagged > [!conflict] callouts are reported but not scored. A marked contradiction is the
protocol working; the dangerous one is unmarked, and no linter can see that. Pass
--score-conflicts for the strict formula.
Obsidian config
The skill tells the agent to flag contradictions with > [!conflict] β and Obsidian has no such
callout type, so they render as anonymous grey notes. obsidian/ fixes
that and colours the graph by layer. Copy it into your vault's .obsidian/.
Efficiency
This kit is intentionally designed for low token cost. See EFFICIENCY.md for all 10 patterns.
Highlights:
Separate thinking from writing β opus plans, haiku files (80% cost reduction on writes)
Index-first reads β never grep the whole vault
Model tiering β haiku for scribe, sonnet for reads, opus for architecture
Least-privilege tools β smaller system prompts, fewer wasted calls
Parallel when independent β wall-clock savings
Rough cost per full feature (plan + design + build + review + 2 ingests): ~$0.18 Naive "opus everywhere" alternative: ~$0.90 β 5Γ cheaper with proper model routing.
FAQ
Common questions about INGEST, QUERY, LINT, PII, versioning, RAG comparison, and more β see FAQ.md.
Vault layout
vault/
βββ index.md β entry point, read first
βββ _schema/
β βββ template.md β required frontmatter for all notes
β βββ conventions.md β naming, linking, tagging rules
β
βββ architecture/ β how the system is built
βββ decisions/ β why we chose X over Y (dated)
βββ design/ β UI/UX decisions
βββ entities/ β tools, services (stripe, supabase)
βββ concepts/ β cross-cutting ideas
βββ sessions/ β dated session summariesEvery note has frontmatter. Every note links to others. Orphans are tech debt.
File structure
claude-obsidian-kit/
βββ README.md β you are here
βββ RETROFIT.md β pointing the kit at a folder you already have
βββ EFFICIENCY.md β token patterns (10 of them)
βββ FAQ.md β common questions
βββ LICENSE β MIT
βββ agents/
β βββ archivist.md β reader/guardian (QUERY + LINT)
β βββ scribe.md β dedicated writer (INGEST)
βββ skills/
β βββ llm-wiki/
β βββ SKILL.md β main skill manifest
β βββ ingest.md β INGEST protocol detail
β βββ query.md β QUERY protocol detail
β βββ lint.md β LINT protocol detail
βββ vault-template/
β βββ index.md β vault entry point
β βββ _schema/
β β βββ template.md β note template
β β βββ conventions.md β full rulebook
β βββ architecture/
β βββ decisions/
β βββ design/
β βββ entities/example-service.md
β βββ concepts/example-concept.md
β βββ sessions/
βββ obsidian/
β βββ graph.json β graph coloured by vault layer
β βββ snippets/
β β βββ vault-layers.css β [!conflict] callout + folder colours
β βββ README.md
βββ scripts/
βββ install.sh β one-command setup
βββ vault-lint.py β runs the LINT protocol for real (no deps)Works well with
Claude Code β the primary target
Obsidian β the vault viewer/editor (optional β vault is plain markdown)
VS Code, Typora, Bear β any markdown editor works
Previous kit: knowledge-pipeline β this extends it with the multi-agent efficiency layer
License
MIT
Credits
Built on Claude Code's agent + skill system.
Inspired by:
obra/superpowers β skills as methodology
anthropics/skills β skill file format
wshobson/agents β multi-agent orchestration patterns
Zettelkasten β atomic notes + aggressive linking
EFFICIENCY.md
Efficiency Patterns
Running multi-agent systems is easy. Running them cost-efficiently is the actual skill. This doc covers the patterns baked into this kit.
The problem
Naive multi-agent setups burn tokens fast:
Every agent reloads shared context (CLAUDE.md, rules, skills)
Expensive models do cheap work (opus formatting a note)
Agents read far more than they need ("let me read the whole vault first")
Work gets duplicated (planner plans, builder re-plans, reviewer re-plans)
A 10-decision project can easily cost 10x what it should.
Pattern 1 β Separate thinking from writing
The single biggest token saving.
Before (expensive):
planner β analyzes + formats + writes note to vault
(opus the whole time β ~3000 tokens in, 1500 tokens out)After (efficient):
planner β analyzes, returns raw finding (opus, short output)
β
scribe β formats + writes (haiku, tiny prompt + cheap model)
Cost: ~80% less on the writing step.Baked into this kit: scribe agent. Always delegate writes to it.
Pattern 2 β Model tiering
Match the model to the job. Don't use a supercar to deliver pizza.
| Agent | Model | Why |
|---|---|---|
| planner | opus | Deep reasoning, architecture |
| ui-agent | sonnet | Balanced, design decisions |
| builder | sonnet | Coding quality matters |
| reviewer | sonnet | Thorough analysis |
| archivist (QUERY/LINT) | sonnet | Synthesis + pattern-matching |
| scribe (writes) | haiku | Formatting only, speed matters |
Set in each agent's model: frontmatter. Claude Code respects it.
Rule of thumb:
Thinking β opus/sonnet
Formatting / filing / routing β haiku
Simple checks β haiku
Pattern 3 β Index-first reads
Never grep the whole vault. Start narrow.
Bad:
Grep "webhook" ~/vault/ --recursive
β returns 30 matches across 12 files
β agent reads all 12 files (~15,000 tokens)Good:
1. Read vault/index.md (1 file, ~500 tokens)
2. Identify 2-3 likely folders
3. Grep within those folders only
4. Read top 3 matches (~2,500 tokens)Rule: if an agent is reading more than 5 notes for a single query, the query is too broad. Ask for narrower scope.
Pattern 4 β Parallel when independent
From Video 1:
Independent tasks β parallel (single Task() message with N calls)
Dependent tasks β sequentialIndependent examples:
Analyzing auth module + analyzing payments module (different code)
Reviewing for quality + reviewing for security (different lenses, same code)
QUERYing 3 unrelated topics from vault
Not independent:
Plan β Design β Build (each depends on previous)
Parallelism = wall-clock savings, NOT token savings. But it makes debugging easier (clear separation of concerns).
Pattern 5 β Context handoff discipline
When main Claude passes info between agents, pass summaries, not raw context.
Bad:
Main β ui-agent: "[pastes entire 2000-token plan from planner]"Good:
Main β ui-agent: "Planner decided: 3-tier pricing with monthly/annual toggle.
Stack: Next.js 15, Stripe. Build the component brief."Main Claude is the compressor. Each handoff is a boundary where context should shrink.
Pattern 6 β Least-privilege tools
Each agent has minimum tools. Why this saves tokens:
Agents with fewer tools have shorter system prompts (tool descriptions are loaded)
Less chance of wasted tool calls (agent can't wander into unrelated operations)
Faster decisions (less search space)
Baked into this kit β see each agent's tools: line. scribe can write but not run bash. archivist can't write at all.
Pattern 7 β Batch related operations
Bad:
Session has 3 decisions to file
β call scribe 3 times sequentially (3 round-trips)Good:
Main Claude collects 3 findings
β calls scribe 3 times IN PARALLEL (1 round-trip)Pattern: collect β batch-call β proceed. Especially valuable for scribe operations.
Pattern 8 β Incremental writes
index.md is the vault's most-read file. Don't rewrite it on every INGEST.
Bad:
scribe rewrites entire index.md every time a note is addedGood:
scribe uses Edit (not Write) to append a single line under the right sectionBaked into scribe.md's process. Uses Edit for updates, Write only for new files.
Pattern 9 β Short agent prompts
System prompts get included in EVERY call to that agent. Bloated prompts = token waste at scale.
Bad (our archivist v1, ~280 lines):
# Archivist β The Vault Guardian
<200 lines of examples, edge cases, philosophy>Good (archivist v2, ~90 lines):
# Archivist β Reader & Guardian
<minimum instructions, link to detailed protocols>Rule: if a rule is applied 1% of the time, link to it in a separate doc instead of inlining.
Pattern 10 β Stateless reads, cached context
Agents don't have persistent memory (that's why we need Obsidian).
But within a single session, main Claude's context accumulates. Don't re-ask things you just learned.
Bad:
T+0: ui-agent reads vault/entities/stripe.md
T+5: builder reads vault/entities/stripe.md again (main Claude already has it!)Good:
T+0: ui-agent reads vault/entities/stripe.md
returns brief mentioning Stripe capabilities
T+5: builder receives brief including stripe info
doesn't need to re-read stripe.mdMain Claude is your session-level cache. Use it.
Measuring
Token costs vary by model. Rough guide per operation:
| Operation | Agent | Model | Input | Output | Cost estimate |
|---|---|---|---|---|---|
| Plan a feature | planner | opus | 1.5k | 1k | ~$0.08 |
| Design UI | ui-agent | sonnet | 2k | 800 | ~$0.02 |
| Build feature | builder | sonnet | 3k | 2k | ~$0.04 |
| Review code | reviewer | sonnet | 4k | 1k | ~$0.03 |
| QUERY vault | archivist | sonnet | 2k | 500 | ~$0.01 |
| File note | scribe | haiku | 500 | 400 | ~$0.0005 |
| LINT vault | archivist | sonnet | 5k | 1k | ~$0.03 |
A full feature (plan + design + build + review + 2 files): ~$0.18
Same flow running opus everywhere (naive): ~$0.90
5Γ cost savings by just picking the right models.
TL;DR
Scribe for writes β cheap haiku, focused prompt
Archivist for reads β sonnet, index-first
Opus where reasoning matters β planner only
Parallel independent calls β save wall clock
Summaries across boundaries β main Claude compresses
Least privilege β agents get minimum tools
Short system prompts β link out to details
Apply these and a project that would cost $20/month in tokens costs $3.
31 files
- .gitignore
- ATTRIBUTION.md
- AUTOGINEER-RUNS.md
- CLAUDE.tr.md
- EFFICIENCY.md
- FAQ.md
- LICENSE
- PROMPTS.md
- README.md
- RETROFIT.md
- agents/archivist.md
- agents/scribe.md
- obsidian/README.md
- obsidian/graph.json
- obsidian/snippets/vault-layers.css
- scripts/install.sh
- scripts/vault-lint.py
- skills/llm-wiki/SKILL.md
- skills/llm-wiki/ingest.md
- skills/llm-wiki/lint.md
- skills/llm-wiki/query.md
- vault-template/CLAUDE.md
- vault-template/_schema/conventions.md
- vault-template/_schema/template.md
- vault-template/architecture/overview.md
- vault-template/concepts/example-concept.md
- vault-template/decisions/.gitkeep
- vault-template/design/.gitkeep
- vault-template/entities/example-service.md
- vault-template/index.md
- vault-template/sessions/.gitkeep
Advantages
- Reduces token costs by using specialized models for different tasks, such as using Haiku for writes and Sonnet for reads. evidence: README.md
- Ensures knowledge persists across sessions, preventing the loss of project reasoning. evidence: README.md
- Provides a robust linting protocol to maintain vault health and catch fabricated citations. evidence: README.md
Limitations
- Requires manual setup and integration into existing project structures. evidence: README.md
- Relies on specific agent roles which must be correctly configured within the Claude Code environment. evidence: README.md
Security
Risk level: Low risk
This brain runs
Install scripts (1)
scripts/install.sh:sh scripts/install.sh
- Low risk: scripts-present (scripts/install.sh)
Attribution and licence
- First committed by
selmakcby
- Publisher
- selma (Community)
- Source
- selmakcby/claude-obsidian-kit Β· commit 2826401
- Licence
- MIT License (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- selmakcby
AutoGineer is not affiliated with or endorsed by selmakcby.
Download
The ZIP holds the files AutoGineer serves, with ATTRIBUTION.md and the licence. Download claude-obsidian-kit.zip