by Astro-Han
Agent Skills-compatible LLM wiki for Claude Code, Cursor, and Codex. Build a Karpathy-style knowledge base from raw sources, citations, and linting.
# Add to your Claude Code skills
git clone https://github.com/Astro-Han/karpathy-llm-wikiGuides for using ai agents skills like karpathy-llm-wiki.
Last scanned: 5/7/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-07T06:34:52.974Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}karpathy-llm-wiki is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Astro-Han. Agent Skills-compatible LLM wiki for Claude Code, Cursor, and Codex. Build a Karpathy-style knowledge base from raw sources, citations, and linting. It has 1,960 GitHub stars.
Yes. karpathy-llm-wiki passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/Astro-Han/karpathy-llm-wiki" and add it to your Claude Code skills directory (see the Installation section above). karpathy-llm-wiki ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
karpathy-llm-wiki is primarily written in Python. It is open-source under Astro-Han on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh karpathy-llm-wiki against similar tools.
No comments yet. Be the first to share your thoughts!
Based on votes and bookmarks from developers who liked this skill
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
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:
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.
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 bodywiki/log.md — heading # Wiki Log, empty bodyIf Query or Lint cannot find the wiki structure, tell the user: "Run an ingest first to initialize the wiki." Do not auto-create.
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.
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.
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.
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.
Save as raw/<topic>/YYYY-MM-DD-descriptive-slug.md.
descriptive-slug.md). The metadata Published field still appears; set it to Unknown.descriptive-slug-2.md).See references/raw-template.md for the exact format.
After saving the raw file and before editing wiki/, search wiki/ with the source's key entities and synonyms, then state the disposition:
New, Update, and Disputed may be combined. No material is exclusive.
Determine where the new content belongs:
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:
wiki/<topic>/ use ../../raw/<topic>/<file>.md (two levels up to project root).After the primary article, check for ripple effects. Do not rely on the index alone: search the full wiki for the source's key entities, aliases, and the claims it touches, then update every non-archive article whose content is materially affected. Each updated file gets its Updated date refreshed.
When the new source supersedes or contradicts an existing claim, keep the old claim for the record but mark it with a Status block (see references/article-template.md): Outdated when something newer replaces it, Disputed when sources disagree. Never silently rewrite history.
Archive pages are never cascade-updated (they are point-in-time snapshots).
Update wiki/index.md: add or update entries for every touched article. When adding a new topic section, include a one-line description. The Updated date reflects when the article's knowledge content last changed, not the file system timestamp. See references/index-template.md for format.
Append to wiki/log.md:
## [YYYY-MM-DD] ingest | <primary article title>
- Disposition: <New; Update; Disputed>
- Raw: <raw file path>
- Updated: <cascade-updated article title>
Omit - Updated: lines when no cascade updates occur. For No material, log and stop. Use a project-root-relative raw path (for example, raw/topic/file.md):
## [YYYY-MM-DD] ingest | no material: <project-root-relative raw file path>
- Disposition: No material
The exact no-material heading is the machine-readable inventory key; the Disposition line remains required for a complete human-readable log entry.
Use only when the user explicitly asks to research a topic or gather sources into the wiki. Ordinary knowledge questions go to Query, which never writes files.
Search the wiki and answer questions. Examples of triggers:
wiki/index.md to locate candidate articles, then full-text search wiki/ with the topic's key terms and their synonyms. Never claim the wiki has no relevant content until both the index and the full-text search come back empty — and say that you searched.[Article Title](wiki/topic/article.md) (project-root-relative paths for in-conversation citations; within wiki/ files, use paths relative to the current file).When the user explicitly asks to archive or save the answer to the wiki:
references/archive-template.md. When converting conversation citations to the archive page, rewrite project-root-relative paths (e.g., wiki/topic/article.md) to file-relative paths (e.g., ../topic/article.md or article.md for same-directory).
transformer-architectures-overview.md.wiki/index.md. Prefix the Summary with [Archived].wiki/log.md:
## [YYYY-MM-DD] query | Archived: <page title>
Quality checks on the wiki. Three categories with different authority levels.
Fix these automatically:
Index consistency — compare wiki/index.md against actual wiki/ files (excluding index.md and log.md):
(no summary) placeholder. For Updated, use the article's metadata Updated date if present (for archive pages, the Archived date); otherwise fall back to file's last modified date.[MISSING] in the index. Do not delete the entry; let the user decide.Internal links — for every markdown link in wiki/ article files (body text and Sources metadata), excluding Raw field links (validated by Raw references below), excluding See Also section links (handled by the See Also rule below), and excluding index.md/log.md (handled above):
Raw references — every link in a Raw field must point to an existing raw/ file:
See Also — within each topic directory:
Run these mechanically with python3 <skill-dir>/scripts/check_evidence.py <project-root> (optionally followed by project-root-relative article paths to limit scope). Default scope is the whole wiki; the script is fast. Report findings; never auto-fix facts.
Source fidelity — reported suspects are candidates, not verdicts: derived values and product names may appear. Judge each against the raw context and report only real mismatches.
Evidence errors — articles the script cannot verify (missing Raw field, unresolvable Raw links, or Raw links escaping raw/). These always need a decision, not a fix from the script.
Unreferenced raw files — files logged with a No material disposition are excluded; everything else is a genuine backlog reminder.
These rely on your judgment. Report findings without auto-fixing:
references/article-template.md)Append to wiki/log.md:
## [YYYY-MM-DD] lint | <N> issues found, <M> auto-fixed
Unknown when unavailable).wiki/topic/article.md).wiki/index.md and wiki/log.md (a No material ingest updates only the log). Archive (from Query) updates both. Lint updates wiki/log.md (and wiki/index.md only when auto-fixing index entries). Plain queries do not write any files.A reusable skill for building Karpathy-style LLM wikis with Claude Code, Cursor, Codex, and other Agent Skills tools.
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.
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:
| Operation | What it does | Output |
|---|---|---|
| Ingest | Collects a source into raw/, triages it, then creates or updates wiki articles — or just logs it when nothing is new |
New or updated wiki pages |
| Query | Searches the wiki and answers with citations | Grounded answers linking to markdown pages |
| Lint | Checks index integrity, links, and wiki health | Auto-fixes plus reported issues |
See SKILL.md for the full skill specification.
| Approach | Knowledge lives in | When synthesis happens | Good for |
|---|---|---|---|
| RAG | Raw chunks and embeddings | At query time | Broad retrieval across large corpora |
| LLM Wiki | Curated markdown pages | During ingest and maintenance | Compounding knowledge, summaries, and durable cross-links |
This skill is optimized for the wiki model: knowledge that improves over time instead of re-deriving relationships on every query.
Based on a production knowledge base maintained daily since April 2026:
See examples/ for sample wiki pages, source files, and operation logs.
npx add-skill Astro-Han/karpathy-llm-wiki
Works with any tool that supports the Agent Skills standard.
Give the skill a URL, a file, or pasted text:
"Ingest this article: https://example.com/attention-is-all-you-need"
The skill stores the source in raw/, then compiles or updates the right knowledge pages in wiki/.
"What do I know about attention mechanisms?"
The skill searches the wiki and answers with citations linking back to your markdown pages.
"Lint my wiki"
Checks for broken links, missing index entries, stale cross-references, and related issues.
The core idea from Karpathy: the LLM maintains the wiki while the human focuses on choosing sources and asking good questions.
your-project/
├── raw/ ← Immutable source material
│ └── topic/
│ └── 2026-04-03-source-article.md
├── wiki/ ← Compiled knowledge pages maintained by the LLM
│ ├── topic/
│ │ └── concept-name.md
│ ├── index.md ← Global table of contents
│ └── log.md ← Append-only operation log
Each new source can update multiple pages, strengthen cross-references, and record contradictions. That is what makes the wiki compound over time.
This skill follows the agentskills.io open standard:
| Tool | Install method |
|---|---|
| Claude Code | npx add-skill Astro-Han/karpathy-llm-wiki |
| Cursor | npx add-skill Astro-Han/karpathy-llm-wiki |
| Codex CLI | Copy to .agents/skills/karpathy-llm-wiki/ |
| OpenCode | npx add-skill Astro-Han/karpathy-llm-wiki |
| Other tools | Copy SKILL.md, references/, and scripts/ into the tool's skill directory |
An LLM wiki is maintained by the model. It updates summaries, cross-links, index entries, and contradictions as new material arrives. A normal personal wiki depends on manual editing.
Web pages, papers, blog posts, PDFs, markdown files, text files, and pasted text. The skill converts everything into markdown under raw/ and compiles it into wiki/.
The workflow is based on a real knowledge base with 94 articles and 99 sources maintained daily since April 2026. The repo includes examples, templates, and a design spec.
Deliberately not built, after three months of production logs and a survey of the ecosystem (LLM Wiki v2, llm-wiki-compiler, OKF, agent-memory literature):
Unofficial community implementation of the workflow from Karpathy's LLM Wiki idea. The value here is the reusable workflow, prompt structure, and battle-tested knowledge-compilation rules.
See also: lucasastorian/llmwiki, atomicmemory/llm-wiki-compiler. We are tracking Google's Open Knowledge Format draft and will evaluate compatibility once the spec and tooling mature.