Archive is a long-term memory and wiki system for AI agents, inspired by Andrej Karpathy's LLM Wiki pattern. Instead of re-discovering knowledge on every conversation, the agent incrementally builds and maintains a persistent, interlinked wiki — preferences, project context, and accumulated research that compounds over time.
Three layers, following Karpathy's architecture:
- Sources — raw immutable documents you feed the agent (articles, transcripts, notes)
- Wiki — LLM-maintained interlinked markdown pages (entities, concepts, topic synthesis)
- Index + Log —
_index.mdas navigation catalog,_log.mdas chronological operation history
~/.claude-knowledge/
├── _index.md # Content catalog — always read first
├── _log.md # Append-only operation log (grep-friendly)
├── sources/ # Raw immutable documents
├── wiki/
│ ├── entities/ # People, orgs, products
│ ├── concepts/ # Ideas, patterns, technologies
│ ├── topics/ # Research synthesis pages
│ └── _overview.md # Master wiki summary
├── preferences/ # Code style, writing tone, git conventions
├── projects/ # Per-project auth, stack, endpoints
└── domains/ # Technology knowledge across projects
| Operation | When to use | Example |
|---|---|---|
| Consult | Start of any non-trivial task | Auto-triggered — loads relevant context silently |
| Save | End of session when something new was learned | "Recuerda que usamos gitmoji + Jira ID" |
| Ingest | You have a document to add to the wiki | "Ingesta este artículo" → updates 5–15 wiki pages |
| Query | Ask against accumulated wiki knowledge | "¿Qué sé sobre RAG?" → synthesis with citations |
| Lint | Periodic wiki health check | "Haz un lint de mi wiki" → finds orphans, contradictions, gaps |
The key insight from Karpathy: ingest compiles knowledge once, permanently. Cross-references are already there, contradictions are flagged, synthesis accumulates. Nothing is re-derived from scratch on every query.
# 1. Install the skill
npx skills add jcordon5/archivemacOS / Linux:
bash "$(npx skills list | grep archive | awk '{print $NF}' | perl -pe 's/\e\[[0-9;]*m//g' | sed "s|^~|$HOME|")/scripts/setup-vault.sh"Windows (PowerShell):
powershell -ExecutionPolicy Bypass -File "$((npx skills list | Select-String 'archive' | ForEach-Object { ($_ -split '\s+')[-1] } | ForEach-Object { $_ -replace '\x1b\[[0-9;]*m' } | ForEach-Object { $_ -replace '^~',$HOME }))\scripts\setup-vault.ps1"Open Obsidian, select "Open folder as vault", and point it to ~/.claude-knowledge.
Add to ~/.claude/CLAUDE.md or ~/.codex/AGENTS.mdfor automatic activation:
On every non-trivial task, first determine whether any available skill is relevant
and use it when applicable. If the task requires retrieving prior context,
preferences, reusable solutions, or previously discovered steps, consult the
archive skill before re-solving anything.
After completing the work, evaluate whether any newly learned information should
be stored in archive.