-
Notifications
You must be signed in to change notification settings - Fork 2
AI Second Brain (aka AI LLM Wiki)
Below is the list of YouTube videos and GitHub repositories involved in building a lightweight, AI-driven "Second Brain" or LLM Wiki system.
- Andrew Karpathy Gist - https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
-
Andrej Karpathy Just 10x’d Everyone’s Claude Code
- Channel: Nate Herk | AI Automation.
- Description: Demonstrates how to use Claude Code to ingest YouTube transcripts and organize them into an Obsidian knowledge system in minutes.
-
Build a Self-Improving Claude Knowledge Base with ONE Prompt
- Channel: Jay E | RoboNuggets.
- Description: Provides a single prompt to set up a self-evolving second brain that uses a "Dream Sequence" routine to audit and update itself.
-
How To Build LLM Wiki In Obsidian? 🧠 A Memory Layer For Any Agentic AI
- Channel: Wanderloots.
- Description: Focuses on the three-layer system (Sources, Wiki, Schema) and how to use Python scripts to extract concepts into a shared memory layer.
-
I Built Self-Evolving Claude Code Memory w/ Karpathy's LLM Knowledge Bases
- Channel: Cole Medin.
- Description: Adapts Karpathy's pattern for internal data, using Claude Code hooks to automatically capture session logs and evolve a codebase's memory.
-
I built a second brain with Claude Code
- Channel: signalstack.
- Description: Explains using specialized sub-agents (like Alfred for assistance and Atlas for research) that share a unified brain within an Obsidian vault.
-
Karpathy's 400,000-Word Obsidian Wiki Has Zero RAG Infrastructure
- Channel: Josh Pocock.
-
Description: Breaks down the "Librarian" prompt and the
claude.mdschema that allows the AI to maintain a massive knowledge base without a vector database.
-
Karpathy's Obsidian RAG + Claude Code = CHEAT CODE
- Channel: Chase AI.
- Description: Highlights how to use the Obsidian Web Clipper to stage raw research data before turning it into a structured wiki.
-
STOP Using Claude Code Without This Fable 5 Agentic OS
- Channel: Chase AI.
- Description: Introduces "Jarvis," a local agentic OS layer built on Claude Code that features visual metrics and voice-activated daily rundowns.
- coleam00/second-brain-starter: A starter kit that includes a skill for Claude Code to generate personalized Product Requirements Documents (PRDs) for proactive AI assistants.
- kepano/obsidian-skills: Official skills developed by Obsidian CEO Steph Ango to teach Claude how to use Obsidian-specific syntax like wikilinks, callouts, and Canvas.
-
AgriciDaniel/claude-obsidian: A Claude Code plugin that provides slash commands like
/wiki,/save, and/autoresearchfor streamlined vault management. - coddingtonbear/obsidian-local-rest-api: An Obsidian plugin that enables a local REST API and includes a built-in MCP server for advanced agent interactions.
- mcpvault: A well-maintained MCP server used to connect AI agents to Obsidian vaults.
- Wanderloots' Vibe Coding Repository: A repository containing setup instructions, rules, and Python scripts for the LLM Wiki system. - https://github.com/wanderloots-tutorials/vibe-coding
This guide outlines the process of building a lightweight, compounding knowledge system based on the Karpathy LLM Wiki pattern, utilizing Claude Code and Obsidian.
Before beginning, ensure you have the following core tools installed:
- Obsidian: Download from obsidian.md. It serves as your "frontend" or IDE to view markdown files and graph relationships.
-
Claude Code: Install via terminal (
npm install -g @anthropic-ai/claude-code). This is the "conductor" or agent that writes and maintains the brain. - Git: Essential for version control. It acts as a safety net if the AI makes a mistake or corrupts files.
- Obsidian Web Clipper: A browser extension used to send clean markdown versions of web articles directly into your system.
-
Create a New Vault: Open Obsidian and create a new folder (e.g.,
~/SecondBrain) to serve as your vault. -
Initialize Git: Open your terminal in that folder and run
git init. This allows you to track changes and revert if necessary. -
Launch Claude Code: In the same terminal directory, type
claudeto start the agent session.
Your system must have a strict physical separation between zones to prevent the AI from overwriting your personal notes. Create the following folders:
-
/raw: Your immutable "junk drawer." This is where you dump clippings, transcripts, and source documents. The agent never edits this folder. -
/wiki: The agent’s domain. It contains concept pages, entity summaries, and cross-document syntheses generated by the AI. -
/outputs: A space for finished deliverables, such as briefings, reports, or slide decks generated from your knowledge. -
/dev(Optional): A collaborative zone for project-specific notes, ADRs (Architectural Decision Records), and technical snippets.
Create a file named CLAUDE.md at the root of your vault. This file is the "brain" of the system that Claude reads every time a session starts. It should define:
-
Ownership: State that the agent owns the
/wikifolder while the human owns/raw. -
Formatting Rules: Instruct the agent to use wikilinks (
[[Page Name]]) and specific frontmatter schemas for consistency. - Operational Workflows: Outline how to ingest data, query the wiki, and perform maintenance.
To help the AI handle Obsidian-specific syntax, you can install specialized skills:
-
Official Obsidian Skills: Use the
kepano/obsidian-skillsrepository to teach Claude how to handle wikilinks, callouts, and Canvas files. - Python Tooling: For advanced users, scripts can be added to perform more deterministic indexing and cataloging than a raw LLM.
Once set up, you will primarily use three commands:
-
Ingest: Drop a file into
/rawand tell Claude: "Ingest this new source into the wiki." The AI will read the source, extract concepts, create or update wiki pages, and update the master index. - Query: Ask questions like: "What do I know about [Topic]?" The AI will read the index, browse relevant wiki pages, and synthesize an answer with citations back to your raw sources.
- Dream Sequence (Lint): Periodically ask Claude to: "Run a health check." The AI will audit the wiki for contradictions, broken links, stale claims, and missing connections.
If you prefer an automated start, you can use a single "Second Brain" prompt (available in the sources) that instructs Claude Code to build this entire structure, including the CLAUDE.md file and scheduled maintenance routines, in one "go".
This prompt is designed to be copy-pasted into any capable AI coding agent to initialize a persistent, self-improving knowledge system. It does not contain specific references to Anthropic while preserving the "Karpathy LLM Wiki" architecture and enhancing the user-onboarding phase to ensure the system is tailored to your specific goals. This can be used to bootstrap your own LLM wiki within any capable toolset that can run the prompt and create folders and files to get you going.
***
### **AGENT PROMPT: INITIALIZE AI SECOND BRAIN**
**Core Philosophy:**
Build me a self-improving "Second Brain" based on the **LLM Wiki pattern**. This is not a standard RAG system; it is a persistent, compounding artifact where knowledge is compiled once into an interlinked markdown wiki and kept current, rather than being re-derived from raw chunks on every query.
---
#### **1. THE ARCHITECTURE (4 ZONES)**
Create a workspace structure with **physical zone separation** to prevent data drift:
1. **`/raw` (Human Owned, Immutable):** The "junk drawer." Contains clipped articles, transcripts, and source files. **You never edit this folder.** It is the ground-truth source.
2. **`/wiki` (Agent Owned, Managed):** You maintain this entirely. It contains concept pages, entity summaries, and interlinked articles synthesized from the raw data. This is a persistent, compounding codebase of knowledge.
3. **`/dev` (Collaborative Zone):** For active projects, architectural decisions (ADRs), and technical notes where we work together as co-pilots.
4. **`/outputs` (Artifacts):** For finished deliverables you generate for me, such as reports, slide decks, or briefings.
---
#### **2. THE OPERATING MANUAL (`INSTRUCTIONS.md`)**
Create a root-level file named `INSTRUCTIONS.md`. This is your "constitutional" manual that you must read at the start of every session. It must codify these rules:
* **Ownership:** The Agent owns `/wiki`; the Human owns `/raw`.
* **Formatting:** Use **[[wikilinks]]** for all cross-references to ensure the graph compounds.
* **Citations:** Every wiki page **must** cite its source file in the `/raw` folder to prevent hallucinations.
* **Navigation:** Maintain a **`wiki/index.md`** (content map) and a **`wiki/log.md`** (chronological operation history).
---
#### **3. THE OPERATIONS**
1. **INGEST:** When I add a source to `/raw`, read it, extract key points, create/update wiki pages, update the index, and log the action.
2. **QUERY:** Answer my questions using the wiki. If an answer is high-value, offer to "file it back" as a new wiki page to grow the brain.
3. **MAINTENANCE (LINT):** Periodically audit the vault for contradictions, stale claims, orphan pages, and knowledge gaps.
4. **SESSION CAPTURE:** At the end of a session, summarize key takeaways into `raw/session-notes/` so our conversations are never lost.
---
#### **4. SETUP PROCESS (WAIT FOR CONFIRMATION)**
**Do not build yet.** First, provide a brief, plain-English summary of the folder path and structure you are about to create. Once I say **"go,"** execute the build and then immediately move to the **Onboarding & Personalization** phase.
---
#### **5. ONBOARDING & PERSONALIZATION (POST-BUILD)**
After the folders are created, you must interview me with the following questions to tailor the system to my persona:
1. **The Identity & Goal:** Who are you (role/background), and what is the primary mission of this brain? (e.g., Academic Research, Startup Strategy, Technical Learning).
2. **The Proactivity Scale:** How do you want me to act?
* *Observer:* I only organize what you give me.
* *Advisor:* I suggest connections and draft insights for your review.
* *Partner:* I proactively research gaps and update the wiki autonomously.
3. **Knowledge Boundaries:** Are there specific "sensitive" areas or topics I should never automate or edit without explicit permission?
4. **Communication Style:** Do you prefer concise, bulleted summaries (Librarian style) or deep, narrative syntheses (Researcher style)?
5. **Initial Seed:** What are the first 3 topics or URLs you want me to proactively research and "seed" into the wiki right now so it isn't empty on day one?
---
**TEACH ME TO USE IT:**
End your setup by explaining the only three commands I need to remember:
1. **"Add this"** (Ingest)
2. **"What do I know about..."** (Query)
3. **"Run maintenance"** (Lint)