What This Skill Does
Manages Sarthak's personal second brain — a Karpathy-style LLM knowledge base at personal/second-brain/. Raw materials go in, interconnected wiki articles come out.
Command Detection
Parse the user's message to determine the command:
- ingest: "brain ingest", "ingest this", "add to my brain", "process the raw folder"
- compile: "brain compile", "recompile", "rebuild the wiki"
- query: "brain query ...", "what does my brain say about ...", "search my knowledge"
- lint: "brain lint", "check my wiki", "health check"
- connect: "brain connect", "connect the dots", "find patterns", "cross-domain insights"
- status: "brain status", "how big is my brain", "brain stats"
- add: "brain add ...", "save this to brain", "remember this insight" (adds quick note to
raw/notes/)
If no command is clear, ask the user what they'd like to do.
Setup
The knowledge base lives at: personal/second-brain/
personal/second-brain/
├── CLAUDE.md ← Schema (rules for the LLM)
├── raw/ ← Source materials (human curates)
│ ├── articles/ ← Web articles, blog posts
│ ├── papers/ ← Research papers, PDFs
│ ├── tweets/ ← Interesting tweets/threads
│ ├── conversations/ ← Key insights from conversations
│ ├── notes/ ← Quick brain dumps
│ └── media/ ← Images, screenshots, diagrams
├── wiki/ ← Compiled knowledge (LLM writes)
│ ├── _index.md ← Master index
│ └── _changelog.md ← What changed and when
└── outputs/ ← Query responses, reports
Always read personal/second-brain/CLAUDE.md first — it contains the full schema with article format, rules, and domain tags.
Command: INGEST
- Read the schema at
personal/second-brain/CLAUDE.md
- Scan
raw/ for new or unprocessed materials
- For each source:
- Read it fully (never chunk)
- Extract key concepts, insights, decisions, mental models
- Create or update wiki articles following the article format in the schema
- Add backlinks to related articles
- Add source attribution
- Update
wiki/_index.md
- Append to
wiki/_changelog.md
- Report: N sources processed, N articles created, N articles updated
If the user provides content inline (not as a file), save it to raw/notes/YYYY-MM-DD-<slug>.md first, then ingest.
Command: COMPILE
- Read the schema
- Read
wiki/_index.md for current state
- Scan ALL
raw/ materials
- Identify gaps and stale articles
- Regenerate/update articles
- Rebuild index
- Run lint
- Report results
Command: QUERY
- Read the schema
- Read
wiki/_index.md
- Identify relevant articles based on the question
- Read those articles fully
- Synthesize answer grounded in wiki content
- If insufficient info, suggest what raw material would help
- Save response to
outputs/query-YYYY-MM-DD-<slug>.md
Command: LINT
- Read the schema
- Scan all wiki articles checking for:
- Broken
[[backlinks]]
- Orphan articles (nothing links to them)
- Missing source attributions
- Missing or incorrect domain tags
- Stale content
- Auto-fix safe issues
- Write report to
outputs/lint-report-YYYY-MM-DD.md
- Show summary to user
Command: CONNECT
This is the magic — finding cross-domain patterns.
- Read the full index and all article summaries
- Look for non-obvious connections:
- A trading lesson that applies to product building
- An engineering pattern that mirrors a business strategy
- An AI technique useful for content creation
- Mental models that span domains
- Write "Connections Report" to
outputs/connections-YYYY-MM-DD.md
- Present the most surprising/valuable connections to the user
Command: STATUS
- Count files in
raw/ by subdirectory
- Count articles in
wiki/
- Count articles by domain tag
- Show total word count
- Show last ingest/compile date from changelog
- Present a clean summary
Command: ADD
Quick capture — save an insight without full ingestion:
- Take the user's text
- Save to
raw/notes/YYYY-MM-DD-<slug>.md with basic frontmatter:---
added: YYYY-MM-DD
source: conversation
---
<user's text>
- Confirm saved, suggest running
/brain ingest later to compile it into the wiki
Important Rules
- Always read the CLAUDE.md schema before any operation
- Never fabricate knowledge — every wiki claim traces to a source
- Write for future-Sarthak who has no memory of original context
- Cross-link aggressively — connections are the value
- Use Obsidian-compatible markdown (
[[backlinks]], standard frontmatter)
- Keep the index under 200 entries
1---2name: brain3description: Second brain knowledge base. Ingest raw materials, compile wiki, query knowledge, lint, or discover cross-domain connections. Usage: /brain <command>. Commands: ingest, compile, query, lint, connect, status, add. Trigger phrases: 'add to my brain', 'what does my brain say about', 'brain ingest', 'brain compile', 'connect the dots', 'knowledge base'.4---56## What This Skill Does78Manages Sarthak's personal second brain — a Karpathy-style LLM knowledge base at `personal/second-brain/`. Raw materials go in, interconnected wiki articles come out.910## Command Detection1112Parse the user's message to determine the command:1314- **ingest**: "brain ingest", "ingest this", "add to my brain", "process the raw folder"15- **compile**: "brain compile", "recompile", "rebuild the wiki"16- **query**: "brain query ...", "what does my brain say about ...", "search my knowledge"17- **lint**: "brain lint", "check my wiki", "health check"18- **connect**: "brain connect", "connect the dots", "find patterns", "cross-domain insights"19- **status**: "brain status", "how big is my brain", "brain stats"20- **add**: "brain add ...", "save this to brain", "remember this insight" (adds quick note to `raw/notes/`)2122If no command is clear, ask the user what they'd like to do.2324## Setup2526The knowledge base lives at: `personal/second-brain/`2728```29personal/second-brain/30├── CLAUDE.md ← Schema (rules for the LLM)31├── raw/ ← Source materials (human curates)32│ ├── articles/ ← Web articles, blog posts33│ ├── papers/ ← Research papers, PDFs34│ ├── tweets/ ← Interesting tweets/threads35│ ├── conversations/ ← Key insights from conversations36│ ├── notes/ ← Quick brain dumps37│ └── media/ ← Images, screenshots, diagrams38├── wiki/ ← Compiled knowledge (LLM writes)39│ ├── _index.md ← Master index40│ └── _changelog.md ← What changed and when41└── outputs/ ← Query responses, reports42```4344**Always read `personal/second-brain/CLAUDE.md` first** — it contains the full schema with article format, rules, and domain tags.4546## Command: INGEST47481. Read the schema at `personal/second-brain/CLAUDE.md`492. Scan `raw/` for new or unprocessed materials503. For each source:51 - Read it fully (never chunk)52 - Extract key concepts, insights, decisions, mental models53 - Create or update wiki articles following the article format in the schema54 - Add backlinks to related articles55 - Add source attribution564. Update `wiki/_index.md`575. Append to `wiki/_changelog.md`586. Report: N sources processed, N articles created, N articles updated5960If the user provides content inline (not as a file), save it to `raw/notes/YYYY-MM-DD-<slug>.md` first, then ingest.6162## Command: COMPILE63641. Read the schema652. Read `wiki/_index.md` for current state663. Scan ALL `raw/` materials674. Identify gaps and stale articles685. Regenerate/update articles696. Rebuild index707. Run lint718. Report results7273## Command: QUERY74751. Read the schema762. Read `wiki/_index.md`773. Identify relevant articles based on the question784. Read those articles fully795. Synthesize answer grounded in wiki content806. If insufficient info, suggest what raw material would help817. Save response to `outputs/query-YYYY-MM-DD-<slug>.md`8283## Command: LINT84851. Read the schema862. Scan all wiki articles checking for:87 - Broken `[[backlinks]]`88 - Orphan articles (nothing links to them)89 - Missing source attributions90 - Missing or incorrect domain tags91 - Stale content923. Auto-fix safe issues934. Write report to `outputs/lint-report-YYYY-MM-DD.md`945. Show summary to user9596## Command: CONNECT9798This is the magic — finding cross-domain patterns.991001. Read the full index and all article summaries1012. Look for non-obvious connections:102 - A trading lesson that applies to product building103 - An engineering pattern that mirrors a business strategy104 - An AI technique useful for content creation105 - Mental models that span domains1063. Write "Connections Report" to `outputs/connections-YYYY-MM-DD.md`1074. Present the most surprising/valuable connections to the user108109## Command: STATUS1101111. Count files in `raw/` by subdirectory1122. Count articles in `wiki/`1133. Count articles by domain tag1144. Show total word count1155. Show last ingest/compile date from changelog1166. Present a clean summary117118## Command: ADD119120Quick capture — save an insight without full ingestion:1211221. Take the user's text1232. Save to `raw/notes/YYYY-MM-DD-<slug>.md` with basic frontmatter:124 ```markdown125 ---126 added: YYYY-MM-DD127 source: conversation128 ---129 130 <user's text>131 ```1323. Confirm saved, suggest running `/brain ingest` later to compile it into the wiki133134## Important Rules135136- Always read the CLAUDE.md schema before any operation137- Never fabricate knowledge — every wiki claim traces to a source138- Write for future-Sarthak who has no memory of original context139- Cross-link aggressively — connections are the value140- Use Obsidian-compatible markdown (`[[backlinks]]`, standard frontmatter)141- Keep the index under 200 entries