# Second Brain

When you want to capture into, compile, query, lint, or connect your personal Second...

- Repository: https://github.com/coreyhaines31/makerskills (880 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add coreyhaines31/makerskills --skill second-brain -g -a claude-code -y`
Codex: `npx skills add coreyhaines31/makerskills --skill second-brain -g -a codex -y`
Cursor: `npx skills add coreyhaines31/makerskills --skill second-brain -g -a cursor -y`
Gemini CLI: `npx skills add coreyhaines31/makerskills --skill second-brain -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add coreyhaines31/makerskills`

## Description

When you want to capture into, compile, query, lint, or connect your personal Second Brain. Wraps the Karpathy LLM Wiki schema (Obsidian or any markdown vault), raw/ (unprocessed sources), wiki/ (AI-compiled interlinked topic pages), outputs/ (generated artifacts). Vault defaults to ${SECOND_BRAIN_VAULT:-$HOME/Documents/SecondBrain}/. Six modes, capture (drop something into raw/), compile (process unprocessed raw files into wiki pages, update INDEX.md), query (answer a question from the wiki, save to outputs/), lint (orphans / contradictions / stale / unprocessed raw / topic gaps), connect (suggest new wikilinks between pages), search (quick lookup). Triggers on "/second-brain," "/sb," "capture this," "save this to my brain," "compile the wiki," "process raw notes," "query my wiki," "ask my brain," "lint the wiki," "find connections," "search my notes." Complements deep-research (external corpus), this is the internal corpus. Team knowledge goes to company-brain, not here.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /second-brain, Karpathy LLM Wiki workflow

Wraps an existing Second Brain in Obsidian (or any markdown-based vault). The wiki vault's schema doc (`CLAUDE.md` or `AGENTS.md`) is the authoritative schema, the skill orchestrates the operations the user has been doing manually.

## Mental model

Three layers, each with a clear role:

```
raw/      →  wiki/         →  outputs/
sources      compiled         generated
                              artifacts
```

- **raw/**, unprocessed source material. Articles, highlights, ideas, braindumps, tweets. Type-prefixed (`article-`, `idea-`, `highlights-`, `braindump-`, `note-`, `resource-`, `tweet-`). Never deleted, source of truth.
- **wiki/**, AI-compiled topic pages. One page per concept, not per source. Interlinked via `[[wikilinks]]`. `INDEX.md` at root.
- **outputs/**, generated artifacts from queries: research summaries, analyses, slide decks. Named descriptively.

Folders to leave alone during wiki ops: `Projects/`, `Daily/`, `Templates/`, `Inbox/`, `Notes/`, `Tasks.md`, `Kanban.md`, `Home.md`.

## Step 1, Load vault config + schema

1. Read `references/vault-config.md` for the vault path (default: `${SECOND_BRAIN_VAULT:-$HOME/Documents/SecondBrain}/`)
2. Read the vault's schema doc, `<vault>/CLAUDE.md` or `<vault>/AGENTS.md`, whichever exists (if both, read both), for the authoritative schema. If present, trust it over `references/schema.md`, the user's vault is the source of truth.
3. If neither exists, fall back to `references/schema.md`.

## Step 2, Parse mode

The rest: https://github.com/coreyhaines31/makerskills/blob/HEAD/skills/second-brain/SKILL.md
