llm-wiki
Maintain a persistent, interlinked wiki for compounding knowledge base management.
Install
mkdir -p .claude/skills/llm-wiki && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18877" && unzip -o skill.zip -d .claude/skills/llm-wiki && rm skill.zipInstalls to .claude/skills/llm-wiki
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Karpathy's LLM Wiki: build/query interlinked markdown KB.Key capabilities
- →Build and maintain a knowledge base of interlinked markdown files
- →Ingest and process sources into the wiki
- →Query the existing wiki for information
- →Lint and audit the wiki for consistency
- →Summarize and cross-reference information
How it works
The skill builds and maintains a knowledge base of interlinked markdown files by ingesting sources, summarizing content, cross-referencing, and ensuring consistency based on a defined schema.
Inputs & outputs
When to use llm-wiki
- →Start a new research wiki
- →Ingest new research source
- →Query knowledge base
- →Audit wiki health
About this skill
Karpathy's LLM Wiki
Build and maintain a persistent, compounding knowledge base as interlinked markdown files. Based on Andrej Karpathy's LLM Wiki pattern.
Unlike traditional RAG (which rediscovers knowledge from scratch per query), the wiki compiles knowledge once and keeps it current. Cross-references are already there. Contradictions have already been flagged. Synthesis reflects everything ingested.
Division of labor: The human curates sources and directs analysis. The agent summarizes, cross-references, files, and maintains consistency.
When This Skill Activates
Use this skill when the user:
- Asks to create, build, or start a wiki or knowledge base
- Asks to ingest, add, or process a source into their wiki
- Asks a question and an existing wiki is present at the configured path
- Asks to lint, audit, or health-check their wiki
- References their wiki, knowledge base, or "notes" in a research context
Wiki Location
Location: ./wiki in this project
The wiki is just a directory of markdown files — open it in Obsidian, VS Code, or any editor. No database, no special tooling required.
Architecture: Three Layers
wiki/
├── SCHEMA.md # Conventions, structure rules, domain config
├── index.md # Sectioned content catalog with one-line summaries
├── log.md # Chronological action log (append-only, rotated yearly)
├── raw/ # Layer 1: Immutable source material
│ ├── articles/ # Web articles, clippings
│ ├── papers/ # PDFs, arxiv papers
│ ├── transcripts/ # Meeting notes, interviews
│ └── assets/ # Images, diagrams referenced by sources
├── entities/ # Layer 2: Entity pages (people, orgs, products, models)
├── concepts/ # Layer 2: Concept/topic pages
├── comparisons/ # Layer 2: Side-by-side analyses
└── queries/ # Layer 2: Filed query results worth keeping
Layer 1 — Raw Sources: Immutable. The agent reads but never modifies these.
Layer 2 — The Wiki: Agent-owned markdown files. Created, updated, and
cross-referenced by the agent.
Layer 3 — The Schema: SCHEMA.md defines structure, conventions, and tag taxonomy.
Resuming an Existing Wiki (CRITICAL — do this every session)
When the user has an existing wiki, always orient yourself before doing anything:
① Read SCHEMA.md — understand the domain, conventions, and tag taxonomy.
② Read index.md — learn what pages exist and their summaries.
③ Scan recent log.md — read the last 20-30 entries to understand recent activity.
Only after orientation should you ingest, query, or lint. This prevents:
- Creating duplicate pages for entities that already exist
- Missing cross-references to existing content
- Contradicting the schema's conventions
- Repeating work already logged
For large wikis (100+ pages), also run a quick grep -rl "<topic>" ./wiki/` for the topic
at hand before creating anything new.
Initializing a New Wiki
When the user asks to create or start a wiki:
- Determine the wiki path: `./wiki/' in the project repo
- Create the directory structure above
- Ask the user what domain the wiki covers — be specific
- Write
SCHEMA.mdcustomized to the domain (see template below) - Write initial
index.mdwith sectioned header - Write initial
log.mdwith creation entry - Confirm the wiki is ready and suggest first sources to ingest
SCHEMA.md Template
Adapt to the user's domain. The schema constrains agent behavior and ensures consistency:
# Wiki Schema
## Domain
[What this wiki covers — e.g., "AI/ML research", "personal health", "startup intelligence"]
## Conventions
- File names: lowercase, hyphens, no spaces (e.g., `transformer-architecture.md`)
- Every wiki page starts with YAML frontmatter (see below)
- Use `[[wikilinks]]` to link between pages (minimum 2 outbound links per page)
- When updating a page, always bump the `updated` date
- Every new page must be added to `index.md` under the correct section
- Every action must be appended to `log.md`
- **Provenance markers:** On pages that synthesize 3+ sources, append `^[raw/articles/source-file.md]`
at the end of paragraphs whose claims come from a specific source. This lets a reader trace each
claim back without re-reading the whole raw file. Optional on single-source pages where the
`sources:` frontmatter is enough.
## Frontmatter
```yaml
---
title: Page Title
created: YYYY-MM-DD
updated: YYYY-MM-DD
type: entity | concept | comparison | query | summary
tags: [from taxonomy below]
sources: [raw/articles/source-name.md]
# Optional quality signals:
confidence: high | medium | low # how well-supported the claims are
contested: true # set when the page has unresolved contradictions
contradictions: [other-page-slug] # pages this one conflicts with
---
confidence and contested are optional but recommended for opinion-heavy or fast-moving
topics. Lint surfaces contested: true and confidence: low pages for review so weak claims
don't silently harden into accepted wiki fact.
raw/ Frontmatter
Raw sources ALSO get a small frontmatter block so re-ingests can detect drift:
---
source_url: https://example.com/article # original URL, if applicable
ingested: YYYY-MM-DD
sha256: <hex digest of the raw content below the frontmatter>
---
The sha256: lets a future re-ingest of the same URL skip processing when content is unchanged,
and flag drift when it has changed. Compute over the body only (everything after the closing
---), not the frontmatter itself.
Tag Taxonomy
[Define 10-20 top-level tags for the domain. Add new tags here BEFORE using them.]
Example for AI/ML:
- Models: model, architecture, benchmark, training
- People/Orgs: person, company, lab, open-source
- Techniques: optimization, fine-tuning, inference, alignment, data
- Meta: comparison, timeline, controversy, prediction
Rule: every tag on a page must appear in this taxonomy. If a new tag is needed, add it here first, then use it. This prevents tag sprawl.
Page Thresholds
- Create a page when an entity/concept appears in 2+ sources OR is central to one source
- Add to existing page when a source mentions something already covered
- DON'T create a page for passing mentions, minor details, or things outside the domain
- Split a page when it exceeds ~200 lines — break into sub-topics with cross-links
- Archive a page when its content is fully superseded — move to
_archive/, remove from index
Entity Pages
One page per notable entity. Include:
- Overview / what it is
- Key facts and dates
- Relationships to other entities ([[wikilinks]])
- Source references
Concept Pages
One page per concept or topic. Include:
- Definition / explanation
- Current state of knowledge
- Open questions or debates
- Related concepts ([[wikilinks]])
Comparison Pages
Side-by-side analyses. Include:
- What is being compared and why
- Dimensions of comparison (table format preferred)
- Verdict or synthesis
- Sources
Update Policy
When new information conflicts with existing content:
- Check the dates — newer sources generally supersede older ones
- If genuinely contradictory, note both positions with dates and sources
- Mark the contradiction in frontmatter:
contradictions: [page-name] - Flag for user review in the lint report
### index.md Template
The index is sectioned by type. Each entry is one line: wikilink + summary.
```markdown
# Wiki Index
> Content catalog. Every wiki page listed under its type with a one-line summary.
> Read this first to find relevant pages for any query.
> Last updated: YYYY-MM-DD | Total pages: N
## Entities
<!-- Alphabetical within section -->
## Concepts
## Comparisons
## Queries
Scaling rule: When any section exceeds 50 entries, split it into sub-sections
by first letter or sub-domain. When the index exceeds 200 entries total, create
a _meta/topic-map.md that groups pages by theme for faster navigation.
log.md Template
# Wiki Log
> Chronological record of all wiki actions. Append-only.
> Format: `## [YYYY-MM-DD] action | subject`
> Actions: ingest, update, query, lint, create, archive, delete
> When this file exceeds 500 entries, rotate: rename to log-YYYY.md, start fresh.
## [YYYY-MM-DD] create | Wiki initialized
- Domain: [domain]
- Structure created with SCHEMA.md, index.md, log.md
Core Operations
1. Ingest
When the user provides a source (URL, file, paste), integrate it into the wiki:
① Capture the raw source:
- URL → use
WebFetchto get markdown, save toraw/articles/ - PDF → use
WebFetch(handles PDFs), save toraw/papers/ - Pasted text → save to appropriate
raw/subdirectory - Name the file descriptively:
raw/articles/karpathy-llm-wiki-2026.md - Add raw frontmatter (
source_url,ingested,sha256of the body). On re-ingest of the same URL: recompute the sha256, compare to the stored value — skip if identical, flag drift and update if different. This is cheap enough to do on every re-ingest and catches silent source changes.
② Discuss takeaways with the user — what's interesting, what matters for the domain. (Skip this in automated/cron contexts — proceed directly.)
③ Check what already exists — search index.md and use grep -rl to find
existing pages for mentioned entities/concepts. This is the difference between
a growing wiki and a pile of duplicates.
④ Write or update wiki pages:
- New entities/concepts: Create pages only if they meet the Page Thresholds in SCHEMA.md (2+ source mentions, or central to one source)
- Existing pages: Add new information, update facts, bump
updateddate. When new info contradicts existing content, follow the Update P
Content truncated.
When not to use it
- →When needing to modify files in the `raw/` directory
- →When creating pages for passing mentions or isolated content
- →When bypassing the orientation steps for an existing wiki
Limitations
- →Never modify files in `raw/` as sources are immutable
- →Always orient first by reading `SCHEMA.md`, `index.md`, and `log.md` before any operation
- →Every new page must be added to `index.md` and every action appended to `log.md`
How it compares
This skill creates a persistent, compounding knowledge base with agent-driven curation and cross-referencing, unlike traditional RAG which rediscovers knowledge per query.
Compared to similar skills
llm-wiki side by side with the closest alternatives in the catalog.
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ask
Lambenthan
对 wiki 提问,综合检索相关页面后回答,好的回答可 crystallize 回 wiki
kb
compozy
Comprehensive skill for the `kb` CLI and the Karpathy Knowledge Base pattern. Covers the full KB lifecycle — topic scaffolding, multi-source ingestion (URLs, files, YouTube videos and channels, Instagram reels, bookmarks, codebases), wiki article compilation, cross-article querying with file-back, l
braindump
huytieu
Quick capture of raw thoughts with intelligent domain classification and competitive intelligence extraction
hindsight-cloud
vectorize-io
Store team knowledge, project conventions, and learnings from tasks. Use to remember what works and recall context before new tasks. Connects to Hindsight Cloud. (user)
scratch-pad
krafton-ai
Markdown-based working memory for complex tasks. Use when: 5+ tool calls needed, researching multiple sources, analyzing/comparing items, multi-step workflows. Record process → Reference for response → Delete after use
vault-org
Mateus2411
Organize and maintain the user's Obsidian vault for Hermes Agent. Apply when user asks to reorganize, clean up, classify notes, or when documenting system configs in the vault.