Claude Second Brain

Claude Second Brain

Fastest way to scaffold your LLM powered personal knowledge base - Obsidian, Claude Code, qmd, Github

188 Stars
GitHubReport listing

:classical_building: claude-second-brain

Your notes don't compound. This wiki does.

npm License: MIT Ask DeepWiki

Getting started · Skills · CLI · How it works

Drop in an article, PDF or note. Your AI agent reads it, files it into a cross-linked wiki, and answers questions about it months later with citations.

Inspired by Andrej Karpathy's approach to LLM-powered knowledge management: give an LLM agent an "idea file" and let it build and maintain your knowledge base.

npx claude-second-brain

Needs Node 22+ and an agent that supports Agent Skills. Obsidian is optional.

Running npx claude-second-brain: answer four prompts, and it installs dependencies, registers search, installs skills and initializes git

What you get

  • A wiki your agent maintains. Summaries, topic pages, cross-links and contradiction flags, written for you.
  • Local search across everything, powered by qmd.
  • An Obsidian vault with graph view, backlinks and git sync already set up. Read it on your phone through iCloud.
  • Plain git as the source of truth: GitHub, Cloudflare Artifacts, or any remote.

Obsidian graph view of a running wiki

Quickstart

  1. Create a brain. Run npx claude-second-brain and answer four prompts.
  2. Build the search index. Run csb reindex. The first run downloads about 2GB of models, once per machine.
  3. Add a source. Save an article to raw-sources/articles/ and run /brain-ingest in your agent.
  4. Ask. Run /brain-search with a question and get an answer that cites your wiki pages.

The setup guide covers each prompt, git remotes and Obsidian.

Skills

SkillWhat it does
/brain-ingestRead a source and fold it into the wiki
/brain-rememberSave decisions and learnings from the current conversation
/brain-searchAnswer a question with citations
/lintFind broken links, orphans and contradictions
/brain-refreshRe-index after edits
/brain-rebuildRedesign the search index (destructive)

Works with Claude Code, Codex, Cursor, GitHub Copilot and 11 more agents.

How it works

Your sources go in on the left. Your brain in the middle is a wiki your agent writes and cross-links, with qmd indexing it for search. Any agent on the right can read and grow it, and because the vault is a git repo, Obsidian and every device see the same files.

Articles, PDFs, notes, Obsidian and Git feed your brain (wiki + qmd), which Claude Code, Codex, Cursor, Copilot and Gemini all work with

More in How it works and the wiki schema.

CLI

csb create <name>                 # create another brain
csb ls                            # list your brains
csb use <name>                    # switch the default brain
csb skills --agent codex,cursor   # install skills for more agents
csb lint                          # check wikis for broken links and orphans
csb reindex                       # refresh the qmd search index
csb upgrade                       # update a brain to this release
csb doctor                        # check tools, config and skills

csb comes with npm i -g claude-second-brain. Every command is in the CLI reference.

License

MIT

Related

How to Install

  1. Download the ZIP or clone the repository
  2. Open the folder as a vault in Obsidian (File → Open Vault)
  3. Obsidian will prompt you to install required plugins

Stats

Stars

188

Forks

27

License

MIT

Last updated 3h ago

Categories

Tags

aiampclaude-codecodexcursorgithubknowledge-baseknowledge-graphknowledge-managementllmobsidianqmdsecond-brain