# Add Karpathy LLM Wiki

Add a persistent wiki knowledge base to a NanoClaw group.

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-karpathy-llm-wiki -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-karpathy-llm-wiki -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-karpathy-llm-wiki -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-karpathy-llm-wiki -g -a gemini-cli -y`

## Description

Add a persistent wiki knowledge base to a NanoClaw group. Based on Karpathy's LLM Wiki pattern. Triggers on "add wiki", "wiki", "knowledge base", "llm wiki", "karpathy wiki".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Add Karpathy LLM Wiki

Set up a persistent wiki knowledge base on NanoClaw, based on Karpathy's LLM Wiki pattern.

Each step is safe to re-run: directory creation uses `mkdir -p`, initial wiki files are created only if absent, the container skill is preserved unless the user opts to update it, and the group CLAUDE.md section is replaced in place via marker comments rather than duplicated.

## Step 1: Read the pattern

Read `${CLAUDE_SKILL_DIR}/llm-wiki.md`, this is the full LLM Wiki idea as written by Karpathy. Understand it thoroughly before proceeding. Summarize the core idea to the user briefly, then discuss what they want to build.

## Step 2: Choose a group

AskUserQuestion: "Which group should have the wiki?"

1. **Main group**, add to your existing main chat
2. **Dedicated group**, create a new group just for the wiki
3. **Other**, pick an existing group

If dedicated: ask which channel and chat, then register with `pnpm exec tsx setup/index.ts --step register`.

## Step 3: Design collaboratively

Discuss with the user based on the pattern:
- What's the wiki's domain or topic?
- What kinds of sources will they add? (URLs, PDFs, images, voice notes, books, transcripts)
- Do they want the full three-layer architecture or a lighter version?
- Any specific conventions they care about? (The pattern intentionally leaves this open.)

Based on this discussion, create three things:

### 3a. Directory structure

Create `wiki/` and `sources/` directories in the group folder (`mkdir -p`, safe if they already exist). Create initial `index.md` and `log.md` per the pattern's Indexing and Logging section, adapted to the user's domain. Skip any of these files that already exist so a populated wiki is never clobbered on re-run.

### 3b. Container skill

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-karpathy-llm-wiki/SKILL.md
