obsidian-second-brain
This Claude Code skill enables Claude to manage an Obsidian vault as an intelligent, self-updating knowledge base where new information automatically reconciles with existing notes rather than simply appending. Use it when you want to maintain a vault where Claude can read notes, intelligently update and rewrite pages based on new sources, and automatically resolve contradictions across your knowledge base. The skill supports multiple access methods including MCP servers and direct filesystem access, with optional SessionStart hooks and configuration through a `_CLAUDE.md` file that governs vault-specific behavior.
git clone https://github.com/eugeniughelbur/obsidian-second-brain ~/.claude/skills/obsidian-second-brainSKILL.md
# Obsidian Second Brain > Claude operates your Obsidian vault as a self-rewriting knowledge base. An evolution of [Karpathy's LLM Wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f): sources rewrite existing pages instead of just appending, contradictions reconcile automatically, and scheduled agents maintain the vault while you sleep. > Everything worth remembering gets saved. Every update propagates everywhere it belongs. --- ## Quick Start ### 0. Choose vault access method (in order of preference) Try these methods in order. Use the first one available: **Method 0 - SessionStart hook (if configured):** If `hooks/load_vault_context.py` is wired as a SessionStart hook in `~/.claude/settings.json`, `_CLAUDE.md` is injected into context automatically at session start. Skip step 1 below. To wire it: `bash scripts/setup.sh "/path/to/vault"` or run `/obsidian-setup`. **Method A - Direct filesystem (default, always works):** Use standard file tools (Read, Write, Edit, Glob) against the vault path. The vault is plain markdown, so every operation in this skill works this way with no setup. This is the normal path in Claude Code - the commands below use these tools directly. **Method B - MCP server (optional, mainly for non-Claude-Code clients):** This repo ships its own MCP server at `integrations/obsidian-mcp-server/` that exposes the vault as tools (`obsidian_search`, `obsidian_read_note`, `obsidian_save_note`, `obsidian_capture`, plus curator tools). It exists so other MCP clients - Hermes Agent, Claude Desktop, Cursor - can use the vault as a knowledge layer; in Claude Code itself, Method A is simpler and preferred. If those `obsidian_*` tools happen to be available in your client, you may use them instead of raw file tools. Setup lives in `integrations/obsidian-mcp-server/README.md` (it is `uv run --no-project --with 'mcp<2' python .../server.py` with `OBSIDIAN_VAULT_PATH` set, not an `npx` package). ### 1. First time in a vault → read `_CLAUDE.md` Before doing anything in a vault, check if `_CLAUDE.md` exists at the vault root and read it: ``` Read <vault>/_CLAUDE.md ``` If it exists: follow its rules exactly - they override the defaults in this skill. Where `_CLAUDE.md` is silent, fall back to the defaults below. If it doesn't exist: use the defaults in this skill, then offer to create one. If the SessionStart hook is active, `_CLAUDE.md` is already in context - skip this step. ### 2. First time with a new user → run discovery ``` Glob <vault>/**/*.md ``` Scan the structure to understand: folder names, template locations, naming conventions, frontmatter patterns. Then read 2-3 existing notes to calibrate writing style before creating anything new. ### 3. Bootstrap a new vault If the user has no vault yet, run: ```bash # One-line install + bootstrap (asks 3 questions: vault path, your name, preset) curl -sL https://raw.githubusercontent.com/eugeniughelbur/obsidian-second-brain/main/scripts/quick-install.sh | bash # Or manual: python scripts/bootstrap_vault.py --path ~/path/to/vault --name "Your Name" # With a preset: python scripts/bootstrap_vault.py --path ~/my-vault --name "Your Name" --preset executive python scripts/bootstrap_vault.py --path ~/my-vault --name "Your Name" --preset builder python scripts/bootstrap_vault.py --path ~/my-vault --name "Your Name" --preset creator python scripts/bootstrap_vault.py --path ~/my-vault --name "Your Name" --preset researcher # With assistant mode (maintaining vault for someone else): python scripts/bootstrap_vault.py --path ~/my-vault --name "Your Name" --mode assistant --subject "Boss Name" ``` Then just point the skill at the new vault path (Method A above). If you use the optional bundled MCP server, set `OBSIDIAN_VAULT_PATH` to the new path and restart the client. **Presets** customize the vault for different use cases: - **`executive`** - Decisions, people, meetings, strategic planning. Kanban: OKRs, Quarterly, Weekly. - **`builder`** - Projects, dev logs, architecture decisions, debugging. Kanban: Backlog, Sprint, Done. - **`creator`** - Content calendar, ideas pipeline, audience notes, publishing. Kanban: Ideas, Drafts, Published. - **`researcher`** - Sources, literature notes, hypotheses, methodology. Kanban: Reading, Processing, Synthesized. Default (no preset) gives a general-purpose vault. All presets use wiki-style by default. **Assistant mode** creates a `_CLAUDE.md` configured for operating a vault on behalf of someone else. See `references/claude-md-assistant-template.md`. See `references/vault-schema.md` for full structural details. --- ## Core Operating Principles ### AI-first vault rule (applies to every note) The vault is designed for **future agent** to read and reason over, not for human review. Every note Claude writes - across all 46 commands - must follow `references/ai-first-rules.md`: 1. **Self-contained context** - each note explains itself; don't rely on backlinks alone 2. **"For future agent" preamble** - 2-3 sentence summary so any compatible agent can decide relevance in 10 seconds 3. **Rich, consistent frontmatter** - `type`, `date`, `tags`, `ai-first: true`, plus type-specific fields (see `ai-first-rules.md` for schemas per note type) 4. **Recency markers per claim** - "Mem0 raised $24M (as of 2026-04, mem0.ai)" so future agent knows what to verify 5. **Sources preserved verbatim** - every external claim has its source URL inline 6. **Cross-links mandatory** - every person/project/idea/decision uses `[[wikilinks]]` 7. **Confidence levels** - `stated | high | medium | speculation` where applicable This rule lives in `_CLAUDE.md` Section 0 of every vault using this skill, and in `references/ai-first-rules.md` (the canonical specification with frontmatter schemas + preamble templates per note type). That path is relative to the install root, which is load-bearing: if it does not resolve from your working directory, search upward for it, and if you still can
Create a new obsidian-second-brain command via interview - zero markdown editing required
Surface 3-5 next-direction candidates by reading ungraduated ideas, open project questions, and orphan research notes - what is worth working on next
Vault-first source-grounded research via Gemini File Search. One command, no browser. The grounded parallel to /research-deep (which is open-web via Perplexity).
Generate a decision record when the vault structure changes - the vault knows why it knows what it does
Read Google Calendar and write an AI-first snapshot to the vault - today, week, next week, or a custom range
Scan a codebase and write a maintained set of architecture notes into the vault - overview, per-module notes, key decisions. Re-run to refresh without clobbering your edits
Show or update a kanban board - flags overdue items, updates from conversation
One calendar command with four modes - agenda (read a snapshot), reconcile (vault vs calendar gaps), meeting (event to note), schedule (task to event)