Agent skill

Second Brain

by coreyhaines31 in coreyhaines31/makerskills

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

MITAuto-check passedKnowledge Management

Install Second Brain

skills CLI
$ npx skills add coreyhaines31/makerskills --skill second-brain -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install coreyhaines31/makerskills second-brain --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/coreyhaines31/makerskills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/second-brain .claude/skills/second-brain && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
second-brain
GitHub stars
851
Token cost
~3k tokens
SKILL.md length
1,454 words
Files
5 (incl. references)
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 3 steps: Load vault config + schema → Parse mode → Run the mode
  • Save this to my brain
  • SKILL.md covers Mental model, Step 1 — Load vault config +…, Step 2 — Parse mode and Step 3 — Run the mode, plus 4 more sections
  • Calls git

What it does

Second Brain is an agent skill from coreyhaines31/makerskills. 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). Tool-agnostic in design but defaults to a vault at ${SECONDBRAINVAULT:-$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…

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/schema.md`, `references/templates/raw.md` and `references/templates/wiki.md`).

It sits in Knowledge Management, covering Second brain, LLM wikis and Linting and formatting. It works with Obsidian. The repository describes itself as: AI agent skills for the personal operator's craft — decisions, research, second-brain, content rotation, scenario modeling, and meta-skills to author more. Works with Claude… The licence is MIT.

When your agent uses it

  • Save this to my brain
  • Compile the wiki
  • Process raw notes
  • Find connections

Example prompts

  • “/second-brain,”
  • “capture this,”
  • “save this to my brain,”
  • “/second-brain”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Load vault config + schema
  2. Parse mode
  3. Run the mode

What it can do on your machine

Read from SKILL.md and the folder at commit cc31579. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • executor.sh
    • hermes.team
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Second Brain loads about 3k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 247 tokens; SKILL.md has 1,454 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~247
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from coreyhaines31/makerskills at commit cc31579, republished under its MIT licence (© coreyhaines31). 1,454 words, ~2,959 tokens.

Download SKILL.mdSave it as .claude/skills/second-brain/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
second-brain
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). Tool-agnostic in design but defaults to a vault at ${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.
metadata.version
0.2.1

/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

InvocationMode
/sb capture / /second-brain capture / "capture this" / "save this to my brain"capture
/sb compile / "compile the wiki" / "process raw notes"compile
/sb query <question> / "ask my brain X" / "what does my brain say about Y"query
/sb lint / "lint the wiki" / "health check my brain"lint
/sb connect / "find connections" / "suggest wikilinks"connect
/sb search <term> / "search my notes for X"search

Step 3 — Run the mode

capture

Inputs: URL, pasted text, file path, or screenshot.

  1. Detect type from content:
    • URL → article-
    • Pasted text with quoted highlights → highlights-
    • User's own thoughts / brainstorm → braindump- or idea-
    • Single tweet / X post → tweet-
    • PDF, video, podcast → resource-
    • Quick reference (recipe, command, fact) → note-
    • If ambiguous, ask.
  2. Generate a descriptive filename: <type>-<kebab-case-topic>.md (e.g., article-andrew-wilkinson-tiny-manual.md). Use the source title or topic — not the URL slug.
  3. Add metadata to the top:
    markdown
    source: <URL if applicable>
    captured: YYYY-MM-DD
  4. Save to <vault>/raw/.
  5. If the source is a URL, fetch the article content (your agent's URL fetch, or agent-browser for auth-walled pages) and save the readable text — not just the URL.
  6. Report path + a one-line summary of what was saved.

Don't compile into the wiki here — capture is fast intake. Compilation is a separate, deliberate pass.

compile

The expensive but valuable operation. Process unprocessed raw files into wiki pages.

  1. Find unprocessed raw files: grep wiki/*.md for Sources sections; the raw files NOT listed are unprocessed.
  2. Read each unprocessed raw file + the existing wiki/INDEX.md.
  3. For each raw file:
    • Extract key concepts, facts, insights
    • Default: merge into an existing wiki page if the topic overlaps. Only create a new page if the concept doesn't fit anywhere.
    • One page per concept, not per source.
    • Use [[wikilinks]] for every related concept
    • Add the raw file under the wiki page's ## Sources section with a one-line note on what was drawn from it
  4. Update wiki/INDEX.md:
    • Add new pages under their category (Creative / Health & Longevity / Faith & Personal Growth / Business / Personal Growth / Tech / Hobbies / Sci-Fi / Pets — or new category if needed)
    • One line per entry: - [[Page Name]] — brief description
  5. Connections section is mandatory on every wiki page. If a new page has no connections, find one before saving.
  6. Quality > quantity. If a page would be <100 words, hold the raw file for now and ask the user if it should be merged into an adjacent page.

Output: list of pages created/updated, what merged where, anything held for clarification.

query

Answer a question using ONLY the wiki/raw corpus. Different from deep-research (which goes external).

  1. Read wiki/INDEX.md to identify potentially relevant pages
  2. Read those pages + traverse [[wikilinks]] 1–2 hops
  3. Compose the answer:
    • Cite wiki pages by name: "Per [[Microplastics Detox]]..."
    • If the wiki contradicts itself, surface both sides
    • If the wiki doesn't contain the answer, say so and offer to run /deep-research to expand
  4. Save to outputs/<YYYY-MM-DD>-<question-slug>.md with:
    • The original question
    • The answer
    • List of wiki pages consulted
  5. Show the answer in chat + path to the saved output
  6. Optional render: if --render pdf or --render html was passed, pipe the output through pandoc using the shared stylesheet. See references/schema.md → "Publishing alternatives" for the commands.
lint

Health check the wiki.

Check:

  1. Orphan pages — wiki/*.md that aren't in INDEX.md
  2. Connection orphans — pages with no [[wikilinks]] to other pages
  3. Unprocessed raw — raw files not listed under any wiki page's Sources
  4. Stale pages — most recent source >6 months old AND topic is volatile (AI, marketing, finance, health protocols)
  5. Topic gaps — concepts mentioned in 3+ pages without their own dedicated page
  6. Contradictions — wiki pages making opposing claims without flagging it
  7. Missing connections — pages on clearly related topics with no [[wikilink]] between them (suggest /sb connect)

Output: prioritized list. Most important first (broken structure beats stale content).

connect

Find pages that should be linked but aren't.

  1. Build a topic map from INDEX.md + page summaries
  2. For each page, find 2–5 other pages with thematic overlap
  3. Check whether each candidate is already linked
  4. Suggest the missing links — and if the user approves, edit the pages to add them to their ## Connections sections

Quick grep across wiki/ + raw/ for a term. Return matching files with a 2-line excerpt around the match. Faster than query when the user knows what page they're looking for.

Show full SKILL.md (569 more words)Show less

Multi-writer git sync (remote agents)

When the vault is git-backed to a hosted remote (GitHub/GitLab), the remote becomes a capture API for agents that don't have filesystem access — cloud agents, scheduled jobs, other machines. Any agent that can reach the git host's API (directly, or through an MCP integration layer like Executor) can read the wiki and capture into raw/ by committing to the default branch.

The discipline that keeps writers from diverging:

  1. Local sessions pull before writing: git pull --rebase --autostash at the start of any vault work, push after committing. Never assume local is current — a remote agent may have committed since the last session.
  2. Obsidian users: install the community Git plugin with auto-pull on an interval (~10 min) and pull-on-startup, but leave its auto-commit/auto-push off — sessions and agents own commits, which keeps history semantic instead of a stream of "vault backup" noise.
  3. Remote agents commit append-mostly: new files in raw/ with descriptive commit messages. Append-mostly writes to distinct files make conflicts rare, and rebase absorbs interleaved writers cleanly.

Verify the loop once end-to-end when setting it up: remote commit via API → local pull → file appears in the vault.

Composes with

  • deep-research — when query finds gaps in the wiki, route to deep-research to expand from external sources. Deep-research output can be captured back into raw/ for future compilation.
  • paste — capture content cleanly into raw/ (especially for terminal/CLI captures).
  • business-brainstorm — checks Portfolio of Businesses and Entrepreneurship & Startups wiki pages for relevant context before brainstorming.
  • decide — pull from Personal Philosophy / Productivity & Systems wiki for principles when scoring Q34 ("what principles are we bending"). New: a Decision Log wiki page accumulates the narrative form of decisions over time (the decide archive is the structured form; the wiki page is the story).
  • jab-hook — a Content Ideas wiki page hoppers hooks, frameworks, and stories. /jab-hook drafts pull candidates from there.
  • slide-deck — content drafted in outputs/ becomes deck source; speaker notes can reference relevant wiki pages.
  • pm — Projects/ folder in the vault is off-limits to second-brain; pm owns it. But a Workflow Docs wiki page captures operational patterns that show up across multiple projects.

Sibling implementations (reference)

Two other systems following the same raw → wiki → outputs pattern. Both are worth watching as upgrade paths.

  • Hermes' llm-wiki skill — off-the-shelf implementation of the 3-folder pattern. Pre-built workflows for compile / query / lint. Useful for comparing schema decisions.
  • Gbrain by Garry Tan — much more sophisticated. Treats the brain as a database (Postgres or PGLite) with synthesis, graph traversal, gap analysis, scheduled cron maintenance, and MCP integration. Powers a 146K-page deployment with 24K people entities. If the user's vault outgrows the markdown-only pattern, Gbrain is the upgrade direction. Borrows worth adopting today even without migrating: people-as-entities (the person- raw type + People wiki page) and scheduled maintenance (wire compile and lint to fire on a recurring schedule via the loop or compound-engineering:schedule skill).

Notes on quality

  • Quality over quantity. Fewer well-connected wiki pages beat many thin ones. Hold raw files for clarification if compilation would produce a thin page.
  • Don't flatten nuance. If two raw sources contradict, the wiki page should note the disagreement, not pick a side silently.
  • Connections section is mandatory — every wiki page must link to at least one other page.
  • Never delete raw files after compilation. They're the source of truth.
  • Never modify files in Projects/, Daily/, Templates/, Notes/, Tasks.md, Kanban.md, Home.md, or Inbox/ during second-brain operations. Those belong to other workflows.

© coreyhaines31, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/second-brain of coreyhaines31/makerskills.

  • SKILL.md
  • references/schema.md
  • references/templates/raw.md
  • references/templates/wiki.md
  • references/vault-config.md

Open the folder on GitHubat commit cc31579

Compare with similar skills

Second Brain next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Second Brain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Second Brain this skillcoreyhaines31/makerskills851—~3kAutomated safety check: PassMIT
LLM Wikilewislulu/llm-wiki-skill655—~3.7kAutomated safety check: PassNone
Karpathy WikiSherwinQ/karpathy-wiki114—~967Automated safety check: PassMIT
My LLM WikiMartinLwx/dotfiles140—~2.7kAutomated safety check: PassNone
Obsidian Knowledge BuilderMichael-OvO/obsidian-knowledge-agent205—~917Automated safety check: PassMIT
AI Second Braincharlie947/ai-second-brain189—~3.5kAutomated safety check: PassMIT

Similar skills

  • LLM Wiki

    lewislulu/llm-wiki-skill

    Build and maintain a Karpathy-style LLM knowledge base — a self-compiling Obsidian markdown wiki where an Agent ingests raw sources, compiles cross-linked concept/entity/summary pages, answers…

    655 GitHub stars~3.7k tokensUpdated 5 mo ago
    Knowledge ManagementAuto-check passed
  • Karpathy Wiki

    SherwinQ/karpathy-wiki

    A skill your agent uses when building or maintaining a personal knowledge base with LLM assistance.

    114 GitHub stars~967 tokensUpdated 5 mo ago
    Knowledge ManagementAuto-check passed
  • My LLM Wiki

    MartinLwx/dotfiles

    Provides access to the user's personal wiki, including notes, research, project documentation, decisions, and archived knowledge.

    140 GitHub stars~2.7k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Obsidian Knowledge Builder

    Michael-OvO/obsidian-knowledge-agent

    Turns PDFs, slides, syllabi, papers and transcripts into structured, teaching-quality Obsidian notes, matching how much structure is built to how much the material needs.

    205 GitHub stars~917 tokensUpdated 3 mo ago
    Knowledge ManagementAuto-check passed
  • AI Second Brain

    charlie947/ai-second-brain

    Walks the user through Charlie Hills's AI Second Brain + Karpathy Wiki setup from the MarTech AI newsletter.

    189 GitHub stars~3.5k tokensUpdated 5 mo ago
    Knowledge ManagementAuto-check passed
  • LLM Wiki

    CharlesHoskinson/sevenlayer

    Builds and maintains a persistent, interlinked Obsidian-compatible markdown knowledge wiki in a git repo via three operations — ingest a source into linked pages, answer a question from the…

    116 GitHub stars~1.5k tokensUpdated 1 mo ago
    Knowledge ManagementAuto-check passed

More from coreyhaines31/makerskills

All 21 skills in this repo
  • Business Brainstorm

    coreyhaines31/makerskills

    When you want to pressure-test a potential new business, product, or side project against the serial-founder filter.

    851 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Company Brain

    coreyhaines31/makerskills

    Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so an agent can answer on your team's behalf.

    851 GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Company Cfo

    coreyhaines31/makerskills

    Monthly CFO workflow for a company or agency — pull raw data from bank + payment processor + payroll + expense management, categorize and reconcile, compute end-of-month cash via transaction-sum…

    851 GitHub stars~4k tokensUpdated yesterday
    Auto-check: notes
  • Decide

    coreyhaines31/makerskills

    When you have a decision to make and want a structured workflow that picks the load-bearing questions, walks through them, reaches a call (or "wait"), and archives the rationale for future reference.

    851 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Ingest

    coreyhaines31/makerskills

    When you paste raw human input — a call transcript (Grain, Zoom, Granola, Fathom), a text or email from a client/partner/friend, a voice-memo dump, or meeting notes — and want it converted into…

    851 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Maker Council

    coreyhaines31/makerskills

    When you want multiple expert perspectives on a founder/operator question — a simulated board of advisors (Jason Fried, Elon Musk, Jeff Bezos, Jensen Huang, Bob Iger, Paul Graham, Naval Ravikant…

    851 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Second Brain

What does Second Brain do?

When you want to capture into, compile, query, lint, or connect your personal Second Brain. Second Brain is an agent skill from coreyhaines31/makerskills. When you want to capture into, compile, query, lint, or connect your personal Second Brain.

When should I use Second Brain?

Second Brain fits situations like: save this to my brain; compile the wiki; process raw notes; find connections.

How do I install Second Brain in Claude Code?

Run `npx skills add coreyhaines31/makerskills --skill second-brain -a claude-code`. Or copy the skill folder (skills/second-brain in coreyhaines31/makerskills) into .claude/skills/second-brain in your project. Claude Code loads it when a task matches its description.

How do I install Second Brain in Codex?

Run `npx skills add coreyhaines31/makerskills --skill second-brain -a codex`. Or copy the skill folder (skills/second-brain in coreyhaines31/makerskills) into .agents/skills/second-brain in your project. Codex loads it when a task matches its description.

Can I use Second Brain in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add coreyhaines31/makerskills --skill second-brain -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/second-brain, .gemini/skills/second-brain, .github/skills/second-brain and .opencode/skills/second-brain in your project.

What does Second Brain need to run?

Going by SKILL.md and its folder, Second Brain needs the command-line tools its instructions call (git).

Does Second Brain access the network?

SKILL.md names 3 domains. As links in the text: executor.sh, hermes.team and github.com. This is read from the text; nothing was executed.

Is Second Brain safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Second Brain use?

Second Brain is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Second Brain use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.

What are the alternatives to Second Brain?

Skills that share tags, products or a category with Second Brain: LLM Wiki (lewislulu/llm-wiki-skill, 655 stars), Karpathy Wiki (SherwinQ/karpathy-wiki, 114 stars), My LLM Wiki (MartinLwx/dotfiles, 140 stars) and Obsidian Knowledge Builder (Michael-OvO/obsidian-knowledge-agent, 205 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Second Brain?

coreyhaines31 (a GitHub user) maintains it in coreyhaines31/makerskills, which has 851 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 8, 2026.

Source: coreyhaines31/makerskills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.