Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
astro-han avatar

Karpathy Llm Wiki

  • 6.1k installs
  • 1.7k repo stars
  • Updated July 23, 2026
  • astro-han/karpathy-llm-wiki

karpathy-llm-wiki is an agent skill for building a Karpathy-style LLM wiki with raw/ sources, wiki/ articles, ingest-query-lint workflows, and a compounding index.

About

Karpathy LLM Wiki teaches agents to build and maintain a personal knowledge base with immutable raw/ sources and compiled wiki/ articles that compound over time. Initialization creates raw/, wiki/, wiki/index.md, and wiki/log.md on first ingest only. Ingest always fetches sources into raw/<topic>/dated-slug files preserving original text, then compiles into wiki articles by merging related theses or creating concept-named pages with cascade updates across affected topics. Query reads the index, synthesizes answers from wiki content with citations, and optionally archives conversation answers as new wiki pages. Lint runs deterministic auto-fixes for index consistency, broken internal links, and raw references, plus heuristic reports on contradictions, orphans, and stale archives. The schema enforces one-level topic directories, relative linking rules, conflict annotations when sources disagree, and append-only logging. Core philosophy: the LLM writes and maintains the wiki while the human reads and asks questions, producing a persistent compounding artifact rather than ephemeral chat memory.

  • Separates immutable raw/ source captures from compiled wiki/ knowledge articles that compound over time.
  • Ingest always fetches into raw/ then compiles into wiki/ with merge, cascade updates, and conflict annotations.
  • Query synthesizes cited answers from wiki/index.md without writing files unless archiving is requested.
  • Lint auto-fixes index drift, broken links, and raw references while reporting heuristic quality issues.
  • Enforces one-level topic directories, relative links, and append-only wiki/log.md operation history.

Karpathy Llm Wiki by the numbers

  • 6,075 all-time installs (skills.sh)
  • +285 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #65 of 1,879 Documentation skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

karpathy-llm-wiki capabilities & compatibility

Capabilities
raw source capture with metadata headers · wiki article compile and merge with cascade upda · index and log maintenance on every ingest · cited query synthesis from wiki content · deterministic lint with link and index auto fix
Use cases
memory · research · documentation · planning
From the docs

What karpathy-llm-wiki says it does

The LLM writes and maintains the wiki; the human reads and asks questions.
SKILL.md
The wiki is a persistent, compounding artifact.
SKILL.md
npx skills add https://github.com/astro-han/karpathy-llm-wiki --skill karpathy-llm-wiki

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs6.1k
repo stars1.7k
Security audit2 / 3 scanners passed
Last updatedJuly 23, 2026
Repositoryastro-han/karpathy-llm-wiki

How do I turn scattered sources into a persistent, queryable personal knowledge base the LLM maintains over time?

Build and maintain a personal LLM-powered knowledge base with immutable raw sources, compiled wiki articles, ingest-query-lint workflows, and compounding indexed memory.

Who is it for?

Developers maintaining a personal LLM wiki who want ingest-compile-query-lint discipline with cascade updates and conflict tracking.

Skip if: Skip when you only need a one-off summary without a durable raw/ and wiki/ knowledge structure.

When should I use this skill?

User mentions LLM wiki, Karpathy wiki, add to wiki, what do I know about, or wants to ingest sources and lint wiki quality.

What you get

Structured raw/ captures, compiled wiki/ articles, updated index and log entries, and cited answers from accumulated knowledge.

  • Compiled wiki articles
  • Updated wiki/index.md entries
  • Append-only wiki/log.md records

By the numbers

  • One-level topic subdirectories only under wiki/
  • Archive pages always create new files rather than merging

Files

SKILL.mdMarkdownGitHub ↗

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.

---

Ingest

Fetch a source into raw/, then compile it into wiki/. Always both steps, no exceptions.

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.

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, annotate the disagreement with source attribution. When merging, note the conflict within the merged article. When the conflicting content lives in separate articles, note it in both and cross-link them.

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 article, check for ripple effects:

1. Scan articles in the same topic directory for content affected by the new source. 2. Scan wiki/index.md entries in other topics for articles covering related concepts. 3. Update every article whose content is materially affected. Each updated file gets its Updated date refreshed.

Archive pages are never cascade-updated (they are point-in-time snapshots).

Post-Ingest

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>
- Updated: <cascade-updated article title>
- Updated: <another cascade-updated article title>

Omit - Updated: lines when no cascade updates occur.

---

Query

Search the wiki and answer questions. Examples of triggers:

  • "What do I know about X?"
  • "Summarize everything related to Y"
  • "Compare A and B based on my wiki"

Steps

1. Read wiki/index.md to locate relevant articles. 2. Read those articles and synthesize an answer. 3. Prefer wiki content over your own training knowledge. Cite sources with markdown links: [Article Title](wiki/topic/article.md) (project-root-relative paths for in-conversation citations; within wiki/ files, use paths relative to the current file). 4. Output the answer in the conversation. Do not write files unless asked.

Archiving

When the user explicitly asks to archive or save the answer to the wiki:

1. Write the answer as a new wiki page. See 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).

  • Sources: markdown links to the wiki articles cited in the answer.
  • No Raw field (content does not come from raw/).
  • File name reflects the query topic, e.g., transformer-architectures-overview.md.
  • Place in the most relevant topic directory.

2. Always create a new page. Never merge into existing articles (archive content is a synthesized answer, not raw material). 3. Update wiki/index.md. Prefix the Summary with [Archived]. 4. Append to wiki/log.md:

   ## [YYYY-MM-DD] query | Archived: <page title>

---

Lint

Quality checks on the wiki. Two categories with different authority levels.

Deterministic Checks (auto-fix)

Fix these automatically:

Index consistency — compare wiki/index.md against actual wiki/ files (excluding index.md and log.md):

  • File exists but missing from index → add entry with (no summary) placeholder. For Updated, use the article's metadata Updated date if present; otherwise fall back to file's last modified date.
  • Index entry points to nonexistent file → mark as [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) and excluding index.md/log.md (handled above):

  • Target does not exist → search wiki/ for a file with the same name elsewhere.
  • Exactly one match → fix the path.
  • Zero or multiple matches → report to the user.

Raw references — every link in a Raw field must point to an existing raw/ file:

  • Target does not exist → search raw/ for a file with the same name elsewhere.
  • Exactly one match → fix the path.
  • Zero or multiple matches → report to the user.

See Also — within each topic directory:

  • Add obviously missing cross-references between related articles.
  • Remove links to deleted files.

Heuristic Checks (report only)

These rely on your judgment. Report findings without auto-fixing:

  • Factual contradictions across articles
  • Outdated claims superseded by newer sources
  • Missing conflict annotations where sources disagree
  • Orphan pages with no inbound links from other wiki articles
  • Missing cross-topic references
  • Concepts frequently mentioned but lacking a dedicated page
  • Archive pages whose cited source articles have been substantially updated since archival

Post-Lint

Append to wiki/log.md:

## [YYYY-MM-DD] lint | <N> issues found, <M> auto-fixed

---

Conventions

  • Standard markdown with relative links throughout.
  • wiki/ supports one level of topic subdirectories only. No deeper nesting.
  • Today's date for log entries, Collected dates, and Archived dates. Updated dates reflect when the article's knowledge content last changed. Published dates come from the source (use Unknown when unavailable).
  • Inside wiki/ files, all markdown links use paths relative to the current file. In conversation output, use project-root-relative paths (e.g., wiki/topic/article.md).
  • Ingest updates both wiki/index.md and wiki/log.md. 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.

Related skills

How it compares

Choose karpathy-llm-wiki over static note skills when you want LLM-maintained compilation from immutable raw sources into a growing personal wiki.

FAQ

What directories does karpathy-llm-wiki use?

raw/ for immutable sources and wiki/ for compiled articles plus wiki/index.md and wiki/log.md.

Does ingest modify existing wiki files automatically?

It merges into related articles or creates new concept pages, then cascade-updates affected entries and the index.

Can I save a query answer into the wiki?

Yes. Archive mode writes a new wiki page, updates the index with an [Archived] summary, and logs the operation.

Is Karpathy Llm Wiki safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Documentationnotesworkflow

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.