Skip to content
/

second-brain

second-brain-nicholas · NicholasSpisak/second-brain · ★ 355 · last commit 2026-04-07

LLM-maintained personal knowledge base: drop raw sources into a folder, let the LLM compile them into a structured Obsidian wiki with entities, concepts, and synthesis pages.

Best whenThe LLM should be the librarian that actively maintains knowledge consistency, not just a search tool over static files.
Skip ifPassive file storage without active cross-referencing, Starting ingestion without discussing key takeaways first
vs seeds
agent-os(Archetype 4 — markdown scaffold the agent writes and maintains) but with richer taxonomy (6 wiki page types), Obsidian …
Primitive shape 4 total
Skills 4
00

Summary

second-brain (NicholasSpisak) — Summary

Second Brain is an LLM-maintained personal knowledge base built on Andrej Karpathy's "LLM Wiki" pattern: you drop raw sources (articles, papers, notes, transcripts) into a raw/ folder, an AI agent reads them, writes structured wiki pages, creates cross-references, and maintains an index — while you browse the results in Obsidian. It ships as four Agent Skills (/second-brain, /second-brain-ingest, /second-brain-query, /second-brain-lint) installable via npx skills add. The vault structure is opinionated: wiki/sources/ (one summary per source), wiki/entities/, wiki/concepts/, wiki/synthesis/, and wiki/index.md. At 355 GitHub stars with no license (all rights reserved), it is a clean personal knowledge management (PKM) tool distinct from coding-focused agent harnesses.

differs_from_seeds: No direct seed equivalent. Unlike all seeds (which are coding-workflow tools), second-brain is a personal knowledge management system. The closest seed architecturally is agent-os (Archetype 4 — markdown scaffold that the agent writes and maintains) but second-brain has a richer taxonomy, an Obsidian integration, and a semi-structured wiki schema with wikilinks. Compared to ccmemory (structured Neo4j graph), second-brain is entirely flat-file markdown with no graph database — but it ships cross-reference links ([[wikilinks]]) that form an implicit graph navigable in Obsidian.

01

Overview

second-brain (NicholasSpisak) — Overview

Origin

Created by Nicholas Spisak. No license (all rights reserved). Shell + skills. Active April 2026.

Based on Andrej Karpathy's LLM Wiki pattern.

Philosophy

"The LLM is the librarian. You're the curator."

The core model:

  • You clip articles, drop transcripts, paste papers into raw/
  • The LLM (any AI agent) reads and structures them into interconnected wiki pages
  • You browse and navigate the knowledge graph in Obsidian
  • The LLM maintains consistency: entities, concepts, cross-references

The LLM doesn't just summarize — it actively maintains the wiki by:

  • Updating existing entity/concept pages when new sources mention them
  • Creating synthesis pages when patterns emerge
  • Maintaining wiki/index.md as the master catalog
  • Writing wiki/log.md as a chronological operation record

Agent Skills Standard

The project implements the Agent Skills open standard, meaning:

  • Install via npx skills add NicholasSpisak/second-brain
  • Works across 40+ AI agents (Claude Code, Codex, Cursor, Gemini CLI, and others)
  • No platform-specific hooks or plugin manifest

Karpathy LLM Wiki Pattern

From the original pattern: treat the LLM as a wiki engine that: (1) reads raw material, (2) extracts entities and concepts, (3) writes/updates wiki pages for each, (4) maintains an index, (5) creates cross-references via wikilinks. The key is that repeated ingestion updates existing pages rather than creating duplicates.

02

Architecture

second-brain (NicholasSpisak) — Architecture

Distribution

Agent Skills standard. Install via npx skills add NicholasSpisak/second-brain.

Vault Structure

your-vault/
├── raw/                    # Inbox: drop sources here
│   └── assets/             # Images and attachments
├── wiki/                   # LLM-maintained wiki
│   ├── sources/            # One summary per ingested source
│   ├── entities/           # People, orgs, products, tools
│   ├── concepts/           # Ideas, frameworks, theories
│   ├── synthesis/          # Comparisons, analyses, themes
│   ├── index.md            # Master catalog of all pages
│   └── log.md              # Chronological operation record
├── output/                 # Reports and generated artifacts
└── CLAUDE.md               # Agent config (varies by agent)

Skill Files

skills/
├── second-brain/SKILL.md           # Onboarding wizard
├── second-brain-ingest/SKILL.md    # Process raw sources
├── second-brain-query/SKILL.md     # Ask questions
└── second-brain-lint/SKILL.md      # Health check

Optional CLI Tools

The wizard offers installation of:

  • summarize (steipete) — summarize links, files, media from CLI
  • qmd (tobi/qmd) — local full-text search for markdown files
  • agent-browser (vercel-labs) — browser automation for web research

Required Runtime

  • Node.js (for npx skills add)
  • Obsidian (for browsing the vault)
  • Any AI agent supporting Agent Skills standard

Cross-Agent Support

Works with: Claude Code, Codex, Cursor, Gemini CLI, and 40+ other agents supporting Agent Skills. Each generates its own config file (CLAUDE.md, .cursor/rules, GEMINI.md, etc.).

03

Components

second-brain (NicholasSpisak) — Components

Skills (4)

Skill Purpose
/second-brain Guided 5-step wizard: name vault, set location, define domain/topic, configure agent support, install optional tools
/second-brain-ingest Process raw source files into wiki pages; update entity/concept pages; update index.md and log.md
/second-brain-query Ask questions against the wiki; uses qmd for fast search if installed
/second-brain-lint Health check: verify index.md consistency, scan for broken [[wikilinks]], report issues

Wiki Page Types

Type Location Content
Source summary wiki/sources/ Summary, key claims, entities mentioned, concepts covered
Entity page wiki/entities/ Person, org, product, or tool with cross-references
Concept page wiki/concepts/ Idea, framework, theory, or pattern with cross-references
Synthesis page wiki/synthesis/ Comparisons, analyses, themes across multiple sources
Index wiki/index.md Master catalog of all wiki pages
Log wiki/log.md Chronological record of all ingestion operations

Source Summary Template

Each ingested source gets a page with this frontmatter:

---
tags: [relevant, tags]
sources: [original-filename.md]
created: YYYY-MM-DD
updated: YYYY-MM-DD
---

Plus sections: Summary, Key Claims, Entities Mentioned, Concepts Covered.

Onboarding Wizard Flow

5 steps (one question at a time):

  1. Vault name (default: "second-brain")
  2. Vault location (default: ~/Documents/)
  3. Domain/topic (free text, used for tags and domain description)
  4. Agent config (auto-detect running agent; offer to generate configs for others)
  5. Optional CLI tools (summarize, qmd, agent-browser)
05

Prompts

second-brain (NicholasSpisak) — Prompts

Excerpt 1: Onboarding Wizard (from skills/second-brain/SKILL.md)

Prompting technique: Sequential single-question guided setup with defaults and auto-detection

# Second Brain — Onboarding Wizard

## Wizard Flow

Guide the user through these 5 steps. Ask ONE question at a time. Each step has a 
sensible default — the user can accept it or provide their own value.

### Step 1: Vault Name
Ask: "What would you like to name your knowledge base? This will be the folder name."
Default: `second-brain`

### Step 3: Domain / Topic
Ask: "What's this knowledge base about? This helps me set up relevant tags and describe 
the vault's purpose."
Examples: "AI research", "competitive intelligence on fintech startups", "personal health"
Accept free text. Use this to:
- Write a one-line domain description for the agent config
- Generate 5-8 suggested domain-specific tags

### Step 4: Agent Config
Auto-detect which agent is running this skill. State it clearly:
> "I'm running in [Agent Name], so I'll generate a [config file] for this vault."

**Agent detection logic:**
- If the CLAUDE.md convention is being used → Claude Code
- If .cursor/ exists in working directory → Cursor
- If GEMINI.md convention is being used → Gemini CLI

Excerpt 2: Ingest Skill — Discuss Before Writing (from skills/second-brain-ingest/SKILL.md)

Prompting technique: Human-in-the-loop approval before write operations; conversational confirmation

## Process Each Source

### 2. Discuss key takeaways with the user

Before writing anything, share the 3-5 most important takeaways from the source. 
Ask the user if they want to emphasize any particular aspects or skip any topics. 
**Wait for confirmation before proceeding.**

Excerpt 3: Source Summary Template (from SKILL.md)

Prompting technique: Templated structured output with typed frontmatter

---
tags: [relevant, tags]
sources: [original-filename.md]
created: YYYY-MM-DD
updated: YYYY-MM-DD
---

# Source Title

**Source:** original-filename.md
**Date ingested:** YYYY-MM-DD
**Type:** article | paper | transcript | notes

## Summary
...

## Key Claims
- Claim 1
- Claim 2

## Entities Mentioned
- [[Entity Name]] — brief context

## Concepts Covered
- [[Concept Name]] — brief context
09

Uniqueness

second-brain (NicholasSpisak) — Uniqueness

differs_from_seeds

No direct seed equivalent — all seeds are coding workflow tools, while second-brain is a personal knowledge management system. Architecturally closest to agent-os (Archetype 4 — markdown scaffold that the agent writes and maintains) but second-brain has a richer knowledge taxonomy (6 wiki page types), explicit Obsidian integration, and a user-in-the-loop confirmation step before writing. Compared to ccmemory (the memory seed), second-brain is entirely flat-file markdown with no graph database, no vector search, and no automatic session injection — but ships [[wikilinks]] that create an implicit knowledge graph browsable in Obsidian. The LLM-Wiki pattern (source → entity extraction → concept cross-linking) is a fundamentally different knowledge organization model from ccmemory's session-event capture.

Key Innovations

  1. Obsidian-native wiki — explicitly targets Obsidian as the browsing/navigation UI; wikilinks form a graph navigable via Obsidian's graph view
  2. LLM as active librarian — not passive storage; the LLM actively maintains entity/concept page consistency across ingestions
  3. Discuss-before-write gate — key takeaways discussed with user before any wiki pages are written; human curation built in
  4. Domain-scoped tagging — wizard generates domain-specific tags from the vault's topic description
  5. 40+ agent portability — Agent Skills standard enables use across any compliant AI agent

Observable Failure Modes

  1. No license — all rights reserved; unclear if commercial/enterprise use is permitted
  2. No automatic injection — wiki knowledge is not injected into coding sessions; must be manually queried
  3. No vector search built-in — relies on qmd (optional) for fast search; without it, LLM must read files manually
  4. Wikilink brittleness — renaming pages breaks wikilinks; must run /second-brain-lint after renames
  5. Not a coding tool — misplaced in "memory secondary (planning, sessions)" batch; this is PKM, not agent coding workflow
  6. Index driftwiki/index.md can become stale; regular lint runs required
04

Workflow

second-brain (NicholasSpisak) — Workflow

Phases

Phase Trigger Artifact
1. Setup /second-brain wizard Vault directory + CLAUDE.md + wiki/ structure
2. Web Clipping Obsidian Web Clipper Raw source file in raw/
3. Ingest /second-brain-ingest wiki/sources/ entry + updated entity/concept pages + index.md + log.md
4. Query /second-brain-query Inline answers using wiki content
5. Lint /second-brain-lint Index consistency report + broken wikilink list

Ingest Workflow Detail

For each source file:

  1. Read the source completely (including images if relevant)
  2. Discuss key takeaways with user (approval gate: confirm before writing)
  3. Create source summary page in wiki/sources/
  4. For each entity mentioned: update or create wiki/entities/ page
  5. For each concept mentioned: update or create wiki/concepts/ page
  6. Update wiki/index.md with new pages
  7. Append to wiki/log.md

Approval Gates

Gate Mechanism
Pre-write confirmation Step 2: LLM discusses key takeaways; user must confirm before wiki pages are created

Idempotency

The wizard is explicitly idempotent: running /second-brain again does not overwrite existing files. Safe to re-run.

The ingest skill detects unprocessed files by comparing raw/ contents against wiki/log.md entries, avoiding duplicate processing.

06

Memory Context

second-brain (NicholasSpisak) — Memory & Context

Memory Model

File-based wiki — plain Markdown files with [[wikilinks]] cross-references, organized into a taxonomy of sources, entities, concepts, and synthesis pages. Browsed via Obsidian's graph view and link navigation.

Persistence Scope

global (for the vault) — the wiki is a standalone directory that persists indefinitely. Not project-scoped; it's a personal knowledge base that spans any topic.

Memory Types

Type Location Content
Source knowledge wiki/sources/ Structured summaries of raw input material
Entity knowledge wiki/entities/ Accumulated facts about people, orgs, products
Conceptual knowledge wiki/concepts/ Ideas, frameworks, theories with cross-refs
Synthesis wiki/synthesis/ Comparisons and analyses across sources
Operation log wiki/log.md Chronological record of what was ingested
Master index wiki/index.md All pages cataloged

Search Mechanism

Full-text via qmd (optional local search engine for markdown files). When qmd is installed, /second-brain-query uses it for fast hybrid search. Without qmd, the LLM reads relevant files manually.

Cross-Session Handoff

Yes — the wiki persists across all sessions. Each new session can read the wiki to access accumulated knowledge. The /second-brain-query skill provides the interface for retrieval.

Unlike ccmemory's explicit Neo4j graph, second-brain uses [[wikilinks]] to create an implicit knowledge graph. Obsidian visualizes this as a graph view. The /second-brain-lint skill detects broken links (renames breaking the wikilink graph).

What second-brain Does NOT Do

  • No automatic context injection into coding sessions
  • No lifecycle hooks
  • No cross-session memory extraction from conversations
  • No typed relationship edges (beyond wikilinks)
  • No vector search (unless qmd provides it)
  • Not a coding workflow tool — purely personal knowledge management
07

Orchestration

second-brain (NicholasSpisak) — Orchestration

Multi-Agent: No

Single-agent skill pack. The agent works sequentially through ingestion steps.

Orchestration Pattern: sequential

Each ingest job processes sources one by one. No parallelism.

Execution Mode: one-shot

Each /second-brain-ingest invocation is a one-shot task. No continuous daemon.

Multi-Model: No

Works with whatever AI agent is running the skills.

Isolation: none

Operates directly on the vault directory.

Cross-Tool Portability: high

Agent Skills standard means this works with 40+ AI agents without modification. The vault structure is agent-agnostic — just markdown files.

08

Ui Cli Surface

second-brain (NicholasSpisak) — UI & CLI Surface

CLI Binary: No

Installed via npx skills add NicholasSpisak/second-brain. No dedicated binary.

Obsidian Integration (Primary UI)

The primary user interface is Obsidian — a local Markdown knowledge base editor. Features used:

  • Graph view: visualize wikilink connections between entities, concepts, sources
  • Wikilink navigation: [[Entity Name]] links connect related pages
  • Obsidian Web Clipper: Chrome extension that saves articles to raw/ folder
  • Backlinks panel: see all pages linking to the current page

Slash Commands via Agent

The 4 skills appear as agent commands:

  • /second-brain — setup wizard
  • /second-brain-ingest — process sources
  • /second-brain-query — ask questions
  • /second-brain-lint — health check

Optional CLI Tools

The wizard offers these enhancements:

  • summarize — CLI tool to summarize URLs/files before ingestion
  • qmd — local markdown search engine (npm i -g @tobilu/qmd); used by /second-brain-query
  • agent-browser — browser automation for web research

Observability

  • wiki/log.md — chronological record of all ingestion operations
  • wiki/index.md — master catalog of all wiki pages
  • /second-brain-lint — detects index inconsistencies and broken wikilinks

Related frameworks

same archetype · same primary tool · same memory type

MemPalace ★ 53k

Verbatim local-first AI memory with 96.6% R@5 retrieval on LongMemEval using zero API calls — structured into a palace hierarchy…

Beads (Yegge) ★ 24k

Dolt-powered distributed graph issue tracker where AI agents track tasks with hierarchical IDs and dependency edges, claim work…

deepagents (LangChain) ★ 23k

Opinionated Python agent harness on top of LangGraph with sub-agents, filesystem, memory, and context compaction bundled in

agentmemory ★ 18k

Persistent, searchable memory for AI coding agents that captures every tool interaction, compresses it via LLM, and injects…

Open Multi-Agent ★ 6.3k

Give a natural-language goal to a coordinator agent and get a dynamically decomposed, parallelized task DAG executed by…

Basic Memory ★ 3.1k

Gives AI agents a persistent, human-readable knowledge graph of project decisions, observations, and relations stored as plain…