From research
Use when creating, maintaining, querying, ingesting into, or auditing an interlinked Markdown research wiki or knowledge base
How this skill is triggered — by the user, by Claude, or both
Slash command
/research:llm-wikiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build and maintain a persistent, compounding knowledge base as interlinked
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, and synthesis reflects everything ingested.
Division of labor: The human curates sources and directs analysis. The assistant summarizes, cross-references, files, and maintains consistency.
Before using harness-specific tools, identify the active assistant harness. When the active harness matches one metadata-linked reference above, load exactly that one reference and skip the non-matching harness files. Use the shared workflow below for decisions and the harness reference only to translate file, search, shell, web, edit, and user-question operations into the active toolset.
Use this skill when the user:
Use WIKI_PATH when set. Otherwise default to ~/wiki.
WIKI="${WIKI_PATH:-$HOME/wiki}"
The wiki is just a directory of Markdown files. It can be opened in Obsidian, VS Code, or any editor. No database or special tooling is required.
wiki/
|-- SCHEMA.md # Conventions, structure rules, domain config
|-- index.md # Sectioned content catalog with one-line summaries
|-- log.md # Chronological action log, append-only and rotated yearly
|-- raw/ # Layer 1: immutable source material
| |-- articles/ # Web articles and clippings
| |-- papers/ # PDFs and arXiv papers
| |-- transcripts/ # Meeting notes and interviews
| `-- assets/ # Images and diagrams referenced by sources
|-- entities/ # Layer 2: people, orgs, products, models
|-- concepts/ # Layer 2: topics and concepts
|-- comparisons/ # Layer 2: side-by-side analyses
`-- queries/ # Layer 2: filed query results worth keeping
SCHEMA.md defines structure, conventions, thresholds, and tag
taxonomy.When the user has an existing wiki, orient before ingesting, querying, or linting:
SCHEMA.md for the domain, conventions, thresholds, and tags.index.md for pages and summaries.log.md for recent activity.This prevents duplicate pages, missed cross-references, schema contradictions, and repeated work.
When the user asks to create or start a wiki:
WIKI_PATH, the user's explicit path, or
~/wiki.SCHEMA.md customized to that domain.index.md.log.md with a creation entry.SCHEMA.md TemplateAdapt this to the user's domain:
# Wiki Schema
## Domain
[What this wiki covers, such as "AI/ML research", "personal health", or
"startup intelligence".]
## Conventions
- File names: lowercase, hyphens, no spaces, for example `transformer-architecture.md`.
- Every wiki page starts with YAML frontmatter.
- Use `[[wikilinks]]` to link between pages; minimum 2 outbound links per page.
- When updating a page, bump the `updated` date.
- Add every new page to `index.md` under the correct section.
- Append every action to `log.md`.
- On pages that synthesize 3+ sources, append provenance markers like
`^[raw/articles/source-file.md]` to paragraphs whose claims come from a
specific source.
## 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]
confidence: high | medium | low
contested: true
contradictions: [other-page-slug]
---
```
`confidence`, `contested`, and `contradictions` are optional but recommended for
opinion-heavy, single-source, fast-moving, or unresolved claims.
### Raw Source Frontmatter
Raw sources also get frontmatter so re-ingests can detect drift:
```yaml
---
source_url: https://example.com/article
ingested: YYYY-MM-DD
sha256: <hex digest of body content below the frontmatter>
---
```
Compute `sha256` over the body only. On re-ingest, skip unchanged sources and
flag changed hashes as source drift.
## Tag Taxonomy
[Define 10-20 top-level tags. 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
Every page tag must appear in this taxonomy.
## Page Thresholds
- Create a page when an entity or concept appears in 2+ sources or is central
to one source.
- Add to an existing page when a source mentions something already covered.
- Do not create pages for passing mentions, minor details, or out-of-domain
items.
- Split a page when it exceeds about 200 lines.
- Archive a fully superseded page under `_archive/` and remove it from the
index.
## Entity Pages
Include overview, key facts and dates, relationships, wikilinks, and source
references.
## Concept Pages
Include definition, current state of knowledge, open questions or debates, and
related concepts.
## Comparison Pages
Include what is being compared, comparison dimensions, verdict or synthesis,
and sources.
## Update Policy
When new information conflicts with existing content:
1. Check dates; newer sources usually supersede older ones.
2. If genuinely contradictory, record both positions with dates and sources.
3. Mark the contradiction in frontmatter.
4. Flag it for user review in the lint report.
index.md Template# 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
When any section exceeds 50 entries, split it by first letter or sub-domain.
When the index exceeds 200 entries total, create _meta/topic-map.md grouping
pages by theme.
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
When the user provides a URL, file, or paste:
raw/articles/.raw/papers/.raw/ subdirectory.raw/articles/karpathy-llm-wiki-2026.md.source_url, ingested, and body sha256.index.md and wiki pages for
mentioned entities and concepts.SCHEMA.md thresholds.updated, and follow the update policy for
conflicts.[[wikilinks]] and check whether relevant pages
should link back.SCHEMA.md.confidence: medium or confidence: low for weak, single-source, or
fast-moving claims.index.md, alphabetically within the right section.log.md entry and list every file created or updated.Ask before mass-updating if an ingest would touch 10 or more existing pages.
When the user asks a question about the wiki's domain:
index.md to identify relevant pages.queries/ or comparisons/ only when the
answer is substantial, novel, or painful to rederive.log.md with the query and whether it was filed.When the user asks to lint, health-check, or audit the wiki, check:
[[wikilinks]].[[links]] pointing to pages that do not exist.index.md.updated date is more than 90 days older than the most
recent relevant source.contested: true or contradictions:.confidence: low, single-source pages without confidence,
and unsupported high-confidence claims.SCHEMA.md.log.md exceeds 500 entries and should be rotated.Report findings by severity: broken links, orphans, source drift, contested
pages, stale content, then style issues. Append a lint entry to log.md.
When ingesting multiple sources at once:
index.md once at the end.log.md entry covering the batch.When content is fully superseded or the domain scope changes:
_archive/ if needed._archive/ with its original path.index.md.The wiki directory works as an Obsidian vault:
[[wikilinks]] render as clickable links.raw/assets/ holds images referenced via ![[image.png]].For best results, set Obsidian's attachment folder to raw/assets/, keep
Wikilinks enabled, and install Dataview. If using the obsidian skill alongside
this one, set OBSIDIAN_VAULT_PATH to the same directory as WIKI_PATH.
On headless machines, obsidian-headless can sync a wiki via Obsidian Sync
without a GUI:
npm install -g obsidian-headless
ob login --email <email> --password '<password>'
ob sync-create-remote --name "LLM Wiki"
cd ~/wiki
ob sync-setup --vault "<vault-id>"
ob sync --continuous
| Pitfall | Correction |
|---|---|
Modifying raw/ files | Treat raw sources as immutable; corrections belong in wiki pages. |
| Skipping orientation | Read schema, index, and recent log before operations. |
Skipping index.md or log.md updates | Keep navigation and history current every time. |
| Creating pages for passing mentions | Follow page thresholds. |
| Creating isolated pages | Add at least 2 outbound links and check backlinks. |
| Freeform tags | Add tags to the schema taxonomy before using them. |
| Oversized pages | Split pages over about 200 lines into focused pages. |
| Silent overwrite of contradictions | Record both claims, mark frontmatter, and flag for review. |
llm-wiki-compiler is a Node.js CLI that compiles sources into a concept wiki with the same Karpathy inspiration. Use this skill for agent-in-the-loop curation; use llmwiki when you want batch compilation of a source directory.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub alex-kopylov/zweihander --plugin research