/chidi-optimal-brain:setup-knowledge-vaultfrom chidi-optimal-brain
Configure a personal knowledge vault for research and learning (vault location, learning records, PDFs/sources, context graph, project overlay). Use when the user first sets up optimal-brain's vault layer, before research-from-vault, /teach, or other vault skills, or to change the vault path. Reads and writes only this repo and the vault path you configured.
Ships in chidi-optimal-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Scaffold the per-user (or per-workspace) configuration that vault-aware skills assume:
/teach, research-from-vault, agent loops, and engineering skills consume the vault, plus how external research (e.g. from davidondrej/skills) feeds it.This is a prompt-driven skill, not a deterministic script. Explore, present sections one at a time, confirm with the user, then write.
Look for existing signals; don't assume:
.agent/context/knowledge-vault.md or legacy docs/agents/knowledge-vault.mdCLAUDE.md / AGENTS.md at roots — look for existing "Knowledge", "Vault", "Research", or "Second brain" sections.MISSION.md, learning-records/, RESOURCES.md).Summarise what you found. Walk the user through decisions one section at a time — present, get answer, move on.
Assume the user does not know the terms. Start each with a short explainer and show choices/defaults.
Section A — Vault location & access.
Explainer: The vault is your durable, queryable second brain (PDFs, notes, transcripts, articles). Skills will read and write notes here using the filesystem. We need the absolute root path and basic access notes.
Propose:
.agent/context/knowledge-vault.md), if any./Users/you/Obsidian/My Vault or D:\Obsidian\AI Research).Confirm whether (record the answer in the Vault Layout section of knowledge-vault.md, including the index folder, Indexes/ or vault root; other vault skills read it from there):
Record the path and a one-line access note.
Section B — Research & learning record conventions.
Explainer: Learning records and synthesis notes from
/teachand research must live in the vault with consistent naming and wikilinking so they are findable and connected.
Decide:
0001- prefix for sequenced records, or both.Learning Records/ folder, or co-located with source material).[[wikilinks]].Learning Records Index.md, topic Indexes like RAG Index.md).Section C — Source handling (PDFs, local files, links).
Explainer: Raw sources (PDFs you drop in, web articles saved as .md, transcripts) need companion notes so agents can cite, extract, and synthesize without mutating originals.
Confirm rules:
Paper.pdf → Paper Note.md (or Paper.md).[[Paper.pdf]] or ![[Paper.pdf]].pdftotext ...) or note that manual/highlight + paste is fine.RESOURCES.md entries can point to vault-local items (with annotation).Section D — Integration (teach, research, loops, engineering).
Explainer: Once configured, multiple skills will prefer the vault as the source of truth for personal knowledge and will emit durable records here.
Confirm / explain:
/teach will bridge its local learning records into vault form (wikilinked Title Case notes) when this config exists.research-from-vault will be the reusable discipline for synthesis from vault sources (PDFs + notes).agent-loop, /until-done) may reach research-from-vault for knowledge gaps and accept goals like "research X until synthesis is in the vault".domain-modeling, grill-with-docs, and decision-mapping Research tickets will consult vault sources first when available.Also note any maintenance loops the user wants (e.g. daily inbox processing).
Section E — Context graph (global + project overlay).
Explainer: The vault holds your global knowledge graph (wikilinks). A minimal context graph adds governance: what's still valid, why you believe it, and what agents did. Global context lives in the vault; project-specific overlay lives in this repo.
Confirm:
.agent/context/project-context.md (e.g. repo name or research project title).Indexes/Context Index.md (or Context Index.md at vault root if flat layout)Decision Traces/ folder (empty, for research/agent run audits)Research Sessions/, Findings/, Indexes/Research Index.md (research capture — see RESEARCH-CAPTURE-FORMAT in research-from-vault skill).agent/context/decision-traces/ in this repo for significant engineering loop runs..agent/context/decision-maps/ for /decision-mapping ideation artifacts.{vault}/{project}/Personal Notes/ for /project-notes (empty is fine).Explain the split:
{ProjectFolder}/Personal Notes/, {ProjectFolder}/Context Graph.canvas..agent/context/project-context.md, CONTEXT.md, ADRs, .agent/context/loops.md — what applies to this codebase.Agent read order: knowledge-vault.md → loops.md → project-context.md (all under .agent/context/, legacy fallback docs/agents/) → vault Context Index → wikilinks.
Show the user a draft of:
## Knowledge & Research (or subsection) block to add to CLAUDE.md / AGENTS.md..agent/context/knowledge-vault.md..agent/context/project-context.md (from templates/project-context-template.md).Let them edit before writing.
Pick the file to edit for the high-level pointer:
CLAUDE.md exists, edit it.AGENTS.md exists, edit it.Never create AGENTS.md when CLAUDE.md already exists (or vice versa).
If a ## Knowledge & Research block already exists, update in place. If ## Agent loops or ## Agent skills exists, you may nest as ### Knowledge & Research or keep as peer ## depending on user's preference.
The block (example):
## Knowledge & Research
Personal knowledge vault configuration, learning record placement, PDF/source handling, and research-from-vault flows. See `.agent/context/knowledge-vault.md`. External research ingestion can optionally use third-party tools like davidondrej research-and-web skills (installed separately by the user) feeding the vault.
Create .agent/context/ if missing. Write .agent/context/README.md from templates/context-readme-template.md.
Write .agent/context/knowledge-vault.md using knowledge-vault-template.md as the starting point, substituting the answers from the sections.
Write .agent/context/project-context.md using templates/project-context-template.md, substituting project name, vault path, and project folder slug.
If the user agreed to seed vault context files, write under the confirmed vault path:
Indexes/Context Index.md (or Context Index.md at root) from templates/context-index-template.mdDecision Traces/ directory (empty is fine)Research Sessions/, Findings/, and seed Indexes/Research Index.md (empty list is fine)If the user agreed to engineering decision traces, create .agent/context/decision-traces/ (empty .gitkeep or README stub is fine).
If the user agreed to decision mapping, create .agent/context/decision-maps/ (empty is fine).
If the user agreed to personal notes, create {vault}/{project-folder}/Personal Notes/ (empty is fine).
Point the user at the starter recipes in this skill folder:
After writing knowledge-vault.md, write the marker-delimited ## Vault write-back block from VAULT-WRITE-BACK.md into AGENTS.md (create it only if neither AGENTS.md nor CLAUDE.md exists), and into CLAUDE.md too if it exists. Idempotent: replace only the text between the markers if they're already there. This is what keeps the vault updated while the user works; /vault-sync catches anything missed.
Tell the user the setup is complete. Mention:
/teach will now bridge learning records into the vault (when configured).research-from-vault (reached by prose or loops) for synthesis from PDFs/notes..agent/context/project-context.md./loop + recipes (indexes, context graph, nightly inbox processing)..agent/context/knowledge-vault.md and .agent/context/project-context.md directly; re-run this skill only to restart configuration.If this repo already has code, docs, ADRs or plans worth knowing, recommend /seed-vault-from-repo next. It seeds the vault from the repo one unit at a time, with sources and commit cited.
Recommend running /setup-agent-loops (if not done) for engineering execution loops, and that the two compose well.
If the personal obsidian-vault skill exists, note that it remains the low-level implementation; this config + productivity skills provide the research/engineering layer on top.
Follow the Git section of AGENT-CONTEXT-PATH.md. In short:
.gitignore. Read it first. If # optimal-brain (personal) is already there, append just the missing lines below the existing block. Otherwise append the whole block at the end (>>, with a blank line before it), creating the file only if it doesn't exist. Never truncate, reorder, or regenerate the file (no > redirect, no full-file write):
# optimal-brain (personal)
.agent/context/knowledge-vault.md
.agent/context/project-context.md
.scratch/
If any of them is already tracked, tell the user to run git rm --cached <file>..agent/context/, the ## Agent skills block in AGENTS.md/CLAUDE.md, CONTEXT.md, and docs/adr/. Shared config gives every teammate and agent the same tracker, labels, and verification. The ignored files hold machine-specific vault paths. Don't commit for them..agent/context/knowledge-vault.example.md from templates/knowledge-vault-example-template.md (placeholder paths) so teammates can copy it to their own gitignored knowledge-vault.md.AGENT-CONTEXT-PATH.md (opens in a new tab)README.md (opens in a new tab)VAULT-WRITE-BACK.md (opens in a new tab)examples/setup-session.md (opens in a new tab)knowledge-vault-template.md (opens in a new tab)recipes/ingest-external-research-to-vault.md (opens in a new tab)recipes/ingest-sources-to-learning-records.md (opens in a new tab)recipes/maintain-context-graph.md (opens in a new tab)recipes/maintain-vault-indexes-and-links.md (opens in a new tab)recipes/research-topic-in-vault.md (opens in a new tab)templates/context-index-template.md (opens in a new tab)templates/context-readme-template.md (opens in a new tab)templates/decision-trace-template.md (opens in a new tab)templates/knowledge-vault-example-template.md (opens in a new tab)templates/note-provenance-format.md (opens in a new tab)templates/project-context-template.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (chidiokoene/optimal-brain) — no native marketplace selected
npx claudepluginhub p/chidiokoene-mattpocock-skills36 skills in this plugin
/agent-loopAgentic loop discipline. Use when the user wants to loop until done, iterate until tests pass, keep fixing until green, run until verification passes, or mentions red-green-refactor in an iterative fix context./ask-brainRouter for the whole optimal-brain pack: given a task, picks the single best skill or an ordered chain of skills, says why, and says what to skip. Use when the user is unsure which skill to use, asks what to do next or where to start, or describes a task without naming a skill./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./decision-mappingTurn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time. Use when the user has a fuzzy idea with many unknowns, asks what to figure out first, or wants a research-and-decide plan before committing./diagnosing-bugsDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow./domain-modelingBuild and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.