Generated banner for 🧠 claude-obsidian-kit
Generated logo for 🧠 claude-obsidian-kit

🧠 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.
β€” the description by selmakcby

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.

Folders
FolderRoleFiles
agentsagent-instructions2
scriptsscripts2
skillsagent-instructions4
obsidianfolder3
vault-templatefolder10

Requirements

Databases: PostgreSQL

Set it up

  1. 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
  2. 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
  3. cd claude-obsidian-kit && claude

  4. AutoGineer scanned these files at commit 2826401.

  5. 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
  6. 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 protocols

  • One 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 rationale

Install

Quick
git clone https://github.com/selmakcby/claude-obsidian-kit ~/claude-obsidian-kit

cd ~/claude-obsidian-kit
./scripts/install.sh ~/my-project

Installs:

  • ~/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:

AgentRoleModelWhy this model
plannerArchitecture + planningopusDeep reasoning
ui-agentDesign + componentssonnetBalanced
builderBackend implementationsonnetCoding quality
reviewerQuality + securitysonnetThorough analysis
archivistVault reads (QUERY, LINT)sonnetSynthesis + audit
scribeVault writes (INGEST)haikuCheap + 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 suggestions

Retrofit β€” 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 audit

Splitting 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
CheckWhy it earns its place
Broken linksCode spans are stripped first β€” an [[example]] inside backticks is not a broken link
OrphansEntry points (index, log, README) are exempt
Unverifiable sourcesEvery path a note cites in source: is checked against disk. This is how you catch a citation the agent invented
Ambiguous targetsTwo files sharing a basename means [[name]] resolves by proximity β€” possibly not the file you meant
Missing concept pagesA link referenced 3+ times with no page behind it
Frontmatter, stale notesPer 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 summaries

Every 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:

RETROFIT.md

Retrofit β€” pointing the kit at a folder you already have

vault-template/ assumes you are starting clean. Almost nobody is.

The realistic situation is a folder with six months in it: transcripts, drafts, half-finished projects, exports, three README files that contradict each other, and β€” if you have done this before β€” an older vault somewhere inside that already works. This is the guide for that.

It was written by doing it: a 1.9 GB content folder, ~1,000 text files, an existing mature sub-vault. Numbers from that run are at the bottom.


The two decisions you make before writing anything

1. The vault root is the folder you already have. Move nothing.

The tempting move is to build a clean vault/ and shovel the old material into raw/. Don't β€” not on the first pass.

Existing folders have load-bearing paths you cannot see from a file listing: video projects referencing footage by absolute path, .git repos, scripts with hardcoded directories, tool configs. Reorganising is a separate, reversible-only-with-effort job, and it is not the job that makes the knowledge searchable.

Open Obsidian on the folder itself and add the wiki layer inside it:

your-folder/            ← vault root. Obsidian opens HERE.
β”œβ”€β”€ CLAUDE.md           ← the schema ([template](vault-template/CLAUDE.md))
β”œβ”€β”€ index.md            ← catalogue
β”œβ”€β”€ log.md              ← append-only record
β”œβ”€β”€ wiki/               ← the only thing the agent owns
β”‚   β”œβ”€β”€ projects/  entities/  concepts/  decisions/  syntheses/  archive/
└── (everything you already had, untouched)

You get the payoff immediately: because the vault root contains the raw files, a wiki page can write [[transcript-2026-04-12]] and Obsidian resolves it to the actual file. The wiki becomes a navigation layer over your real material instead of a parallel copy of it.

Physical reorganisation stays on the table. Do it later, deliberately, with the wiki already telling you what everything is.

For the schema itself, start from vault-template/CLAUDE.md (πŸ‡ΉπŸ‡· TΓΌrkΓ§e) β€” keep the workflows and prohibitions, and adapt the purpose, folder table and naming to your domain.

2. An existing vault inside is canonical and read-only.

If part of your folder is already a working vault, do not regenerate it. Declare it canonical, link into it, and never write to it.

Two things make this work:

  • A reserved-name list. Collect every page name in the existing vault and hand it to the ingest agents as "link to these, never create them." Without this, parallel agents cheerfully write a second claude-code.md and you now have two half-truths.

  • One-way linking. New pages link into the old vault. You do not need to edit the old pages to link back β€” Obsidian's Backlinks pane shows the reverse direction for free. Surgical beats thorough here: every edit to a page you did not write is a chance to break something.

# the reserved list, in one line
find existing-vault -name '*.md' | sed 's|.*/||; s|\.md$||' | sort -u

Map the corpus before you ingest it

Do not point one agent at a thousand files. Spend ten minutes producing a map, because the map determines how you split the work.

find . -type f \( -name '*.md' -o -name '*.txt' -o -name '*.html' \) \
  | awk -F/ '{print (NF==1 ? "ROOT" : $2)}' | sort | uniq -c | sort -rn

Group the result into domains β€” coherent bodies of work, not folders. One project may be scattered across the root, an output/ directory and an assets folder; that is still one domain. Eight to ten domains is a good target. Fewer and each agent drowns; more and they start overlapping and writing the same entity pages.


The ingest design that does not collide

The obvious approach β€” N agents in parallel, each writing whatever pages its domain needs β€” fails in a specific and annoying way. Two agents both encounter the same tool, both decide it deserves an entity page, and both write one. You end up with hermes.md and hermes-agent.md, each holding half the truth, each citing the same sources.

The fix is to split by page type, not just by domain:

Phase 1 β€” domain agents (parallel)
  Each reads its domain and writes ONLY project and decision pages.
  It references [[entities]] and [[concepts]] freely but writes none of them.
  It returns the list of names it referenced.

           ↓  union + dedupe + deterministic split, in code, not by an agent

Phase 2 β€” node agents (parallel)
  Each gets a disjoint slice of the entity/concept list and writes those pages.
  Zero overlap is guaranteed by construction, not by instruction.

           ↓

Phase 3 β€” index + lint (parallel)
  One agent writes index.md and log.md from what is actually on disk.
  One runs the audit.

Two rules make phase 1 safe:

  • Domain agents never touch index.md or log.md. Concurrent appends to a shared file lose writes. One agent owns those, at the end, reading the disk rather than trusting the manifests.

  • Every agent returns structured output (pages written, entities referenced, conflicts found, open questions). You need this to build phase 2's work list, and it is also the only honest input for the log entry.

Tell the agents what not to read. A 40-slide HTML deck and a 60-minute transcript will eat an agent's whole context and give back a summary you could have guessed. "Scan HTML for title and structure, extract decisions from transcripts, never open binaries" is worth stating explicitly.


Then check what you missed

Ingest agents skip things. Run a gap pass before you believe the coverage:

# folders with real weight that the wiki never mentions
for d in */; do
  n=$(find "$d" -type f | wc -l)
  hits=$(grep -rlF "${d%/}" wiki/ 2>/dev/null | wc -l)
  [ "$n" -gt 20 ] && [ "$hits" -lt 2 ] && echo "gap: $d ($n files, $hits mentions)"
done

In the reference run this found a 145-file folder nobody had looked at. It also produced a useful correction: the second-pass agent determined the folder belonged to a different project than the first pass had assumed, by checking file timestamps instead of guessing from the name.


Audit it, with a tool rather than a vibe

python3 scripts/vault-lint.py . \
  --notes 'wiki/*' --notes 'index.md' --notes 'log.md'

--notes is the flag that matters here. It restricts what gets audited while links still resolve against the whole vault β€” otherwise the linter reports every [[example]] inside a tutorial you saved two years ago.

The check worth running first is bad_sources: every path a note cites in its source: frontmatter is verified against the disk. A citation to a file that does not exist is either a fabricated reference or a file that moved β€” and you want to know which, early, while you still remember the material.


Ship the Obsidian config with the vault

The skill tells the agent to flag contradictions with > [!conflict]. Obsidian does not know that callout type, so it renders as a plain grey note and every contradiction you carefully marked becomes invisible. Copy obsidian/ into your vault's .obsidian/ β€” it colours the graph by layer and gives [!conflict] an actual colour. See obsidian/README.md.


Reference run

One folder, 1.9 GB, ~1,000 text files, six months of material, one existing 74-page vault inside. Nine domain agents, three node agents, two synthesis agents.

Pages produced226
Wikilinks3,484 (15.4 per page)
Broken links0
Orphans0
Cited source paths that do not exist0 of 225
Contradictions flagged for a human55
Health score100 / 100

Two things worth saying plainly about that run:

The duplicate-entity problem is real. It produced hermes/hermes-agent and fal/fal-ai before the phase split above existed. Both pairs were good pages describing the same thing. That failure is what the design is for.

Fifty-five flagged contradictions is a healthy number, not a bad one. They are places where two sources disagree and the agent refused to pick. vault-lint.py reports them and does not subtract from the score, because the alternative β€” an agent that quietly chooses β€” scores perfectly and lies to you.


The part that does not automate

The wiki is a snapshot. It goes stale the moment you add material without saying "ingest this." In the reference run a parallel session wrote a new article package twenty minutes after the build finished, and the wiki had no idea it existed.

There is no fix for this in software. Either ingesting becomes a habit, or the vault becomes an increasingly confident historical document.

31 files

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
GitHub avatar of selmakcbyselmakcby
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