{"id":48753348,"url":"https://github.com/jessepinkman9900/claude-second-brain","last_synced_at":"2026-04-20T01:10:31.242Z","repository":{"id":350770925,"uuid":"1208153223","full_name":"jessepinkman9900/claude-second-brain","owner":"jessepinkman9900","description":"Fastest way to scaffold your LLM powered personal knowledge base - Obsidian, Claude Code, qmd, Github","archived":false,"fork":false,"pushed_at":"2026-04-19T23:26:40.000Z","size":5248,"stargazers_count":33,"open_issues_count":3,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T23:36:45.940Z","etag":null,"topics":["ai","amp","claude-code","codex","cursor","github","knowledge-base","knowledge-graph","knowledge-management","llm","obsidian","obsidian-vault","qmd","second-brain"],"latest_commit_sha":null,"homepage":"https://jessepinkman9900.github.io/claude-second-brain/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jessepinkman9900.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-11T22:23:12.000Z","updated_at":"2026-04-19T23:26:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jessepinkman9900/claude-second-brain","commit_stats":null,"previous_names":["jessepinkman9900/obsidian-agent-wiki","jessepinkman9900/claude-second-brain"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/jessepinkman9900/claude-second-brain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessepinkman9900%2Fclaude-second-brain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessepinkman9900%2Fclaude-second-brain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessepinkman9900%2Fclaude-second-brain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessepinkman9900%2Fclaude-second-brain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessepinkman9900","download_url":"https://codeload.github.com/jessepinkman9900/claude-second-brain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessepinkman9900%2Fclaude-second-brain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32028578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"ssl_error","status_checked_at":"2026-04-20T00:17:31.068Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","amp","claude-code","codex","cursor","github","knowledge-base","knowledge-graph","knowledge-management","llm","obsidian","obsidian-vault","qmd","second-brain"],"created_at":"2026-04-12T22:21:34.896Z","updated_at":"2026-04-20T01:10:31.231Z","avatar_url":"https://github.com/jessepinkman9900.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# :classical_building: claude-second-brain\n\n**Your notes don't compound. This wiki does.**\n\n[![npm](https://img.shields.io/npm/v/claude-second-brain)](https://www.npmjs.com/package/claude-second-brain) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/jessepinkman9900/claude-second-brain)\n\n\nThe fastest way to start your personal knowledge base powered by Obsidian, Claude Code, qmd, and GitHub.\n\n\n```\nnpx claude-second-brain\n```\n\nOne command gives you a fully wired knowledge system:\n- [Claude](https://claude.ai/) ingests your sources and maintains a cross-linked wiki\n- [qmd](https://github.com/tobi/qmd) powers local semantic search\n- The scaffolded folder **is your Obsidian vault** — open it directly in [Obsidian](https://obsidian.md), with [obsidian-git](https://github.com/Vinzent03/obsidian-git) pre-configured for seamless sync\n- GitHub is the source of truth — version history, anywhere access, and a backup you control\n\nYou've been reading papers, articles, and books for years. Drop a source in, run `/brain-ingest`, and Claude reads it — extracts what matters, cross-links it to everything you already know, and files it. Ask a question six months later and get cited answers, not a list of files to re-read.\n\n\u003e **Inspired by [Andrej Karpathy's approach to LLM-powered knowledge management](https://x.com/karpathy/status/2040470801506541998?s=20)** — share an \"idea file\" with an LLM agent and let it build and maintain your knowledge base.\n\n![Obsidian graph view of a running wiki](image.png)\n\n---\n\n\n## How this is different\n\nThis is not a RAG system. It's not a chatbot over your notes. It's an actively maintained, cross-linked wiki — five structured page types, YAML frontmatter, and a set of Claude Code skills that run the whole thing.\n\n\nThe schema (`CLAUDE.md`) is that idea file. Claude reads it every session.\n\n---\n\n## The stack\n\n| Tool | Role |\n|---|---|\n| **Claude Code** | Reads sources, writes wiki pages, cross-links, flags contradictions |\n| **qmd** | Local hybrid search (vector + BM25) across your entire wiki |\n| **Obsidian** | Graph view, backlinks, mobile reading — offline, no extra sync |\n| **GitHub** | Source of truth — version history, Claude Code anywhere, Obsidian sync |\n\nEverything is pre-configured. You bring the sources.\n\n---\n\n## Get started in 3 steps\n\n**Step 1 — Scaffold**\n\n```bash\nnpx claude-second-brain\n```\n\nOr install globally — `csb` is a shorter alias:\n\n```bash\nnpm i -g claude-second-brain\ncsb\n```\n\nThe CLI will ask:\n- **Brain name** — what to call this brain (default: `my-brain`)\n- **GitHub repo** — optionally create a private repo and push automatically (requires `gh` CLI)\n\nCreates the brain at `~/.claude-second-brain/my-brain/`, registers it in `~/.claude-second-brain/config.toml`, installs `mise` + `node` + `pnpm`, runs `pnpm install`, and `git init`.\n\n**Step 2 — Generate vector embeddings**\n\n```bash\ncd ~/.claude-second-brain/my-brain\npnpm qmd:reindex\n```\n\nFirst run downloads ~2GB of GGUF models — once per machine. qmd collections are already registered by the CLI during scaffolding.\n\n**Step 3 — Open in Obsidian (and push to GitHub if not done)**\n\n**If you created a GitHub repo during setup**, it's already pushed — skip straight to opening in Obsidian.\n\n**If you skipped GitHub during setup**, connect it now:\n\n```bash\ngit remote add origin https://github.com/you/my-brain.git\ngit push -u origin main\n```\n\nOpen `~/.claude-second-brain/my-brain/` as a vault in Obsidian — the folder is already a valid Obsidian vault. The Git plugin is pre-configured — enable it and sync is automatic.\n\n---\n\n## Claude Code skills included\n\nThe wiki ships with a set of slash commands that cover the full workflow. No manual prompting, no copy-pasting.\n\n### Daily workflow\n\n**`/brain-ingest`** — Drop a file into `raw-sources/articles/`, `raw-sources/pdfs/`, or `raw-sources/personal/`. Run `/brain-ingest`. Claude summarizes the source, asks what matters most to you, creates a `wiki/sources/` page, updates or creates related topic pages, flags any contradictions with existing knowledge, and logs everything.\n\n**`/brain-search`** — Ask anything about what you know. Claude runs hybrid semantic search across the wiki, reads the most relevant pages, and writes an answer with inline `[[wiki/page]]` citations. If the answer synthesizes multiple pages in a novel way, it offers to file it as a permanent `wiki/qa/` entry.\n\n**`/lint`** — Health-check the wiki. Surfaces orphan pages, broken links, unresolved contradictions, and data gaps. Reports findings and applies fixes where possible.\n\n### Maintenance\n\n**`/brain-refresh`** — Re-scan the vault for new or changed files and regenerate vector embeddings. Run after a bulk ingest session or manual edits. Pass `force` to re-embed every chunk (e.g. after changing the embedding model).\n\n**`/brain-rebuild`** — **Destructive.** Redesigns the qmd schema: analyzes the wiki, proposes new collections and contexts, waits for your approval, then patches `scripts/qmd/setup.ts`, drops the old index, and rebuilds embeddings from scratch. Use only when the current structure no longer fits how you search.\n\n---\n\n## Access from anywhere\n\n**Edit anywhere — Claude Code on desktop or mobile**\nClaude Code's GitHub integration lets you open the repo and work from anywhere — ingest a source, run a query, or update a page from your phone.\n\n**Read anywhere — Obsidian desktop and mobile**\nOpen the repo as an Obsidian vault. The bundled `.obsidian` folder pre-configures the [obsidian-git](https://github.com/Vinzent03/obsidian-git) community plugin — no setup required, just enable it. Your wiki syncs automatically on every commit. For iOS: put the repo folder inside iCloud Drive — Obsidian Mobile picks it up natively with no extra setup. Graph view, backlinks, offline reading — all working.\n\n**Browse anywhere — GitHub**\nIt's a plain GitHub repo. View and edit files directly in the browser at any time.\n\n---\n\n## How it works\n\nSources flow in on the left, Claude synthesizes them into the wiki, qmd indexes every page into a local hybrid search index, and GitHub makes the whole vault editable from Obsidian and Claude Code on any device.\n\n```mermaid\nflowchart TB\n  subgraph Sources[\"raw-sources/ — raw, immutable\"]\n    direction LR\n    S1[articles/]\n    S2[pdfs/]\n    S3[personal/]\n  end\n\n  subgraph Skills[\"Claude Code skills\"]\n    direction LR\n    I[\"/brain-ingest\"]\n    Q[\"/brain-search\"]\n    R[\"/brain-refresh\"]\n  end\n\n  subgraph Wiki[\"wiki/ — cross-linked synthesis\"]\n    direction LR\n    W1[overview.md]\n    W2[topic / entity pages]\n    W3[sources/]\n    W4[qa/]\n  end\n\n  QMD[(\"qmd.sqlite\u003cbr/\u003evector + BM25\u003cbr/\u003ehybrid index\")]\n\n  subgraph Remote[\"GitHub — source of truth\"]\n    GH[private repo]\n  end\n\n  subgraph Read[\"Read / edit anywhere\"]\n    direction LR\n    OB[\"Obsidian\u003cbr/\u003egraph · backlinks · mobile\"]\n    CC[\"Claude Code\u003cbr/\u003edesktop + mobile\"]\n  end\n\n  User((you))\n\n  Sources --\u003e|read| I\n  I --\u003e|write pages, cross-link,\u003cbr/\u003eflag contradictions| Wiki\n  R -.-\u003e|chunk + embed\u003cbr/\u003echanged files| QMD\n  Wiki -.-\u003e|indexed by| QMD\n  User --\u003e|ask a question| Q\n  Q --\u003e|hybrid search| QMD\n  QMD --\u003e|top-k pages| Q\n  Q --\u003e|cited answer| User\n  Wiki \u003c--\u003e|\"obsidian-git\u003cbr/\u003eauto commit / pull\"| GH\n  GH --\u003e OB\n  GH --\u003e CC\n```\n\n### The ingest loop, zoomed in\n\n```\n┌─────────────────────┐        ┌─────────────────────┐        ┌─────────────────────┐\n│   Drop in a source  │        │ /brain-ingest       │        │     Wiki grows      │\n│                     │        │        Code         │        │                     │\n│  · article          │──────▶ │                     │──────▶ │  · cross-linked     │\n│  · PDF              │        │  reads + extracts   │        │    pages            │\n│  · personal note    │        │  key knowledge      │        │  · contradictions   │\n│                     │        │                     │        │    flagged          │\n└─────────────────────┘        └─────────────────────┘        │  · syntheses        │\n                                                              │    written          │\n                                                              └─────────────────────┘\n```\n\nQuery it anytime with `/brain-search`. Get answers with inline `[[wiki/page]]` citations, not a list of files.\n\n---\n\n## Wiki structure\n\nFive page types, all with YAML frontmatter:\n\n| Type | File | Purpose |\n|---|---|---|\n| `overview` | `wiki/overview.md` | Evolving high-level synthesis |\n| `topic` | `wiki/[concept].md` | A concept, domain, or idea |\n| `entity` | `wiki/[name].md` | A person, tool, company, or project |\n| `source-summary` | `wiki/sources/[slug].md` | One page per ingested source |\n| `qa` | `wiki/qa/[slug].md` | Filed answers to notable queries |\n\nAll pages cross-link with Obsidian `[[wikilinks]]`. Contradictions are flagged with `[!WARNING]` callouts. Full schema in [CLAUDE.md](./CLAUDE.md).\n\n---\n\n## Directory layout\n\nAll brains live under `~/.claude-second-brain/`. A central `config.toml` tracks them.\n\n```\n~/.claude-second-brain/\n├── config.toml            ← Brain registry (default brain, paths, git remotes)\n└── my-brain/\n    ├── CLAUDE.md          ← The schema. Claude reads this every session.\n    ├── raw-sources/       ← Your raw inputs. Claude never modifies these.\n    │   ├── articles/\n    │   ├── pdfs/\n    │   └── personal/\n    ├── wiki/              ← Claude owns this entirely.\n    │   ├── index.md\n    │   ├── log.md\n    │   ├── overview.md\n    │   ├── sources/\n    │   └── qa/\n    ├── scripts/qmd/       ← Semantic search setup and re-indexing\n    └── .qmd/              ← qmd index (gitignored)\n```\n\n## Multiple brains\n\nRun `npx claude-second-brain` again to create additional brains. Each gets its own folder, its own qmd index, and its own git remote — fully isolated. The global skills (`/brain-ingest`, `/brain-search`, `/brain-refresh`) always operate on the **default brain** declared in `config.toml`. The first brain you create is set as the default automatically.\n\nManage brains from the CLI:\n\n```bash\nnpx claude-second-brain ls                  # list all brains (default marked with *)\nnpx claude-second-brain rm \u003cname\u003e           # remove a brain (deletes its folder + config entry)\nnpx claude-second-brain path                # print the default brain's directory\nnpx claude-second-brain path --qmd          # print the default brain's qmd index path\nnpx claude-second-brain qmd -- query -c wiki \"\u003cterms\u003e\"   # run qmd against the default brain\n```\n\n---\n\n## Installing and updating skills\n\nSkills are slash commands Claude Code loads from `.claude/skills/[name]/SKILL.md`. `/brain-ingest`, `/brain-search`, and `/brain-refresh` install globally to `~/.claude/skills/` during setup so they work in any Claude Code session. `/brain-rebuild` and `/lint` live inside the vault at `.claude/skills/`.\n\n### Update the built-in wiki skills\n\nThe wiki's own skills are scaffolded at creation time. To pull in improvements, use `npx skills` pointing to the template skills directory in this repo:\n\n```bash\n# Install or update all 5 wiki skills from the latest template\nnpx skills add https://github.com/jessepinkman9900/claude-second-brain/tree/main/template/.claude/skills -a claude-code -y\n\n# Or update a specific skill\nnpx skills add https://github.com/jessepinkman9900/claude-second-brain/tree/main/template/.claude/skills --skill brain-ingest -a claude-code -y\n```\n\nOnce installed via `npx skills`, future updates are a single command:\n\n```bash\nnpx skills update -a claude-code\n```\n\n---\n\n## Roadmap\n\n- [ ] GitHub Actions to invoke `/brain-refresh` on a schedule\n- [ ] GitHub agentic workflows — auto-ingest on push, scheduled lint, auto-summary on new sources\n- [ ] More Claude Code skills (source discovery, topic clustering)\n\n---\n\n## Requirements\n\n- [mise](https://mise.jdx.dev/) — auto-installed by the CLI if missing\n- [Claude Code](https://claude.ai/code) — the CLI that runs the wiki\n- [Obsidian](https://obsidian.md/) — optional but recommended\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessepinkman9900%2Fclaude-second-brain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessepinkman9900%2Fclaude-second-brain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessepinkman9900%2Fclaude-second-brain/lists"}