Xpersona
K

Karpathy LLM Memory Wiki

CLAWHUB · Unverified

Compilation-over-retrieval knowledge wiki for OpenClaw agents. Drop sources in, get structured cross-referenced pages out. Knowledge compounds instead of dis...

62
Rank
84
Safety
1.5k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s176b68pg32nx4p853n0gyrga984dd4m:wiki-system
  1. Install using `clawhub skill install s176b68pg32nx4p853n0gyrga984dd4m:wiki-system` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/dobrinalexandru/wiki-system before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-dobrinalexandru-wiki-system/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

130,169 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: karpathy-wiki
description: Compilation-over-retrieval knowledge wiki for OpenClaw agents. Drop sources in, get structured cross-referenced pages out. Knowledge compounds instead of disappearing. Based on Andrej Karpathy's LLM Wiki pattern.
---

# Wiki System

> "The tedious part of maintaining a knowledge base is not the reading or thinking — it's the bookkeeping."
> — Andrej Karpathy

Most AI memory systems retrieve and forget. You ask a question, the agent fetches context, answers, and the insight vanishes into chat history. Next session, same question, same fetch, same synthesis from scratch.

This skill implements Karpathy's **compilation-over-retrieval** pattern ([original gist](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)): instead of fetching raw sources every time, the agent builds and maintains a structured wiki — cross-referenced markdown pages that compound knowledge over time. The human curates what goes in; the agent handles the summarization, cross-referencing, and maintenance that humans typically abandon because the overhead grows unbearably.

## Three Layers

1. **Raw Sources** (immutable) — PDFs, articles, papers, URLs. You drop them in, the agent reads but never modifies them.
2. **The Wiki** (LLM-maintained) — structured markdown pages in `memory/wiki/` with frontmatter, claims, cross-references. The agent creates, updates, and maintains these automatically.
3. **The Schema** (`WIKI-SCHEMA.md`) — rules for structure, naming, and workflows. Co-evolves with your knowledge base.

## Three Operations

- **Ingest** — source goes in, agent extracts claims, creates/updates wiki pages, adds `[[cross-references]]` across related pages. A single source can touch multiple existing pages.
- **Query** — agent checks the wiki first, synthesizes answers with citations, and optionally files gaps back to the ingestion queue. Insights compound instead of evaporating.
- **Lint** — weekly health check: stale pages, broken links, orphan pages, contradictions, missing metadata. The wiki stays clean as it grows.

## Compatibility

### Works out of the box with
- **OpenClaw** >= 2026.1.29 (only hard requirement)
- **Builtin memory backend** (default) — the setup script adds `memory/wiki` to `memorySearch.extraPaths` so wiki pages are searchable via `memory_search`. No manual config needed.
- **Dreaming** (bundled, opt-in) — wiki and dreaming coexist cleanly. Dreaming consolidates daily conversation signals into `MEMORY.md`; the wiki compiles external knowledge into `memory/wiki/`. Different inputs, different outputs, never touching each other's files. Dreaming can even queue wiki candidates to the ingestion queue — the 4AM ingest cron picks them up 90 minutes after dreaming finishes at 2:30AM.

### Enhanced with (optional)
- **QMD** — local search sidecar with reranking and query expansion. Recommended for wikis over ~50 pages. QMD indexes `memory/**/*.md` recursively, so wiki pages are auto-indexed every 10 minutes wi

_meta.json

{
  "ownerId": "kn77ja0kg4zej4hkdqr3g9qs1980576b",
  "slug": "wiki-system",
  "version": "1.0.9",
  "publishedAt": 1775594337076
}

references/karpathy-llm-wiki.md

# Karpathy's LLM Wiki Pattern

**Source:** https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f

## Core Idea

"Compilation over retrieval" — instead of RAG (fetch raw docs every query), the LLM builds and maintains a structured wiki that compounds knowledge over time.

## Three Layers

1. **Raw Sources** (immutable) — curated documents, PDFs, articles. The LLM reads but never modifies.
2. **The Wiki** (LLM-maintained) — markdown pages with summaries, entity profiles, cross-references.
3. **The Schema** (configuration) — rules for structure, naming, workflows. Co-evolves with the project.

## Three Operations

- **Ingest:** Source added -> LLM reads it, extracts insights, creates/updates wiki pages, adds cross-references. A single source may touch 10-15 existing pages.
- **Query:** Ask questions against the wiki. LLM searches pages, synthesizes answers, optionally files results back as new pages.
- **Lint:** Periodic health check for contradictions, stale claims, orphaned pages, missing cross-references.

## Philosophy

"The tedious part of maintaining a knowledge base is not the reading or thinking — it's the bookkeeping." The human curates sources and directs analysis; the LLM handles summarization, cross-referencing, and maintenance.

## Scaling Notes

- index.md overflows context windows beyond ~100 pages (use domain sub-indices)
- Semantic search needed for large wikis (QMD/vector embeddings)
- Provenance tracking important for multi-session consistency

scripts/wiki-ingest.md

# Wiki Ingest

You are running a wiki ingestion cycle.

## Instructions

1. Read `WIKI-SCHEMA.md` for rules, structure, and constraints.
2. Read `work/wiki-sources/ingestion-queue.md` for pending items.
3. If the queue is empty, reply `NO_REPLY`.
4. For each pending source (max 3 per run):
   a. Read the source from `work/wiki-sources/` (or fetch URL if web source).
   b. Extract: key claims, facts, entities, relationships, dates.
   c. Check `memory/wiki/index.md` to see if an existing page covers the topic.
   d. If existing page: read it, update it (bump `updated` date, add new claims, add source to frontmatter sources list).
   e. If new topic: create new page in `memory/wiki/` using the template from WIKI-SCHEMA.md.
   f. Scan other wiki pages for cross-reference opportunities. Add `[[wikilinks]]` in both directions.
   g. Update `memory/wiki/index.md` (add/update row in table, bump stats).
   h. Append entry to `memory/wiki/log.md`.
   i. Mark source as processed in `work/wiki-sources/ingestion-queue.md` (move to Processed section with `[x]`).
5. Keep pages factual and concise. Each page should be 200-800 words.
6. Never modify files listed in Exclusion Zones (see WIKI-SCHEMA.md).
7. Use `confidence: high` only for claims with strong sourcing. Default to `medium`.

## Output

Report format:
```
Wiki Ingest Report
- Sources processed: N
- Pages created: N (list slugs)
- Pages updated: N (list slugs)
- Cross-references added: N
```

If nothing to process, reply `NO_REPLY`.

scripts/wiki-lint.md

# Wiki Lint

You are running a wiki health check.

## Instructions

1. Read `WIKI-SCHEMA.md` for rules.
2. Read `memory/wiki/index.md` for the full page catalog.
3. If no pages exist yet, reply `WIKI_LINT_OK (empty wiki)`.
4. For each page listed in the index:
   a. Read the page file from `memory/wiki/`.
   b. **Frontmatter check:** Verify all required fields are present (title, domain, created, updated, sources, tags, confidence, status).
   c. **Stale check:** If `updated` is older than 30 days, set `status: stale` in frontmatter.
   d. **Broken links:** Check all `[[wikilinks]]` resolve to actual files in `memory/wiki/`.
   e. **Orphan check:** If no other wiki page links to this page, flag as orphan.
   f. **Contradiction scan:** Look for claims that directly contradict claims in other pages.
5. Check index.md is in sync with actual files on disk:
   - No phantom entries (listed but file missing)
   - No unlisted pages (file exists but not in index)
6. Trim `memory/wiki/log.md` entries older than 90 days.
7. Archive pages where `status: stale` AND `updated` older than 90 days:
   - Set `status: archived` in frontmatter
   - Remove from active index table
   - Add to an "Archived" section at bottom of index
8. Update index.md stats and orphan list.
9. Append lint results to `memory/wiki/log.md`.

## Output

Report format:
```
Wiki Lint Report
- Pages checked: N
- Stale pages flagged: N (list)
- Broken links: N (list)
- Orphan pages: N (list)
- Contradictions found: N (list)
- Log entries trimmed: N
- Pages archived: N
```

If everything is clean, reply `WIKI_LINT_OK`.

Sponsored

Ads related to Karpathy LLM Memory Wiki and adjacent AI workflows.