karpathy-llm-wikiSAFE
Agent Skills-compatible LLM wiki for Claude Code, Cursor, and Codex. Build a Karpathy-style knowledge base from raw sources, citations, and linting.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A reusable skill for building Karpathy-style LLM wikis with Claude Code, Cursor, Codex, and other Agent Skills tools.
[](LICENSE) [](https://github.com/Astro-Han/karpathy-llm-wiki) [](https://github.com/Astro-Han/karpathy-llm-wiki) [](https://agentskills.io) [](https://github.com/Astro-Han/karpathy-llm-wiki#install)
karpathy-llm-wiki packages Karpathy's LLM Wiki idea into one installable Agent Skills skill. Your coding agent ingests sources into raw/, compiles durable knowledge pages into wiki/, answers questions with citations, and lints the wiki for consistency.
What Is an LLM Wiki?
An LLM wiki is a knowledge system where the LLM maintains structured wiki pages instead of re-searching raw documents on every question. New sources are compiled into durable markdown pages, cross-references are updated over time, and answers cite the wiki pages that already contain the synthesized knowledge.
This skill gives you three operations:
e985ece7bd66OBSERVED · 2026-10-20Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned | |
| codex | mentioned | |
| cursor | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: karpathy-llm-wiki description: "Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'." --- # Karpathy LLM Wiki Build and maintain a personal knowledge base using LLMs. You manage two directories: `raw/` (immutable source material) and `wiki/` (compiled knowledge articles). Sources go into raw/, you compile them into wiki articles, and the wiki compounds over time. Core ideas from Karpathy: - "The LLM writes and maintains the wiki; the human reads and asks questions." - "The wiki is a persistent, compounding artifact." ## Architecture Three layers, all under the user's project root: **raw/** — Immutable source material. You read, never modify. Organized by topic subdirectories (e.g., `raw/machine-learning/`). **wiki/** — Compiled knowledge articles. You have full ownership. Organized by topic subdirectories, one level only: `wiki/<topic>/<article>.md`. Contains two special files: - `wiki/index.md` — Global index. One row per article, grouped by topic, with link + summary + Updated date. - `wiki/log.md` — Append-only operation log. **SKILL.md** (this file) — Schema layer. Defines structure and workflow rules. Templates live in `references/` relative to this file. Read them when you need the exact format for raw files, articles, archive pages, or the index. ### Initialization Triggers only on the first Ingest. Check whether `raw/` and `wiki/` exist. Create only what is missing; never overwrite existing files: - `raw/` directory (with `.gitkeep`) - `wiki/` directory (with `.gitkeep`) - `wiki/index.md` — heading `# Knowledge Base Index`, empty body - `wiki/log.md` — heading `# Wiki Log`, empty body If Query or Lint cannot find the wiki structure, tell the user: "Run an ingest first to initialize the wiki." Do not auto-create. ## The Grounding Invariant Every load-bearing fact in wiki/ — numbers, dates, direct quotes — exists verbatim in the raw/ files linked by that article's Raw field. Compile *establishes* this invariant (locate before you write); lint *verifies* it (`scripts/check_evidence.py` greps the high-signal literals — suffixed or large numbers, decimals, ISO dates, longer quotes — in the linked raws; the compile-time locate-before-write rule covers the rest). Because raw/ is immutable, a verified article stays verified; the script re-checks the whole wiki in seconds, so there is no incremental state to maintain. --- ## Ingest Fetch a source into raw/, then compile it into wiki/ — unless the source adds nothing new. Always fetch; whether to compile depends on the triage below. ### Fetch (raw/) 1. Get the source content using whatever web or file tools your environment provides. If nothing can reach the source, ask the user to paste it directly. 2. Pick a topic directory. Check existing `raw/` subdirectories first; reuse one if the topic is close enough. Create a new subdirectory only for genuinely distinct topics. 3. Save as `raw/<topic>/YYYY-MM-DD-descriptive-slug.md`. - Slug from source title, kebab-case, max 60 characters. - Published date unknown → omit the date prefix from the file name (e.g., `descriptive-slug.md`). The metadata Published field still appears; set it to `Unknown`. - If a file with the same name already exists, append a numeric suffix (e.g., `descriptive-slug-2.md`). - Include metadata header: source URL, collected date, published date. - Preserve original text. Clean formatting noise. Do not rewrite opinions. See `references/raw-template.md` for the exact format. ### Triage After saving the raw file and before editing wiki/, search wiki/ with the source's key entities and synonyms, then state the disposition: - **New** — creates one or more new articles. - **Update** — merges into existing article(s). - **Disputed** — contradicts existing content; may combine with New or Update (see Compile for conflict annotation). - **No material** — adds no knowledge beyond what the wiki already holds. Keep the raw file, log it (see Post-Ingest), and stop. Do not force an article out of a thin source. New, Update, and Disputed may be combined. No material is exclusive. ### Compile (wiki/) Determine where the new content belongs: - **Same core thesis as existing article** → Merge into that article. Add the new source to Sources/Raw. Update affected sections. - **New concept** → Create a new article in the most relevant topic directory. Name the file after the concept, not the raw file. - **Spans multiple topics** → Place in the most relevant directory. Add See Also cross-references to related articles elsewhere. These are not mutually exclusive. A single source may warrant merging into one article while also creating a separate article for a distinct concept it introduces. In all cases, check for factual conflicts: if the new source contradicts existing content, mark the contested claims with a **Status: Disputed** block (see `references/article-template.md`). When the conflicting content lives in separate articles, mark both and cross-link them. **Source fidelity.** Every number, date, and direct quote must be located in the raw file (grep or read) *before* it is written; write the value exactly as found — if the source says 42K, write 42K, not 42,000. Derived values (sums, deltas, counts you computed) must show their components so each component is findable in raw. If you cannot locate a value, do not write its exact form; drop it or state it without precision. See `references/article-template.md` for article format. Key points: - Sources field: author, organization, or publication name + date, semicolon-separated. - Raw field: markdown links to raw/ files, semicolon-separated. - Relative paths from `wiki/<topic>/` use `../../raw/<topic>/<file>.md` (two levels up to project root). ### Cascade Updates After the primary art
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (5)
"# A\n\n> Sources: Example, 2026-01-01\n> Raw: [src](../../raw/t/src.md)\n\n"
"Value 42K.\n\n```markdown\n> Raw: [template](../../raw/topic/filename.md)\n```\n"
"Claims 42% growth.\n\n> Raw: [src](../../raw/t/src.md)\n"
"> Raw: [src](../../raw/t/src.md)\n\nValue 42K.\n"
"> Raw: [src](../../raw/t/src.md)\n\nNo other claim.\n"
Gates applied: no_behavioural_pass.
e985ece7bd66full audit observations/trust-audit/skill/astro-han__karpathy-llm-wiki.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-20 | e985ece7bd66 | SAFE | B | 89 | first audit |
Questions
What does the karpathy-llm-wiki — astro-han/karpathy-llm-wiki skill do?
Agent Skills-compatible LLM wiki for Claude Code, Cursor, and Codex. Build a Karpathy-style knowledge base from raw sources, citations, and linting.
Is karpathy-llm-wiki — astro-han/karpathy-llm-wiki safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can karpathy-llm-wiki — astro-han/karpathy-llm-wiki access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does karpathy-llm-wiki — astro-han/karpathy-llm-wiki work with?
Its documentation mentions claude-code, codex and cursor. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (e985ece7bd66), read on 2026-10-20. The repository is watched, and a new audit runs when it changes — this is the first audit.
Add this badge to your README
Shows this page's audit result and links back to it. It updates when the audit does.
[](https://modelsatlas.com/skills/astro-han/karpathy-llm-wiki/)
Not your listing, or something out of date? Claim or update your listing.