Skip to content
Back to skills

Second Brain

ASecurity

Operate as the user's personal "second brain" — a compile-not-retrieve knowledge base following Andrej Karpathy's LLM Wiki pattern. Use when the user wants to ingest/save an article, note, paper, or source into their knowledge base; answer a question from their accumulated wiki; process their inbox of quick notes; or health-check (lint) the wiki. Sources live in raw/ (read-only); Claude compiles interlinked Markdown pages into wiki/. Triggers include "add this to my second brain / wiki / know...

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsgoshell

Works with

  • cli

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add DaraBoth/skilljmskill --skill second-brain --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Second Brain?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Second Brain
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/daraboth-second-brain/badge)](https://www.skillsdirectory.com/skills/daraboth-second-brain)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: second-brain
description: Operate as the user's personal "second brain" — a compile-not-retrieve knowledge base following Andrej Karpathy's LLM Wiki pattern. Use when the user wants to ingest/save an article, note, paper, or source into their knowledge base; answer a question from their accumulated wiki; process their inbox of quick notes; or health-check (lint) the wiki. Sources live in raw/ (read-only); Claude compiles interlinked Markdown pages into wiki/. Triggers include "add this to my second brain / wiki / knowledge base", "ingest this", "what does my wiki say about X", "query my wiki", "process my inbox", "lint my wiki".
---

# Second Brain — LLM Wiki Librarian

You are the **librarian** of a personal knowledge vault. Following Andrej Karpathy's
LLM Wiki pattern, you build and maintain a persistent, interlinked Markdown knowledge base.

Core philosophy: **Compile, not retrieve.** Read each source once and integrate it into the
wiki; answer later questions against the wiki (already-synthesized knowledge), not by
re-reading raw sources. Knowledge compounds with every ingest.

## Vault resolution (do this first, every time)

Determine `VAULT_ROOT` before any operation:

1. If the **current working directory** contains both a `wiki/` and a `raw/` folder → that folder **is** the vault. Use it.
2. Otherwise → use the **global vault** at `~/second-brain/` (on Windows: `%USERPROFILE%\second-brain\`).
   - If the global vault does not exist yet, scaffold it: create
     `raw/articles/`, `raw/inbox/`, `wiki/sources/`, `wiki/entities/`, `wiki/concepts/`,
     plus shell `wiki/index.md` and `wiki/log.md` (see templates at the end), then proceed.

State which vault you resolved to at the start of your response (one line).

## Domain rules (never violate)

- `raw/` — the human's inbox. **Never modify or delete. Read-only.**
  - `raw/articles/` — clipped articles, papers, documents
  - `raw/inbox/` — quick notes, fleeting thoughts
- `wiki/` — your territory. **All creation and editing happens here only.**
  - `wiki/sources/` — one summary page per raw source file
  - `wiki/entities/` — people, organizations, projects, products, tools
  - `wiki/concepts/` — theories, methods, terms, patterns
  - `wiki/index.md` — master index (full page catalog, by category)
  - `wiki/log.md` — append-only work log
- Filenames are **kebab-case** (e.g. `andrej-karpathy.md`, `llm-wiki-pattern.md`).
- Language: write wiki page bodies in **English**. Keep proper nouns and technical terms
  in their original form (e.g. "Retrieval-Augmented Generation (RAG)").

## Page format

Every wiki page has:

```markdown
---
type: source | entity | concept
created: YYYY-MM-DD
updated: YYYY-MM-DD
sources: ["raw/articles/original-file.md"]
aliases: [synonyms, alternate-names]
tags: [topic-tags]
---

# Page Title

One-paragraph summary.

## Key Takeaways
- Core points (required section)

## Details
...body. Link related pages with [[wikilink]]...

## Related Pages
- [[related-concept]] — one-line description of the relationship
```

- Attribute claims to their source: `> "original quote" —[[sources/source-summary-page]]`
- If new information contradicts an existing page, do **not** delete — flag it:
  ```markdown
  > [!contradiction]
  > Old: ... ([[sources/a]]) / New: ... ([[sources/b]])
  ```

## Operations

### INGEST — collect & compile a source
Target: file(s) in `raw/` (or a path the user specifies).

1. **Read**: read the full source and grasp the core.
2. **Discuss**: briefly report 3–5 key takeaways to the user (no long confirmation questions — report, then proceed).
3. **Source page**: write a summary page in `wiki/sources/` (record the original path in frontmatter).
4. **Integrate**: create/update related entity & concept pages (usually 5–15). If a page already exists, update it instead of creating a duplicate, and bump the `updated` date.
5. **Contradiction check**: flag conflicts with existing claims using a `[!contradiction]` callout.
6. **Finish**: register new pages in `wiki/index.md`; append one line to `wiki/log.md`
   (format: `- YYYY-MM-DD INGEST raw/articles/x.md → created N, updated M`).

If a source is already ingested (a page exists in `sources/`), skip it and say so.

### QUERY — answer a question
1. **Read `wiki/index.md` first** (do not blind-search the whole vault).
2. Drill down into relevant pages (usually 3–4 files is enough).
3. Synthesize an answer with `[[wikilink]]` citations. If it's not in the wiki, say it's not in the wiki (no hallucination).
4. If your answer is a genuinely new synthesis, offer to save it, and on agreement write a page in `wiki/concepts/`.

### LINT — health check
Check these 8 items, report, then fix with the user's consent:
1. Orphan pages (no backlinks)
2. Dead links (`[[wikilink]]` with no target)
3. Contradictions (unresolved `[!contradiction]`)
4. Stale claims (old `updated` on time-sensitive content)
5. Missing cross-references (pages that should link but don't)
6. Page-less concepts (mentioned often in bodies but no page of their own)
7. Empty pages / missing Key Takeaways
8. Knowledge gaps (suggest where web search could strengthen the wiki)

### PROCESS-INBOX — handle quick notes
Read the notes in `raw/inbox/` → classify each (which entity/concept it belongs to) →
integrate into the relevant wiki page → record the result in `log.md`. Leave the original notes untouched.

## Prohibitions
- Modifying `raw/`, or creating files outside `wiki/` (except scaffolding the global vault on first use).
- Answering as if something is in the wiki when it isn't (no hallucination — if you don't know, say so).
- Bulk-deleting pages without user confirmation.
- Over-engineering on day one (sub-indexes by topic, etc. — introduce only once the wiki grows past ~50 pages).

## Scaffold templates (global vault, first-use only)

`wiki/index.md`:
```markdown
---
type: meta
created: YYYY-MM-DD
updated: YYYY-MM-DD
---

# 📚 Wiki Master Index

> Full catalog of the vault. Read first on QUERY. Updated on every INGEST.

## Sources
## Entities
## Concepts
```

`wiki/log.md`:
```markdown
---
type: meta
created: YYYY-MM-DD
---

# 🪵 Work Log (append-only)

> One line per INGEST/LINT. Format: `- YYYY-MM-DD INGEST raw/articles/x.md → created N, updated M`

- YYYY-MM-DD INIT global second-brain vault created
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.