
second-brain
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 ${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 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.
- Installs
- 357
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/coreyhaines31/makerskills --skill second-brain- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads second-brain automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
/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.mdat 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
- Read
references/vault-config.mdfor the vault path (default:${SECOND_BRAIN_VAULT:-$HOME/Documents/SecondBrain}/) - Read the vault's schema doc —
<vault>/CLAUDE.mdor<vault>/AGENTS.md, whichever exists (if both, read both) — for the authoritative schema. If present, trust it overreferences/schema.md— the user's vault is the source of truth. - If neither exists, fall back to
references/schema.md.
Step 2 — Parse mode
| Invocation | Mode |
|---|---|
/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.
- Detect type from content:
- URL →
article- - Pasted text with quoted highlights →
highlights- - User's own thoughts / brainstorm →
braindump-oridea- - Single tweet / X post →
tweet- - PDF, video, podcast →
resource- - Quick reference (recipe, command, fact) →
note- - If ambiguous, ask.
- URL →
- 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. - Add metadata to the top:
source: <URL if applicable> captured: YYYY-MM-DD - Save to
<vault>/raw/. - 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.
- 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.
- Find unprocessed raw files: grep
wiki/*.mdforSourcessections; the raw files NOT listed are unprocessed. - Read each unprocessed raw file + the existing
wiki/INDEX.md. - 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
## Sourcessection with a one-line note on what was drawn from it
- 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
- Connections section is mandatory on every wiki page. If a new page has no connections, find one before saving.
- 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).
- Read
wiki/INDEX.mdto identify potentially relevant pages - Read those pages + traverse
[[wikilinks]]1–2 hops - 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-researchto expand
- Save to
outputs/<YYYY-MM-DD>-<question-slug>.mdwith:- The original question
- The answer
- List of wiki pages consulted
- Show the answer in chat + path to the saved output
- Optional render: if
--render pdfor--render htmlwas passed, pipe the output through pandoc using the shared stylesheet. Seereferences/schema.md→ "Publishing alternatives" for the commands.
lint
Health check the wiki.
Check:
- Orphan pages — wiki/*.md that aren't in INDEX.md
- Connection orphans — pages with no
[[wikilinks]]to other pages - Unprocessed raw — raw files not listed under any wiki page's Sources
- Stale pages — most recent source >6 months old AND topic is volatile (AI, marketing, finance, health protocols)
- Topic gaps — concepts mentioned in 3+ pages without their own dedicated page
- Contradictions — wiki pages making opposing claims without flagging it
- 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.
- Build a topic map from INDEX.md + page summaries
- For each page, find 2–5 other pages with thematic overlap
- Check whether each candidate is already linked
- Suggest the missing links — and if the user approves, edit the pages to add them to their
## Connectionssections
search
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.
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:
- Local sessions pull before writing:
git pull --rebase --autostashat the start of any vault work, push after committing. Never assume local is current — a remote agent may have committed since the last session. - 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.
- 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— whenqueryfinds gaps in the wiki, route to deep-research to expand from external sources. Deep-research output can be captured back intoraw/for future compilation.paste— capture content cleanly intoraw/(especially for terminal/CLI captures).business-brainstorm— checksPortfolio of BusinessesandEntrepreneurship & Startupswiki pages for relevant context before brainstorming.decide— pull fromPersonal Philosophy/Productivity & Systemswiki for principles when scoring Q34 ("what principles are we bending"). New: aDecision Logwiki page accumulates the narrative form of decisions over time (thedecidearchive is the structured form; the wiki page is the story).jab-hook— aContent Ideaswiki page hoppers hooks, frameworks, and stories./jab-hookdrafts pull candidates from there.slide-deck— content drafted inoutputs/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 aWorkflow Docswiki 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-wikiskill — 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 +Peoplewiki page) and scheduled maintenance (wirecompileandlintto fire on a recurring schedule via thelooporcompound-engineering:scheduleskill).
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, orInbox/during second-brain operations. Those belong to other workflows.
FAQ
What does the second-brain skill do?
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 ${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 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.
How do I install second-brain?
Run npx skills add https://github.com/coreyhaines31/makerskills --skill second-brain in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/second-brain/ (personal) or .claude/skills/second-brain/ (project).
Which AI agents can use second-brain?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is second-brain safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains second-brain?
It is published by coreyhaines31 in coreyhaines31/makerskills. It has 357 recorded installs.
More from coreyhaines31/makerskills
watch-video
coreyhaines31/makerskills
When you want to extract content from a video — YouTube, Loom, Vimeo, Riverside, Zoom recording, local MP4, X/IG video, anything yt-dlp supports. Three depth modes user picks per invocation — transcript (just words, fast/free), visual (transcript + ffmpeg frame extraction + Claude vision pass on key moments), multimodal (Gemini native video ingestion if $GEMINIAPIKEY set, else dense Claude vision). Uses local Whisper for transcription (MLX-Whisper on Apple Silicon, faster-whisper elsewhere), falls back to platform-provided transcripts when available (Loom, Riverside, YouTube auto-subs). Saves to /Documents/videos/ - - / and optionally captures summary to second-brain raw/ as call-/meeting-/note-. Triggers on "/watch-video ," "watch this video," "transcribe this loom," "analyze this video," "summarize this recording," "key moments from this," "what happened in this video." For a post's text and engagement, use social-fetch.
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. Based on the 37signals Guide to Making Decisions (38 questions) plus house additions like Q39 opportunity cost ("what does saying yes displace?"). Triages to 6–8 relevant questions per decision instead of forcing the full set. Archives every decision to /.config/makerskills/decide/archive/ with a revisit date so you can check later whether the call was right. Triggers on "/decide," "help me decide," "should I [X]," "I need to make a decision about," "stuck on a decision," "deciding between," "go/no-go on," "what should I do about." This is both the decision-making workflow AND the decision log — making the decision is the act of logging it.
social-fetch
coreyhaines31/makerskills
When you or another skill needs to fetch the content of a social media post by URL — tweet, X thread, LinkedIn post, Instagram post, TikTok video, Bluesky post, Reddit thread, Mastodon status, Threads post, Hacker News thread. Returns normalized structured data (author, postedat, text, engagement counts, media URLs, replies if requested) regardless of platform. Tries strategies in order: direct API (Bluesky, Mastodon, HN, Reddit), agent-browser with modal dismissal (LinkedIn, X preview), Wayback Machine (older posts), paid APIs (ScrapeCreators / Apify — only if env keys present). Triggers on "/social-fetch ," "fetch this tweet," "fetch this post," "what does this LinkedIn say," "read this thread," "pull this post." For what's said inside a video, use watch-video. Used by deep-research (citing specific posts), jab-hook (inspiration account analysis), business-brainstorm (competitor / operator commentary).
read-book
coreyhaines31/makerskills
When you want to read and extract structured notes from a book — PDF, EPUB, MOBI, markdown, .txt, pasted text, or URL to a public-domain work. Reads in chunks (by chapter when a TOC exists, by 50-page blocks otherwise), extracts per-chapter TL;DR + key concepts + quotes + action items + frameworks, and offers to capture to second-brain raw/ as a highlights- file. Four modes — notes (default, chapter-by-chapter), summary (whole-book TL;DR + 3–5 takeaways), quotes (pull-quote highlights only), study (notes + Q&A spaced-rep prep). Triggers on "/read-book," "read this book," "extract notes from this PDF," "what's in this book," "summarize this ebook," "pull quotes from this." Sibling to watch-video (same content-consumption pattern, different medium).
business-brainstorm
coreyhaines31/makerskills
When you want to pressure-test a potential new business, product, or side project against the serial-founder filter. Not "marketing ideas for a product" (that's marketing-skills:marketing-ideas) — this is "should this business exist + can you win it." Runs the idea through a structured framework (problem, audience, wedge, monetization, moat, portfolio fit, distribution, energy fit, opportunity cost), checks domain availability via /domain, optionally triggers /deep-research for market validation, and outputs a viability brief: build / sleep on it / pass. Archives every idea to /.config/makerskills/business-brainstorm/archive/ so past work is searchable. Triggers on "/business-brainstorm," "/brainstorm," "new business idea," "should I build X," "pressure test this idea," "validate this idea," "is X a good business," "what about a [type] for [audience]."
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. Team-scope sibling to second-brain — personal notes go there, not here. Modes — capture, compile (wiki pages + INDEX.md), query (trust-weighted, saved to outputs/), review (verify / deprecate / supersede stale captures), lint, connect, search. Structured raw dirs (people/, companies/, meetings/, sops/, decisions/, customer-language/, sales-objections/). Every capture stamps author, timestamp, and trust status. Optional sync from call transcripts, Slack/email exports, CRM. Vault at ${COMPANYBRAINVAULT:-$HOME/Documents/CompanyBrain}/. Triggers on "/company-brain," "/cb," "capture this into the team brain," "log this meeting," "save this SOP," "compile the company wiki," "query the team brain," "what does the team know about X," "review the company brain," "lint the company brain," "who's the internal expert on X."
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.