Skip to content

AI Second Brain (aka AI LLM Wiki)

Spinning Idea edited this page Jun 24, 2026 · 2 revisions

Below is the list of YouTube videos and GitHub repositories involved in building a lightweight, AI-driven "Second Brain" or LLM Wiki system.

Original Source


YouTube Videos


GitHub Repositories

  • 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 /autoresearch for 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

Hosted Solutions


Simple Step-by-Step Setup for an AI Second Brain

This guide outlines the process of building a lightweight, compounding knowledge system based on the Karpathy LLM Wiki pattern, utilizing Claude Code and Obsidian.


1. Prerequisites & Installation

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.

2. Initialize Your Workspace

  1. Create a New Vault: Open Obsidian and create a new folder (e.g., ~/SecondBrain) to serve as your vault.
  2. Initialize Git: Open your terminal in that folder and run git init. This allows you to track changes and revert if necessary.
  3. Launch Claude Code: In the same terminal directory, type claude to start the agent session.

3. Define the Folder Architecture

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.

4. Create the "Operating Manual" (CLAUDE.md)

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 /wiki folder 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.

5. Install Skills and Tools

To help the AI handle Obsidian-specific syntax, you can install specialized skills:

  • Official Obsidian Skills: Use the kepano/obsidian-skills repository 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.

6. Core Operations

Once set up, you will primarily use three commands:

  • Ingest: Drop a file into /raw and 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.

7. Automated Setup (Alternative)

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".


Additional Resources

Custom Setup Prompt

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)

Clone this wiki locally