agentleFS
eugeniughelbureugeniughelbur/obsidian-second-brain/llms.txt

obsidian-second-brain

llms.txt4.7k starsChanged 4 months agoMITView on GitHub

An AI second brain for Obsidian - persistent memory for Claude Code, Grok Bot, and 6 other agents. Every note is designed for AI retrieval, not human reading. An evolution of Karpathy's LLM Wiki pattern (https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f): every source updates existing pages instead of just appending, contradictions reconcile automatically, and 4 scheduled agents maintain the vault while you sleep. Built as one platform-neutral codebase that compiles to Claude Code, OpenAI Codex CLI, Google Gemini CLI, OpenCode, Google Antigravity, Nous Research Hermes,…

  • Reads credentials

Trending

Less talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 5 mentionsAug 2026: 0 mentionsSep 2026: 3 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the eugeniughelbur/obsidian-second-brain repository that our weekly crawl found: only 12 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about eugeniughelbur/obsidian-second-brain

The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 12

Talked about on GitHub and Bluesky (12 times).

On GitHub · 11

6 more on GitHub

The file

We split this llms.txt into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If Karpathy's LLM Wiki is a knowledge base you maintain with an LLM, obsidian-second-brain is a knowledge base that maintains itself across …

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
llms.txt
# obsidian-second-brain

> An AI second brain for Obsidian - persistent memory for Claude Code, Grok Bot, and 6 other agents. Every note is designed for AI retrieval, not human reading. An evolution of Karpathy's LLM Wiki pattern (https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f): every source updates existing pages instead of just appending, contradictions reconcile automatically, and 4 scheduled agents maintain the vault while you sleep. Built as one platform-neutral codebase that compiles to Claude Code, OpenAI Codex CLI, Google Gemini CLI, OpenCode, Google Antigravity, Nous Research Hermes, Pi, and Grok Bot via a build-time adapter pattern. 45 commands span vault management, thinking tools, scheduled agents, and a research toolkit (live X posts via Grok, web research via Perplexity, YouTube transcripts, podcast episodes via RSS or Whisper, and vault-grounded synthesis via Gemini File Search), plus optional local+private semantic search, a write-time AI-first validator hook and a `/create-command` interview flow for user-built extensions. `/obsidian-architect` scans a codebase and writes maintained, self-refreshing architecture notes into the vault (so your code lives in the same brain as your ideas and decisions); `/research` + `/research-deep` run key-less by default with free fallback sources (optional Tavily/Brave sources and full-page reading when keyed); `/obsidian-brainstorm` interviews you one question at a time until an idea converges; and as of v0.13 ("The Open Standard") one spec-compliant Agent Skills build serves Codex CLI, OpenCode, Google Antigravity, and GitHub Copilot CLI from a single .agents/skills tree.

## What this is

obsidian-second-brain is an open-source skill (MIT license) for Obsidian users who use an AI CLI as their primary interface to their own knowledge. It treats the vault as a knowledge base optimized for AI retrieval rather than human reading. Every note follows an AI-first design rule: self-contained context, "For future agent" preamble, rich machine-readable frontmatter, recency markers per claim, sources preserved verbatim, mandatory wikilinks, and confidence levels.

The skill is platform-neutral. The same 45 commands run in Claude Code, OpenAI Codex CLI (native Agent Skills), Google Gemini CLI, OpenCode, Google Antigravity (via the unified `.agents/skills/` Agent Skills build), Nous Research Hermes (native skills), Pi, and Grok Bot (workflow SKILL.md files + MCP). One codebase compiles into all eight via `bash scripts/build.sh`.

Owner: Eugeniu Ghelbur. AI Automation Engineer at Single Grain.

## Why people use it

- Claude sessions start from zero every time. This skill solves that by storing context in the Obsidian vault and letting the AI read, write, and reason over it across sessions.
- Notes accumulate unconnected. This skill propagates every write across people, projects, kanban boards, and daily notes automatically.
- Research findings get lost. The research toolkit (8 commands) saves every X read, X pulse, web research (key-less by default), YouTube and podcast transcript, and vault-grounded synthesis directly to the vault as structured notes.
- Vaults are usually optimized for humans browsing in Obsidian. This skill treats the vault as an AI knowledge graph: the next compatible agent (Claude, Codex, Gemini, or another client) is the primary reader.
- Different AI users use different CLIs. The same vault works whether the user is on Claude Code, Codex CLI, Gemini CLI, OpenCode, Antigravity, Hermes, or Pi - no rewriting commands per platform.

## How this extends Karpathy's LLM Wiki pattern

Andrej Karpathy described an LLM Wiki pattern: drop sources into a folder, have an LLM read them, create wiki pages, and cross-reference entities and concepts so future questions are answered from the wiki rather than a fresh search. Reference: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f

obsidian-second-brain implements this pattern and extends it on six axes:

1. New sources rewrite existing pages instead of appending. When you ingest a YouTube video about a person already in your vault, the person's page gets updated. Stale claims get replaced. The vault stays current automatically.
2. Contradictions get reconciled, not just flagged. The /obsidian-reconcile command finds conflicts between notes and resolves them by checking sources, dates, and confidence levels.
3. Patterns get surfaced without prompting. The /obsidian-synthesize command scans the vault for unnamed recurring themes and writes synthesis pages on its own.
4. Maintenance is scheduled, not manual. 4 scheduled agents run nightly close, weekly review, contradiction sweep, and vault-health check.
5. Notes are written for AI retrieval. Every note has a "For future agent" preamble, machine-readable frontmatter, mandatory wikilinks, and recency markers per claim. Karpathy's pattern produces human-readable wiki pages; this produces AI-first notes.
6. Write-time enforcement. A `PostToolUse` hook (`validate-ai-first.sh`) inspects every Write or Edit on a markdown file inside the vault and warns when the AI-first rule is broken (missing frontmatter fields, missing preamble, broken YAML). The vault stays AI-first because every write is checked, not because the AI remembers all seven rules every time.

If Karpathy's LLM Wiki is a knowledge base you maintain with an LLM, obsidian-second-brain is a knowledge base that maintains itself across multiple AI CLIs.

## Long-form deep dive

The complete analysis of how this skill extends Karpathy's pattern, including the AI-First Vault Principle, comparison against existing implementations (rohitg00's LLM Wiki v2 from 2026-03, Penfield Labs' typed-link extension), and an engineering retrospective covering three bugs shipped in the first version of /research-deep:

- "I rebuilt Karpathy's LLM Wiki. Here's what's missing from the original." (2026-04-29). https://theaioperator.io/p/i-rebuilt-karpathys-llm-wiki-heres

## The 45 commands (organized by category)

**Vault (16)** - daily writing, capture, find, kanban, calendar, recurring obligations, recall:
obsidian-board, obsidian-board-hygiene, obsidian-calendar, obsidian-capture, obsidian-catchup, obsidian-daily, obsidian-find, obsidian-log, obsidian-person, obsidian-project, obsidian-projects, obsidian-recap, obsidian-recurring, obsidian-save, obsidian-task, obsidian-world. (obsidian-calendar uses the Google Calendar MCP connector, so it ships on Claude Code only; its agenda / meeting / schedule / reconcile modes consolidate the four former standalone calendar commands.)

**Thinking (14)** - synthesis, decisions, learning, reviews, panels, discovery, brainstorming:
obsidian-brainstorm, obsidian-challenge, obsidian-connect, obsidian-decide, obsidian-distill, obsidian-emerge, obsidian-graduate, obsidian-learn, obsidian-panel, obsidian-reconcile, obsidian-review, obsidian-synthesize, idea-discovery, vault-deep-synthesis. (obsidian-decide --formal absorbs the former standalone obsidian-adr.)

**Research (8)** - bring external sources into the vault:
obsidian-ingest, notebooklm, podcast, research, research-deep, x-pulse, x-read, youtube. Powered by xAI Grok (X + Live Search), Perplexity Sonar (web with citations), Google Gemini File Search (vault-grounded synthesis), youtube-transcript-api, and feedparser + optional OpenAI Whisper for podcasts.

**Meta (7)** - vault setup, health, structure, codebase docs, search quality, tooling:
obsidian-architect, obsidian-export, obsidian-health, obsidian-init, obsidian-retrieval-eval, obsidian-visualize, create-command.

Plus 4 scheduled agents (morning, nightly, weekly, health-check) and 3 hook scripts (`obsidian-bg-agent.sh` for PostCompact session propagation, `validate-ai-first.sh` for write-time AI-first enforcement incl. secret detection, and opt-in `obsidian-recall.py` for bounded per-prompt vault recall - max 4 notes, abstains on low confidence).

## Multi-platform architecture

The repo is structured around a build-time adapter pattern:

- `commands/` - 45 platform-neutral source files with frontmatter declaring `description`, `category` (vault/thinking/research/meta), `triggers_en` (natural-language trigger phrases), and an optional `exclude` (per-platform opt-out; the calendar command sets it to ship on Claude Code only). The schema is extensible to other languages via `triggers_es`, `triggers_it`, `triggers_fr`, `triggers_de`, `triggers_pt`, `triggers_ru`, `triggers_ja`.
- `adapters/lib.sh` - shared parsing, path rewriting, tool-name neutralization, grouped routing-table emission, multilingual trigger emission.
- `adapters/claude-code/adapter.sh` - identity copy (Claude Code's slash-command format matches the source).
- `adapters/codex-cli/adapter.sh` - emits `AGENTS.md` with auto-generated routing table grouped by category and trigger phrase reference grouped by language. Commands go under `.codex/commands/`.
- `adapters/gemini-cli/adapter.sh` - emits `GEMINI.md` with the same structure. Commands under `.gemini/commands/`.
- `adapters/opencode/adapter.sh` - emits `AGENTS.md`. Commands under `.opencode/commands/`.
- `adapters/hermes/adapter.sh` - emits Nous Research Hermes native skills.
- `adapters/grok-bot/adapter.sh` - emits Grok Bot / Sand workflow SKILL.md files + MCP.
- `adapters/pi/adapter.sh` - emits a Pi package (`package.json` + `.pi/`) with the same routing table.
- `scripts/build.sh` - orchestrator. Run with `--platform <name>` for one platform or no argument for all eight.

Output goes to `dist/<platform>/` (gitignored). Each `dist/<platform>/INSTALL.md` documents the install path for that CLI.

## /create-command interview flow

`/create-command` lets users build new commands without editing markdown. It runs a 9-phase conversation: intent, naming (kebab-case, validates no collision), category, trigger phrases, behavior steps, AI-first compliance gate, external API declaration, file generation, confirm + next steps. The generated `commands/<name>.md` lands AI-first-compliant by construction and flows through every adapter automatically. Closes the contribution loop: anyone can extend the skill without learning the frontmatter schema.

## Stack

- Python 3.10+ with uv for the research toolkit
- xAI Grok via the Agent Tools API (`/v1/responses`, `tools=[{"type": "x_search"}]`) for live X access
- Perplexity Sonar (sonar-pro for /research, sonar-reasoning-pro for /research-deep synthesis)
- youtube-transcript-api for free transcript extraction
- YouTube Data API v3 (free tier, optional) for video metadata + comments
- API keys stored Mac-locally at `~/.config/obsidian-second-brain/.env` with permissions 600
- bash 3.x compatible adapters (no associative arrays, no bashisms)

## The AI-first vault rule

The single most important design principle. Every note Claude writes must satisfy seven rules:

1. Self-contained context: each note explains itself; a future agent may pull it via search with no surrounding context
2. "For future agent" preamble: 2-3 sentence summary so the next agent can decide relevance in 10 seconds before parsing the note
3. Rich consistent frontmatter: type, date, tags, ai-first: true, plus type-specific fields per the schemas in `references/ai-first-rules.md`
4. Recency markers per claim: "Mem0 raised $24M (as of 2026-04, mem0.ai)" so future-Claude 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]]` so the graph is traversable
7. Confidence levels: `stated | high | medium | speculation` where applicable

The 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 and preamble templates per note type).

A `PostToolUse` hook (`hooks/validate-ai-first.sh`) enforces this at write time: it fires after every Write/Edit on a markdown file inside `OBSIDIAN_VAULT_PATH` and warns on missing fields or preamble. The original write is not reverted; the warning surfaces on stderr so the AI can repair the note in the same turn.

## Releases

- v0.15.0 (2026-09-04) "The Port": Windows support end to end (path-normalized write-time hook, USERPROFILE config home, CRLF/BOM frontmatter, UTF-8 research toolkit; by @motkoning in #243 and #248); Gemini-first /podcast with a free Groq Whisper fallback; write-time tag syntax check and opt-in taxonomy audit; Simplified Chinese triggers; /obsidian-reindex; the AI-First Lint Obsidian plugin; platform ownership (adapters/OWNERS.md); AI-FIRST.md pasteable spec; reproducible retrieval benchmark; generated docs site; typed edges and graph lint; Telegram sender allowlist; the callout form of the preamble; /obsidian-ingest confirms rewrites of existing notes. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.15.0
- v0.14.0 (2026-07-18) "The Harvest": 8 features mined from a sweep of all 408 forks, each credited to its fork - Brave Search source, fail-soft usage ledger covering Perplexity+Gemini, /youtube via Gemini free tier, Tavily Extract full-page reading in /research-deep, a guarded updater for copied builds, an external-engine eval mode, supersedes-aware search reranking, secret detection on vault writes, /obsidian-brainstorm (45th command, first stateful multi-turn thinking tool), bounded per-prompt vault recall (opt-in), and pt-BR triggers for all 45 commands. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.14.0
- v0.13.0 (2026-07-18) "The Open Standard": unified Agent Skills build - one .agents/skills tree serving Codex CLI, OpenCode, Google Antigravity, and GitHub Copilot CLI (installable via npx skills); Tavily as an optional research source; per-vault health-check excludes (.vault-config.json); seven-platform consistency across every surface; README Contributors section. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.13.0
- v0.12.0 (2026-07-11) "The Stress Test": a 4-lane adversarial audit (32 AI agents: every command file, hostile synthetic vaults, live retrieval quality, competitor teardown) produced 175 findings; ~160 closed across 24 PRs - data-safety hardening (atomic note writes, path-traversal guards), retrieval 2-4x better on paraphrase queries, folder-map + schema reconciliation, and a native Claude Code plugin-marketplace install. Test suite 30 -> 129+, 11 permanent CI fences. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.12.0
- v0.11.1 (2026-06-28) "Pi Coding Agent": Pi platform build - package.json + .pi/prompts/ + .pi/skills/ (contributed by @Gepetdo). https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.11.1
- v0.11.0 (2026-06-28) "The Retriever": keyword search fixed ~7x, optional local+private semantic layer fuses in for meaning-based recall, every command real-tested; ships the Hermes native-skills build and the MCP vault server. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.11.0
- v0.10.0 (2026-05-31) "The Architect": `/obsidian-architect` scans a codebase into maintained, self-refreshing architecture notes (sentinel-safe blocks never clobber hand-edits). Plus `/obsidian-calendar` reconciliation, `/vault-deep-synthesis`, `/idea-discovery`, `/obsidian-panel`, a Codex executable runner, a commit-decisions miner, and a substitution-character CI gate. 45 commands. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.10.0
- v0.9.0 (2026-05-31): Free, key-less mode for `/research` and `/research-deep` (free fallback sources, no API key needed). Google Calendar commands. Anti-fabrication and false-absence guards. First automated tests + CI. Opt-in background agent. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.9.0
- v0.8.0 (2026-05-15): `/notebooklm` rewritten on the Gemini File Search API (one HTTP call, no browser). https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.8.0
- v0.7.0 (2026-05-13): Multi-platform. 4 CLIs (Claude Code, Codex CLI, Gemini CLI, OpenCode) from one source via build-time adapter pattern. Command categorization with grouped dispatcher tables. Multilingual trigger schema (EN populated). Write-time AI-first validator hook. /create-command interview flow. https://github.com/eugeniughelbur/obsidian-second-brain/releases
- v0.6.0 (2026-04-26): Phase 2. AI-first rule wired into all 26 existing commands. New canonical spec at references/ai-first-rules.md. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.6.0
- v0.5.0 (2026-04-26): Phase 1. Research toolkit added. Five new commands. New layer in the architecture. https://github.com/eugeniughelbur/obsidian-second-brain/releases/tag/v0.5.0

## Install

### Claude Code (default - plugin marketplace)

```
/plugin marketplace add eugeniughelbur/obsidian-second-brain
/plugin install obsidian-second-brain@obsidian-second-brain
```

(Classic alternative: clone to ~/.claude/skills/obsidian-second-brain and run scripts/setup.sh.)

### Codex CLI / OpenCode / Google Antigravity / GitHub Copilot CLI (unified Agent Skills build)

```bash
git clone https://github.com/eugeniughelbur/obsidian-second-brain
cd obsidian-second-brain
bash scripts/build.sh --platform agent-skills
npx skills add ./dist/agent-skills -a codex -a opencode -a antigravity   # or cp -R dist/agent-skills/skills/. <vault>/.agents/skills/
```

One spec-compliant .agents/skills tree serves all four harnesses. To update a copied build later: `bash scripts/update-vault-integration.sh --vault /path/to/vault` (guarded: fast-forward pull, smoke-test gate, backup + rollback).

### Gemini CLI (classic)

```bash
bash scripts/build.sh --platform gemini-cli && cp -R dist/gemini-cli/. /path/to/your/vault/
```

Then start your CLI from the vault root. Each build produces a platform-specific dispatcher (`AGENTS.md` or `GEMINI.md`) with an auto-generated routing table mapping natural-language triggers to command files.

## Common questions

### How does this compare to Karpathy's LLM Wiki pattern?
This skill is an evolution of Karpathy's pattern. Karpathy's wiki appends new pages and cross-references on ingest. This skill rewrites existing pages, reconciles contradictions automatically (`/obsidian-reconcile`), surfaces unnamed patterns into synthesis pages (`/obsidian-synthesize`), runs 4 scheduled maintenance agents, writes notes in an AI-first format optimized for future-agent retrieval rather than human reading, and runs across seven AI CLIs from one codebase. See https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f for Karpathy's original gist.

### What is a Claude Code skill?
A Claude Code skill is a reusable behavior package for Anthropic's Claude Code CLI. It bundles slash commands, scripts, references, and operating instructions that Claude loads automatically. Skills give Claude domain expertise without prompt-engineering each session. This particular skill also compiles to non-Claude CLIs (Codex CLI, Gemini CLI, OpenCode, Google Antigravity, Hermes, Pi - including one unified Agent Skills build for the .agents/skills harnesses) via the adapter pattern.

### Does this work with Codex CLI, Gemini CLI, OpenCode, or Google Antigravity?
Yes. Run `bash scripts/build.sh --platform agent-skills` for one spec-compliant `.agents/skills/` tree that Codex CLI, OpenCode, Google Antigravity, and GitHub Copilot CLI all read (install via `npx skills add ./dist/agent-skills` or plain copy), or `--platform gemini-cli` / `hermes` / `pi` for those platforms' native builds.

### Does this work with Obsidian Sync?
Yes. The skill writes to your vault as standard markdown files. Obsidian Sync, iCloud, Syncthing, and Git-based sync all work without modification.

### Do I need API keys to use this?
Mostly no. The 37 non-research commands work without any API keys, and `/research` + `/research-deep` fall back to free key-less sources when no Perplexity key is set. The calendar command (`/obsidian-calendar`, all four modes) needs the Google Calendar MCP connector rather than an API key.

### How is this different from Notion AI or Mem?
Notion AI and Mem are closed-source SaaS products that own your data. This skill stores everything as plain markdown in your local Obsidian vault, with no vendor lock-in. The AI is on top of your data, not behind it.

### What is the AI-first design rule?
The principle that vault notes are written for future agents to retrieve and reason over, not for human reading. Notes have machine-readable structure, recency markers, mandatory wikilinks, and source URLs preserved verbatim. See `references/ai-first-rules.md` for the canonical specification.

### Is this safe to run on my existing vault?
Yes. The skill never deletes or modifies notes destructively without explicit confirmation. Existing notes are left as-is. New notes follow the AI-first rule. `/obsidian-health` flags pre-AI-first notes so you can update them on your own schedule.

### What does /research-deep do that /research doesn't?
`/research` runs a single Perplexity query and returns a dossier. `/research-deep` scans your vault first, identifies what you already know about the topic, spawns 3-5 targeted follow-up searches to fill only the gaps, and produces a delta report (what's new, what's confirmed, contradictions to resolve). Vault-first means you stop re-researching what's already in your notes.

### What does /create-command do?
Lets the user scaffold a new obsidian-second-brain command via interview. Zero markdown editing. A 9-phase conversation collects intent, name, category, trigger phrases, behavior steps, AI-first compliance status, and external API needs, then writes a fully-formed `commands/<name>.md` file. The new command flows automatically into all 6 platform builds on the next `bash scripts/build.sh`.

### What do the research commands cost?
Approximate per-call costs as of 2026-04: /x-read ~$0.05, /x-pulse ~$0.13, /research ~$0.04, /research-deep ~$0.40-$0.80, /youtube ~$0.04. Costs are tracked per call in `~/.research-toolkit/usage.log`. No hard caps; user is trusted to monitor.

## License

MIT. https://github.com/eugeniughelbur/obsidian-second-brain/blob/main/LICENSE

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.