How eugeniughelbur/obsidian-second-brain works
1. What this repository is
This is not an application with a server or UI; it is a Claude Code skill pack for operating an Obsidian vault as a live knowledge system. The repo defines command prompts, bootstrap scripts, and agent hooks that orchestrate how Claude reads, writes, audits, and rewrites the vault.
2. Primary runtime boundary
The main boundary is between Claude’s runtime and the Obsidian vault filesystem. Claude executes named commands from commands/, then reads and mutates markdown files inside the vault. The vault is treated as the persistent system of record, while Claude is the agent that interprets and updates it.
3. Command layer
The commands/ directory is the core interaction surface. Each markdown file maps to a high-level capability such as saving (obsidian-save), ingesting external material (obsidian-ingest), synthesis and reconciliation (obsidian-synthesize, obsidian-reconcile), daily operations (obsidian-daily, obsidian-log, obsidian-review), and thinking tools (obsidian-challenge, obsidian-connect, obsidian-emerge, obsidian-graduate). Architecturally, these are separate workflows that read from the same vault but serve different user intents.
4. Context-loading subsystem
commands/obsidian-world.md is the context engine. The README describes it as loading identity and state with progressive token budgets. In architecture terms, this is the session bootstrap boundary: it determines what Claude knows before it starts doing vault work, and it likely anchors every other command to a consistent user/world model.
5. Vault layout and data model
The README describes a vault structure with a clear split between immutable source material and mutable working knowledge:
- raw/ holds original inputs and is treated as immutable.
- wiki/ holds Claude-managed notes such as entities, concepts, projects, daily notes, logs, reviews, tasks, and decisions.
- boards/ and templates/ support operational views and note generation.
- index.md, log.md, SOUL.md, and CRITICAL_FACTS.md are global navigation/state files.
This is the central data architecture: sources flow into the vault, then get redistributed into entity/concept/project pages.
6. Ingestion and rewrite flow
/obsidian-ingest is the most important write path. The README describes a pipeline where a source such as a URL, PDF, audio file, or screenshot is ingested, stored in raw/, then used to rewrite multiple downstream pages: entity pages, concept pages, synthesis pages, daily notes, and indexes. This is a key architectural idea: the system is not append-only note capture; it is a self-revising knowledge graph in markdown form.
7. Operational maintenance flow
Several commands exist to keep the vault coherent over time:
- obsidian-reconcile handles contradictions.
- obsidian-health audits stale claims, gaps, or orphan notes.
- obsidian-synthesize surfaces patterns across sources.
- obsidian-export provides a clean snapshot for other tools.
These form the maintenance subsystem, ensuring the vault stays consistent and useful rather than accumulating dead notes.
8. Thinking-tools subsystem
obsidian-challenge, obsidian-emerge, obsidian-connect, and obsidian-graduate are distinct from capture/maintenance commands. They do not just store information; they apply the vault as an inference engine:
- challenge pushes back using prior history,
- emerge finds latent patterns,
- connect bridges unrelated domains,
- graduate turns fragments into executable projects.
Architecturally, these commands read across the same note graph but produce higher-level synthesis and decision support outputs.
9. Automation and background agents
The repo includes hooks/obsidian-bg-agent.sh plus references to scheduled agents in the README. The background hook runs after context compaction, and scheduled jobs handle morning, nightly, weekly, and health routines. This creates an always-on maintenance layer outside interactive command execution, so the vault evolves even when the user is not actively prompting it.
10. Bootstrap and provisioning
install.sh, scripts/setup.sh, and scripts/bootstrap_vault.py are the provisioning path. They initialize the vault structure, choose a preset, and generate initial files like _CLAUDE.md, index.md, and log.md. This is where the repo turns from a set of prompts into a concrete vault instance. The bootstrap script is also where the preset-specific folder structure and board style are selected.
11. Validation and health tooling
scripts/vault_health.py provides a programmatic audit path, complementing the markdown-based obsidian-health command. Together they suggest a split between manual/LLM-driven operations and scripted verification. That makes the system more than a note template repo: it includes correctness checks for the vault’s state.
12. Reference and governance layer
The references/ folder contains schemas, templates, and write rules. This is the repository’s policy layer: it defines how notes should be structured, how Claude should write into the vault, and what canonical formats exist. architecture.md and SKILL.md likely document the intended operating model for the skill itself, making the repo self-describing and easier to extend.
13. Technology profile
The implementation is lightweight and filesystem-centric:
- Markdown for commands, templates, and vault content
- Python for bootstrap and health scripts
- Bash for install/setup and background hooks
- Obsidian as the note environment
- Claude Code as the execution agent
There is no evidence of a web server, database, or client app; the repository’s “architecture” is primarily about orchestration of files, prompts, and scheduled automation.
14. How to diagram it
A correct architecture diagram should show:
- the user and Claude at the top as the interactive agent layer,
- commands/ as the capability router,
- hooks/ and scheduled agents as the background automation layer,
- scripts/ and install.sh as provisioning/health tooling,
- the Obsidian vault as the persistent data store,
- raw/ separated from wiki/ as immutable vs mutable storage,
- index.md, log.md, and CRITICAL_FACTS.md as global state and entry points.
The main flow is: input or session context in → command execution → vault reads/writes → synthesis/reconciliation/index updates → background maintenance keeps it coherent.
Main entry points: commands Commands · obsidian-ingest.md Capture & ingest · references References · obsidian-synthesize.md Synthesis & health
Components 19
Interactive layer
Claude executes named commands against the vault during sessions.
- Claude · Interactive agent that interprets commands and mutates the vault.
- Commands · Primary capability surface for vault workflows.
commands - World setup · Loads identity, state, and token-budgeted context before other work.
commands/obsidian-world.md - Capture & ingest · Brings external material in and rewrites downstream notes.
commands/obsidian-ingest.md - Save & init · Creates or updates core vault state and initial note structure.
commands/obsidian-save.md - Daily ops · Daily logging, recap, and review workflows for ongoing work.
commands/obsidian-daily.md - Synthesis & health · Reconciles contradictions, audits staleness, and extracts patterns.
commands/obsidian-synthesize.md - Thinking tools · Challenge, connect, emerge, and graduate as higher-order reasoning commands.
commands/obsidian-challenge.md - Ops views · Boards, visualize, find, export, and related operational views over the vault.
commands/obsidian-board.md
Automation layer
Background hooks and scheduled routines keep the vault coherent.
- Bg agent · Post-compaction hook that continues maintenance outside interactive sessions.
hooks/obsidian-bg-agent.sh
Provisioning & checks
Install, bootstrap, and validation scripts that create and audit the vault.
- Setup chain · Install and setup scripts that provision the repo and select presets.
install.sh - Bootstrap vault · Generates the initial vault structure and starter files.
scripts/bootstrap_vault.py - Vault health · Programmatic audit of vault state and structural correctness.
scripts/vault_health.py
Vault data model
Persistent Obsidian storage split into immutable sources and mutable knowledge.
- Vault system · Persistent Obsidian filesystem treated as the system of record.
- Raw inputs · Original captured material kept as immutable source data.
- Wiki notes · Claude-managed entities, concepts, projects, tasks, decisions, and notes.
- Global state · Core entry and state files such as index, log, soul, and critical facts.
Policy & docs
Repository documentation and writing rules that define operating behavior.
- References · Schemas, templates, and write rules that govern note structure and behavior.
references - Repo docs · README, skill spec, and architecture notes describing intended operation.
README.md
Connections 28
- Claude → Commands: executes · Claude selects a command to perform a vault workflow.
- Commands → World setup: bootstraps · Every session begins with shared context loading.
- Commands → Capture & ingest: captures · External material enters through ingestion workflows.
- Commands → Save & init: writes · Core save/init workflows update the vault state.
- Commands → Daily ops: operates · Daily logging and review routines run as named commands.
- Commands → Synthesis & health: maintains · Synthesis, reconciliation, export, and health keep the vault coherent.
- Commands → Thinking tools: reasons · Higher-order commands transform the vault into an inference engine.
- Commands → Ops views: renders · Navigation and analysis views expose the vault state.
- World setup → Vault system: loads context · Session bootstrap reads vault state before other work.
- Capture & ingest → Raw inputs: stores source · Original inputs are preserved in the immutable raw area.
- Capture & ingest → Wiki notes: rewrites · Ingested material updates entity, concept, and project notes.
- Capture & ingest → Global state: updates index · Ingestion can refresh global navigation and state files.
- Save & init → Vault system: creates structure · Initial save/init steps establish the vault layout.
- Daily ops → Global state: refreshes · Daily operations update logs and recurring state.
- Synthesis & health → Wiki notes: audits & reconciles · Maintenance scans notes for contradictions, gaps, and staleness.
- Thinking tools → Wiki notes: reads across · Reasoning workflows traverse the note graph for synthesis.
- Bg agent → Synthesis & health: continues · Background automation keeps maintenance running after compaction.
- Bg agent → Vault health: checks · Hooked automation can trigger health verification.
- Setup chain → Bootstrap vault: provisions · Install/setup scripts delegate vault initialization to bootstrap logic.
- Bootstrap vault → Vault system: initializes · Bootstrap creates the vault directories and starter files.
- Vault health → Vault system: audits · Validation inspects vault structure and consistency.
- References → Bootstrap vault: constrains · Schemas and rules shape how bootstrap and note generation behave.
- References → Commands: guides · Write rules and templates inform command behavior.
- Repo docs → References: describes · Repository documentation explains the policy and operating model.
- Repo docs → Commands: explains · Documentation frames the command ecosystem and workflows.
- Vault system → Raw inputs: separates · The vault model distinguishes immutable sources from managed notes.
- Vault system → Wiki notes: separates · The vault model distinguishes immutable sources from managed notes.
- Vault system → Global state: anchors · Global state files serve as navigation and identity anchors.