简介
知识编译系统:将原始文档自动转化为结构化可交叉引用的维基,实现知识复利而非检索即忘
原始描述
Compilation-over-retrieval knowledge wiki for OpenClaw agents. Drop sources in, get structured cross-referenced pages out. Knowledge compounds instead of dis...
通过你的 Agent 添加
安装目录:wiki-system/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: wiki-system
description: Compilation-over-retrieval knowledge wiki for OpenClaw agents. Drop sources in, get structured cross-referenced pages out. Knowledge compounds instead of disappearing. Inspired by Karpathy.
Wiki System
"The tedious part of maintaining a knowledge base is not the reading or thinking — it's the bookkeeping."
— Andrej Karpathy
"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): 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
- Raw Sources (immutable) — PDFs, articles, papers, URLs. You drop them in, the agent reads but never modifies them.
- The Wiki (LLM-maintained) — structured markdown pages in
memory/wiki/ with frontmatter, claims, cross-references. The agent creates, updates, and maintains these automatically.
- 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) — wiki pages indexed via SQLite FTS, searchable with
memory_search
- 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. Wiki pages are auto-indexed every 10 minutes since they live under
memory/. Enable with memory.backend: "qmd" in openclaw.json.
- SuperMemory — cloud memory persistence. Adding
memory/wiki/index.md to the sync script lets cross-session recall know what wiki topics exist, even on different devices.
- Embedding provider (OpenAI, Gemini, Voyage, Mistral) — enables semantic/vector search alongside keyword matching. Especially useful when wiki pages use different terminology than your queries.
- Honcho — cross-session semantic search with user modeling. Wiki pages indexed automatically.
- Dual-memory plugin (memory-core + SuperMemory) — if you run both backends via a composite plugin, wiki search results merge with cloud memories automatically. Best of both worlds.
- Obsidian — the
[[wikilink]] cross-references are Obsidian-compatible. Point Obsidian at memory/wiki/ to browse, visualize the knowledge graph, and follow links.
What it does NOT touch
memory/wiki/ with frontmatter, claims, cross-references. The agent creates, updates, and maintains these automatically.WIKI-SCHEMA.md) — rules for structure, naming, and workflows. Co-evolves with your knowledge base.- 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) — wiki pages indexed via SQLite FTS, searchable with
memory_search - Dreaming (bundled, opt-in) — wiki and dreaming coexist cleanly. Dreaming consolidates daily conversation signals into
MEMORY.md; the wiki compiles external knowledge intomemory/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)
memory/. Enable with memory.backend: "qmd" in openclaw.json.memory/wiki/index.md to the sync script lets cross-session recall know what wiki topics exist, even on different devices.[[wikilink]] cross-references are Obsidian-compatible. Point Obsidian at memory/wiki/ to browse, visualize the knowledge graph, and follow links.MEMORY.md— owned by Dreaming deep phaseDREAMS.md— owned by Dreaming diarymemory/YYYY-MM-DD.md— owned by daily compactionmemory/dreaming/— owned by Dreaming reports- Your existing memory files, projects, logs — all untouched
How It Works
You drop sources into work/wiki-sources/
|
v
[Wiki Ingest - cron or manual]
Reads sources, extracts claims, creates/updates pages
|
v
memory/wiki/*.md (structured pages with frontmatter + cross-references)
|
v
[OpenClaw Memory Index]
memory_search finds wiki pages alongside your other memory files
You drop sources into work/wiki-sources/
|
v
[Wiki Ingest - cron or manual]
Reads sources, extracts claims, creates/updates pages
|
v
memory/wiki/*.md (structured pages with frontmatter + cross-references)
|
v
[OpenClaw Memory Index]
memory_search finds wiki pages alongside your other memory files
Wiki pages live inside memory/ so every OpenClaw memory backend indexes them automatically. No extra configuration needed.
Installation
One command:
bash skills/wiki-system/scripts/wiki-setup.sh
This automatically:
- Creates
memory/wiki/withindex.mdandlog.md - Creates
work/wiki-sources/withpdfs/,articles/,papers/subdirs - Deploys
WIKI-SCHEMA.mdto workspace root - Creates the ingestion queue
- Adds wiki entries to
MEMORY.md(if present) - Creates cron jobs: Wiki Ingest (daily 4AM) and Wiki Lint (weekly Sunday 3:30AM)
Custom timezone:
bash skills/wiki-system/scripts/wiki-setup.sh --tz America/New_York
Uninstall
openclaw cron delete <ingest-job-id> # Get IDs: openclaw cron list | grep Wiki
openclaw cron delete <lint-job-id>
rm -rf memory/wiki/ work/wiki-sources/ WIKI-SCHEMA.md
Usage
Adding knowledge
openclaw cron delete <ingest-job-id> # Get IDs: openclaw cron list | grep Wiki
openclaw cron delete <lint-job-id>
rm -rf memory/wiki/ work/wiki-sources/ WIKI-SCHEMA.md
Adding knowledge
During a conversation:
- Save the source to
work/wiki-sources/ - Add it to
work/wiki-sources/ingestion-queue.md:## Pending - [ ] articles/my-article.md | Added 2026-04-07 - [ ] https://example.com/paper | Added 2026-04-07 - Say "wiki ingest" — the agent processes the queue immediately
Trigger ingest outside a conversation:
openclaw cron run <ingest-job-id>
Automated: Cron processes up to 3 sources daily at 4AM.
Querying the wiki
The agent checks memory/wiki/index.md for relevant pages, reads them, and synthesizes answers with citations. If a question reveals a knowledge gap, it adds an entry to the ingestion queue for future research.
Manual lint
Say "wiki lint" to run a health check anytime.
Page Format
Pages use domain-prefixed kebab-case names with YAML frontmatter:
---
title: "Senolytics Overview"
domain: longevity
created: 2026-04-07
updated: 2026-04-07
sources:
- work/wiki-sources/papers/unity-trial.pdf
tags: [senescence, aging]
confidence: high
status: active
---
# Senolytics Overview
## Summary
2-3 sentence overview.
## Key Claims
1. Claim with source attribution
## Open Questions
- Unresolved questions
## Related
- [[longevity-cellular-reprogramming]]
Domains: bio, vita, longevity, tech, ops, finance, people (customizable in WIKI-SCHEMA.md)
See skills/wiki-system/templates/page-template.md for a starter.
File Layout
WIKI-SCHEMA.md <- Rules and conventions
memory/wiki/index.md <- Page catalog (<4000 tokens)
memory/wiki/log.md <- Activity log (append-only)
memory/wiki/{domain}-{topic}.md <- Wiki pages
work/wiki-sources/ <- Raw source documents
work/wiki-sources/ingestion-queue.md <- Processing queue
skills/wiki-system/scripts/ <- Ingest and lint prompts
skills/wiki-system/templates/ <- Scaffold templates
skills/wiki-system/references/ <- Background on the pattern
Cron Schedule
Job
Schedule
Model
Purpose
Wiki Ingest
4:00 AM daily
Sonnet
Process ingestion queue
Wiki Lint
Sunday 3:30 AM
Haiku
Health check + cleanup
WIKI-SCHEMA.md <- Rules and conventions
memory/wiki/index.md <- Page catalog (<4000 tokens)
memory/wiki/log.md <- Activity log (append-only)
memory/wiki/{domain}-{topic}.md <- Wiki pages
work/wiki-sources/ <- Raw source documents
work/wiki-sources/ingestion-queue.md <- Processing queue
skills/wiki-system/scripts/ <- Ingest and lint prompts
skills/wiki-system/templates/ <- Scaffold templates
skills/wiki-system/references/ <- Background on the pattern
| Job | Schedule | Model | Purpose |
|---|---|---|---|
| Wiki Ingest | 4:00 AM daily | Sonnet | Process ingestion queue |
| Wiki Lint | Sunday 3:30 AM | Haiku | Health check + cleanup |
Timezone configurable via --tz during setup. Ingest runs 90 minutes after Dreaming (2:30AM) to avoid conflicts.
Troubleshooting
- Pages not searchable:
openclaw memory status to check index. Try openclaw memory index --force.
- Cron not firing:
openclaw cron list for status. Restart gateway if needed.
- Index too large: At 80+ pages, schema supports domain sub-indices. See WIKI-SCHEMA.md.
- Dreaming conflicts: Impossible by design. Wiki and Dreaming write to different files with a 90-minute scheduling buffer.
Credits
openclaw memory status to check index. Try openclaw memory index --force.openclaw cron list for status. Restart gateway if needed.Inspired by Andrej Karpathy's LLM Wiki pattern. Implementation adapted for OpenClaw's memory architecture with compatibility across all memory backends (builtin, QMD, Honcho), optional Dreaming integration, and SuperMemory cloud persistence.
See skills/wiki-system/references/karpathy-llm-wiki.md for the full concept breakdown.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。