second-brain-os README

The project's README from github.com/undefined-ui/second-brain-os. As one markdown file: README.md.

AI Second Brain

A knowledge base that an AI agent builds and maintains for you, in plain markdown files you own. Everything you read, watch and save gets turned into linked wiki pages, connected to everything already there, and you can ask it questions.

This repo is the full version of the guide: the concepts, the setup, the vault template, the agent skills, the scripts, and the resources. Free, no signup, nothing to install beyond Obsidian and an agent.

Read it on the web: undefined-ui.github.io/second-brain-os — the full guide with search and navigation, plus every vetted link in one filterable page.

The problem it solves

You save things with the intention of coming back. You never do. Bookmarks, screenshots, read-later queues and half-filled Notion pages accumulate without compounding, because filing and linking them is boring work that humans stop doing after two weeks.

Hand that work to an agent and the system stays alive. That is the whole idea.

Quickstart

One evening. Nine steps, each with a full page behind it.

# copy the starter vault, skills, commands and agents
git clone https://github.com/undefined-ui/second-brain-os.git
cp -r second-brain-os/vault-template ~/brain

mkdir -p ~/brain/.claude
cp -r second-brain-os/skills   ~/brain/.claude/skills
cp -r second-brain-os/commands ~/brain/.claude/commands
cp -r second-brain-os/agents   ~/brain/.claude/agents
cp -r second-brain-os/scripts  ~/brain/scripts

# the folder READMEs are for reading on GitHub, not for the agent
rm ~/brain/.claude/*/README.md ~/brain/scripts/README.md

cd ~/brain && claude

The scripts/ copy is what lets /metrics, /health and /graph-export run scripts/vault_stats.py and friends from inside the vault. On Windows, use python where this guide says python3: the python3 name usually resolves to the Microsoft Store stub and does nothing.

  1. Install Obsidian and open the ~/brain folder you just copied with "Open folder as vault"
  2. Set up Claude Code, in the terminal or the Code tab of the desktop app
  3. Connect over MCP if you want the agent to reach the vault from anywhere. Optional, skip it on day one
  4. Get interviewed for your CLAUDE.md instead of writing it by hand
  5. Set up the two layers: a wiki for what you know, projects for what you are doing
  6. Scope down to one project when you want to ship something
  7. Install the Web Clipper, clip an article to raw/, run /ingest
  8. Connect live data: calendar, email, chat
  9. Put maintenance on a schedule and wake up to a vault that filed itself

Then feed it ten more sources before judging it. The graph is not interesting at five pages and it is hard to look away from at fifty.

Full walkthrough: Setup.

How it works

   you                    raw/                 agent                 wiki/
 ┌───────┐          ┌──────────────┐      ┌────────────┐      ┌──────────────┐
 │ clip  │  ──────> │ articles     │ ───> │  ingest    │ ───> │ sources/     │
 │ save  │          │ transcripts  │      │  extract   │      │ concepts/    │
 │ dump  │          │ pdfs         │      │  link      │      │ entities/    │
 └───────┘          │ chat exports │      │  lint      │      │ synthesis/   │
                    └──────────────┘      └────────────┘      └──────────────┘
                                                │                     │
                                                │   ask anything      │
                                                └─────────────────────┘

Raw material is an archive you never read. The wiki is the artifact, written in plain language, one idea per page, densely linked. New sources update existing pages instead of piling up beside them, which is why the vault gets better as it grows rather than just bigger.

Alongside the wiki sits a project layer: one folder per project, each with its own CLAUDE.md and an Inputs / Process / Outputs / Feedback pipeline. The wiki holds what you know, the projects hold what you are doing, and they feed each other. The two layers covers why keeping them separate matters more than it sounds.

What is in here

Folder What it holds
docs/ The guide. Ten sections, from the concept to troubleshooting
docs/track-*/ Five compact tracks on the wider craft: graphs, Jev, harnesses, loops, evals
vault-template/ A starter vault: wiki structure, project pipeline, CLAUDE.md and page templates
skills/ 18 agent skills, one per workflow in the guide
commands/ 72 slash commands, scoped entry points into those skills
agents/ 6 subagents, four of them read-only by design
scripts/ Dependency-free Python for link checking, stats and graph export
resources/ Tools, repos, papers and reading worth your time
examples/ Real vaults and real output

The guide

Ten sections, 77 pages, written to be followed rather than skimmed. From the concept through setup, capture, structure, the graph, automation, retrieval, publishing, and what to do when each of them breaks.

Section What it covers
Concepts what the pattern is and why the old note systems died
Setup Obsidian, Claude Code, CLAUDE.md, MCP, projects, git
Ingestion articles, video, PDFs, chat exports, voice, backfilling
Structuring page types, linking rules, schema, contradictions
Graphs what the graph is for, typed links, GraphRAG, metrics
Agents roles, schedules, hooks, guardrails
Retrieval query patterns, search, context budget
Outputs writing, reports, publishing, learning
Maintenance linting, review cadence, git, privacy, scaling
Troubleshooting the failures everyone hits, with fixes

The tracks

Everything above is the second brain. The tracks are the wider craft of building with agents — separate subjects, deliberately compact: eight or nine pages each, current as of September 2026, and every one ends in a hands-on build you can finish in an evening.

Track What it covers The build
Knowledge graphs GraphRAG, extraction pipelines, stores, wikilinks-as-graph a queryable graph layer over your own vault
Jev engineering System One models: typed decisions with confidence instead of text a confidence-gated router, ready for Jev when access lands
Agent harnesses the loop, tools, context engineering, MCP, the landscape a working harness in ~150 lines
Loop engineering stop conditions, critics, context hygiene, unattended runs an overnight loop with a ratchet and a morning report
Eval engineering golden sets, LLM judges, agent trajectories, CI gates your first eval suite, wired into CI

Read them on the site: tracks on undefined-ui.github.io.

Design decisions

This setup is opinionated. The three rules that matter most, and why:

Nothing is ingested until it is linked. A page that lands unconnected is invisible within a week. Linking is the entire value, so it happens in the same run or the ingest is not finished.

Contradictions are recorded, never overwritten. When a new source disagrees with a page, both positions stay, with dates and sources. The history of what you believed and why is the one thing your vault has that a search engine does not.

No vector database until you need one. A personal corpus is small and already structured. Structured pages plus links answer questions that chunk similarity cannot, at zero infrastructure cost. When RAG earns its place covers the threshold.

Who this is for

Anyone who reads a lot and retains less than they want to: researchers, engineers, writers, students, people who watch three hours of technical video a week and remember none of it.

It is not for team wikis, it is not a Notion replacement, and it will not organise a vault you never add to.

Portability

Everything here is markdown files, wikilinks and SKILL.md files. It works with Claude Code, and with any agent that reads files. Obsidian is a viewer for the graph, not a dependency. If you walk away from every tool named in this repo, you keep the folder and everything in it.

Learning materials

The source document, and the research behind the design decisions in this guide.

Source What it gives you
Karpathy's llm-wiki gist (4 Apr 2026) The pattern everything here builds on. Short, written as an idea file to paste into your agent rather than as a spec. Read it first.
From Local to Global: GraphRAG arXiv:2404.16130 Why chunk retrieval fails on questions about a whole corpus, which is exactly what people want from a second brain. Code: microsoft/graphrag.
HippoRAG arXiv:2405.14831 Graph retrieval with personalised PageRank for multi-hop questions. The closest published analogue of an agent walking links outward.
Lost in the Middle arXiv:2307.03172, TACL The empirical reason not to paste your whole vault into context, and the basis for the context budget rules.
Andy Matuschak's notes Evergreen notes, written in public. Also the strongest argument against this approach: if the writing is the thinking, delegating it means not doing it.
How to Take Smart Notes (Ahrens) Zettelkasten. Atomic notes and dense linking still hold; the manual labour is what killed it for most people.
Building a Second Brain (Forte) Where the term comes from, and PARA. Most of the book is about maintenance work an agent removes.

Full notes: reading.md and papers.md.

Tools and plugins

Obsidian plugins ranked by installs from the official community stats, September 2026. The full catalog is in plugins.md and tools.md.

Purpose Pick Installs
Agent in the editor Claudian 2.0M
Agent in the editor Copilot 1.8M
Suggests links Smart Connections 1.2M
MCP access Local REST API with MCP 712K
Queries over frontmatter Dataview 4.9M
Templates Templater 5.5M
Version control Git 3.1M
Migrating in Importer 1.6M
Broken links and orphans Find unlinked files 225K
Flashcards from notes Spaced Repetition 592K
Structured mind-map ExcaliBrain 336K
Interactive graph Juggl 136K

Outside Obsidian: Web Clipper for capture, Claude Code for maintenance, yt-dlp and OCRmyPDF for processing, ripgrep, NetworkX, Kuzu and Gephi for the graph, and Quartz to publish.

Skills and other implementations

This repo ships 18 skills, 72 commands, 6 subagents and 4 scripts: one skill per workflow in the guide, and a command for every scoped version of it you would actually run.

Other implementations, counted the same way. A repo shipping sixteen skills counts as sixteen. Stars from the GitHub API, September 2026.

Repo Stars Ships
AgriciDaniel/claude-obsidian 14.7K 16 skills, 3 subagents, role presets
Astro-Han/karpathy-llm-wiki 2.2K 1 skill covering ingest, compile, query, lint
ballred/obsidian-claude-pkm 1.9K 13 skills, 4 subagents, full starter kit
coleam00/second-brain-starter 768 1 skill that interviews you first
NicholasSpisak/second-brain 704 4 skills, npm installer
eugeniughelbur/obsidian-second-brain small 47 commands, works across three agents
micuintus/llm-wiki small 1 skill, deliberately minimal

Where the format itself is defined: anthropics/skills (20 skills), obra/superpowers (14), VoltAgent/awesome-agent-skills (index of 1,000+). Notes on each: skills.md.

Graph, RAG and memory repos

Purpose Repo Stars
Build a graph from any folder Graphify 116K
Graph RAG, incremental LightRAG 39K
Graph RAG, reference microsoft/graphrag 36K
Graph RAG, readable nano-graphrag 4.0K
Multi-hop retrieval HippoRAG 4.0K
The landscape Awesome-GraphRAG 2.6K
Agent memory mem0 65K
Temporal knowledge graphs graphiti 31K
Graph plus vector memory cognee 31K
MCP server index awesome-mcp-servers 95K

Alternative homes for a vault, from Logseq to AFFiNE, plus RAG frameworks and AI-native note apps: repositories.md and tools.md.

Contributing

Corrections, resources and real examples are welcome. Read CONTRIBUTING.md first: every factual claim needs a primary source, and tool listings need a reason to exist.

Credit

The LLM wiki pattern is Andrej Karpathy's, published as a gist on 4 April 2026. This repo is one implementation of it, plus the parts the gist deliberately leaves undefined.

MIT licensed.

second-brain-os (undefined-ui/second-brain-os)

Searching Database…

这是什么东西?一个由 AI 智能体替你搭建和维护的知识库,全部是你自己拥有的纯 markdown 文件:你读过的、看过的、收藏的内容都会变成互相关联的 wiki 页面,可以随时查询。这个仓库里包含完整指南、一个起步 vault、智能体技能和脚本。
这是一个要安装的应用吗,还是别的东西?不是应用:它是一份 77 页的指南,加上可以直接使用的资料——一个起步 vault、18 个智能体技能、72 个斜杠命令、6 个子智能体,以及不依赖第三方库的 Python 脚本。除了 Obsidian 和一个智能体之外,没有任何需要安装的东西。
我该怎么搭建?把 vault-template 复制到 ~/brain,然后在 Obsidian 里用「Open folder as vault」打开,设置好 Claude Code,再按九个步骤一步步做:CLAUDE.md 访谈、wiki 和项目两层结构、Web Clipper 加 /ingest。指南预计花一个晚上。
除了 Obsidian 和 Claude Code,我还需要别的东西吗?可选的 MCP 连接可以以后再说。脚本需要 Python,而且在 Windows 上必须用 python 而不是 python3 来调用——python3 这个名字通常指向微软商店的占位程序,运行了也不会有任何效果。
如果我不再添加新内容,它还会继续自我整理吗?不会——对于一个你从不往里添加内容的 vault,它不会去整理,而且它也不是 Notion 的替代品或团队 wiki。指南里说,只有五页内容的时候图谱没什么可看的,所以先喂给它大约十个来源再下判断。
我是不是被绑死在 Claude Code 和 Obsidian 上了?不是。所有东西都是 markdown 文件、wikilink 和 SKILL.md 文件,所以任何能读文件的智能体都能用,Obsidian 只是查看图谱的一个工具。就算把所有工具都换掉,整个文件夹连同里面的内容仍然归你。
所有内容都只存在我自己的电脑上吗?是的:都是你自己 vault 文件夹里的纯 markdown 文件,不需要注册,也没有任何托管服务。指南的维护章节在讲 git 和扩展性的同时,也讲了隐私。
我自己的 vault 用它是免费的吗?是的——免费、无需注册,而且采用 MIT 许可证,你也可以 fork 或修改整套配置。
它为什么拒绝使用向量数据库?指南的论点是:个人语料规模不大,而且本身已经有结构——结构化的页面加链接能回答按相似度切块回答不了的问题,而且不产生任何基础设施成本。指南里有一整节专门讨论 RAG 到什么程度才真正值得用。
当新来源和已有页面内容矛盾时会怎样?矛盾会被记录下来,绝不直接覆盖:两种说法都保留在页面上,并标注日期和来源。 vault 比搜索引擎多出来的,正是这份「你曾经相信什么、为什么」的历史。
新材料是怎么进入 vault 的?你用 Obsidian Web Clipper 把文章剪藏到 raw/,然后运行 /ingest;导入章节讲了文章、视频、PDF、聊天记录、语音以及补录旧内容。在新页面和已有页面建立链接之前,它不算真正导入完成。
wiki 层和项目层有什么区别?wiki 存放你知道的东西:一个页面一个想法,链接密集,新来源是更新已有页面,而不是不断堆积。项目层存放你正在做的事:每个项目一个文件夹,有自己的 CLAUDE.md 和一套 Inputs / Process / Outputs / Feedback 流程,两层互相支撑。
Size
0.6 MB
Stars
1.1K
Updated
CommitOct 14
Age
1mo
Commits · 90 Days