Skip to content
Back to search

ai-second-brain-skills

Two Claude Code skills for building a Karpathy-style LLM wiki — a compounding AI second brain. Install: git clone https://github.com/NulightJens/ai-second-brain-skills.git && ln -s $(pwd)/ai-second-brain-skills/llm-wiki-setup ~/.claude/skills/llm-wiki-setup && ln -s $(pwd)/ai-second-brain-skills/wiki-self-heal ~/.claude/skills/wiki-self-heal

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/nulightjens--ai-second-brain-skills/badge.svg)](/listings/nulightjens--ai-second-brain-skills)

HTML

<a href="/listings/nulightjens--ai-second-brain-skills"><img src="/api/listings/nulightjens--ai-second-brain-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone https://github.com/NulightJens/ai-second-brain-skills.git ~/ai-second-brain-skills
ln -s ~/ai-second-brain-skills/llm-wiki-setup  ~/.claude/skills/llm-wiki-setup
ln -s ~/ai-second-brain-skills/wiki-self-heal  ~/.claude/skills/wiki-self-heal

Symlinks mean `git pull` in `~/ai-second-brain-skills` updates both skills instantly. Restart Claude Code after the first install.

**Smoke test** — in Claude Code from any directory:

> "What skills do you have available for building an LLM wiki?"

You should see `llm-wiki-setup` and `wiki-self-heal` in the response.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 137 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # AI Second Brain Skills
  2. > Your folder becomes your app. No database. No embeddings. Just markdown — and an AI that knows where to look.
  3. Two Claude Code skills that turn any folder into a compounding, AI-maintained knowledge base. Based on Andrej Karpathy's [LLM wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f), with a research loop inspired by his [autoresearch](https://github.com/karpathy/autoresearch) project.
  4. ## TL;DR
  5. ```bash
  6. git clone https://github.com/NulightJens/ai-second-brain-skills.git ~/ai-second-brain-skills
  7. ln -s ~/ai-second-brain-skills/llm-wiki-setup ~/.claude/skills/llm-wiki-setup
  8. ln -s ~/ai-second-brain-skills/wiki-self-heal ~/.claude/skills/wiki-self-heal
  9. ```
  10. Then in Claude Code:
  11. 1. `"Set up an LLM wiki at ~/my-second-brain"`
  12. 2. Drop a source into `raw/`
  13. 3. `"Ingest the source I just added to raw/"`
  14. 4. `"Run wiki-self-heal"` once a week
  15. That's the whole loop.
  16. ## Why this exists
  17. Most people's AI workflow: paste context into a chat, get an answer, start a new chat, paste everything again. Knowledge evaporates between sessions. Nothing compounds.
  18. The wiki pattern is different. The LLM reads every source **once**, extracts the knowledge, and writes it into an interlinked set of markdown files — a persistent wiki that sits between you and your raw sources. When you ask a question, it reads the wiki (not the sources). When you add a source, it integrates, flags contradictions, and strengthens the synthesis. Knowledge is compiled once and kept current.
  19. No vector database. No embeddings. No chunking pipeline. The folder is the app.
  20. ## How it works
  21. A three-layer mental model:
  22. 1. **The map** — `CLAUDE.md` at the vault root. The AI reads this first, every time. It contains the folder structure, the routing table ("for task X, read these files"), naming conventions, workflows, and guardrails. Think of it as the floor plan posted at the entrance of a building.
  23. 2. **The rooms** — `raw/` (immutable sources, read-only) and `wiki/` (LLM-owned markdown). The map tells the AI which room to enter for which task. Each room has its own rules.
  24. 3. **The workspace** — the actual markdown files inside each room. Pages linked by `[[wikilinks]]`, cataloged in `wiki/index.md`, timelined in `wiki/log.md`.
  25. Three operations: **ingest** (read source → write into wiki), **query** (answer questions from the wiki), **lint** (find and fill gaps). The `llm-wiki-setup` skill installs the whole structure. The `wiki-self-heal` skill runs the lint loop on demand or on a schedule.
  26. ```
  27. <your-vault>/
  28. ├── CLAUDE.md # the map — AI reads this first
  29. ├── AGENTS.md # mirror for Codex and other agents
  30. ├── raw/ # immutable sources (LLM reads, never writes)
  31. └── wiki/ # LLM-owned markdown
  32. ├── index.md # catalog of every page
  33. ├── log.md # chronological operation log
  34. └── <pages>.md # entity / concept / analysis pages
  35. ```
  36. ## Install
  37. ```bash
  38. git clone https://github.com/NulightJens/ai-second-brain-skills.git ~/ai-second-brain-skills
  39. ln -s ~/ai-second-brain-skills/llm-wiki-setup ~/.claude/skills/llm-wiki-setup
  40. ln -s ~/ai-second-brain-skills/wiki-self-heal ~/.claude/skills/wiki-self-heal
  41. ```
  42. Symlinks mean `git pull` in `~/ai-second-brain-skills` updates both skills instantly. Restart Claude Code after the first install.
  43. **Smoke test** — in Claude Code from any directory:
  44. > "What skills do you have available for building an LLM wiki?"
  45. You should see `llm-wiki-setup` and `wiki-self-heal` in the response.
  46. ## Use it
  47. ### 1. Set up a vault
  48. From Claude Code, anywhere:
  49. > "Set up an LLM wiki at `~/research-vault`"
  50. The skill asks three questions (path, flat or nested layout, hot cache yes/no), then scaffolds the vault and initializes git.
  51. ### 2. Ingest a source
  52. Drop a PDF, web clip, transcript, or markdown file into `~/research-vault/raw/`. Then from inside the vault:
  53. ```bash
  54. cd ~/research-vault && claude
  55. ```
  56. > "Ingest the new source I just added to raw/"
  57. Claude reads it, creates or updates wiki pages, updates the index, and appends to the log. A single substantive source typically touches 10–15 pages — that is normal and the whole point.
  58. ### 3. Query
  59. > "Where do my sources agree and disagree about `<topic>`?"
  60. > "What are the gaps in my wiki right now?"
  61. > "Write a comparison page for X vs Y and file it back into the wiki."
  62. Good answers get filed back as new pages — exploration compounds along with sources.
  63. ### 4. Let it learn on repeat
  64. On demand:
  65. > "Run wiki-self-heal on this vault"
  66. **First run: use audit-only mode.**
  67. > "Run a dry-run audit of this vault — don't change anything"
  68. The first pass on a populated wiki usually finds many gaps. Read the audit report first, then decide priorities.
  69. For recurring runs, schedule weekly — see [wiki-self-heal/references/scheduling.md](wiki-self-heal/references/scheduling.md) for launchd, cron, GitHub Actions, and Claude Code trigger recipes.
  70. **Never schedule a skill you haven't run manually first.**
  71. ## Requirements
  72. - [Claude Code](https://claude.com/claude-code) CLI, installed and authenticated
  73. - `git` (for wiki history and self-heal branches)
  74. - Optional: [Obsidian](https://obsidian.md) — the vault is plain markdown, any editor works, but Obsidian's graph view is delightful
  75. - Optional for `wiki-self-heal`: Apify, Firecrawl, or Exa MCPs for higher-quality research. Defaults to WebSearch + WebFetch, which always work.
  76. ## When to use something else
  77. The wiki pattern is a **personal-to-small-team** tool. At hundreds of pages, it beats vector-DB RAG on token efficiency, simplicity, and transparency — you can literally read your own index, the AI does the same. At millions of documents or many concurrent users, traditional RAG still wins. Use that instead.
  78. Rule of thumb: if you can read your own `wiki/index.md` in under two minutes, you're in the sweet spot for this pattern.
  79. ## Credits
  80. - Pattern and original gist by [Andrej Karpathy](https://github.com/karpathy) — [LLM wiki gist](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)
  81. - Research loop structure inspired by Karpathy's [autoresearch](https://github.com/karpathy/autoresearch)
  82. - Routing-table and folder-as-workspace framing inspired by Nate Herkelmann's folder-architecture video
  83. - Skill packaging by [@NulightJens](https://github.com/NulightJens)
  84. ## License
  85. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.