mini-context-graph
A persistent, compounding knowledge base combining Karpathy's LLM Wiki pattern with a structured knowledge graph. Ingest documents once — the LLM writes wiki pages, extracts entities/relations into the graph, and stores raw content for evidence retrieval. Knowledge accumulates and cross-references; it is never re-derived from scratch.
npx skills add github/awesome-copilot --skill mini-context-graph --agent copilot
Same command for any agent — swap --agent for claude-code, codex, cursor.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Mini Context Graph Skill ## The Core Idea Standard RAG re-discovers knowledge from scratch on every query. This skill is different: 1. **Wiki layer** — The LLM writes and maintains persistent markdown pages (summaries, entity pages, topic syntheses). Cross-references are already there. The wiki gets richer with every ingest. 2. **Graph layer** — Entities and relations are extracted once and stored as a navigable knowledge graph. BFS traversal answers structural queries without re-reading sources. 3. **Raw source layer** — Original documents are stored immutably with chunks. Provenance links tie every graph node and edge back to the exact text that supports it. > The LLM writes; the Python tools handle all bookkeeping. --- ## Three Layers | Layer | Where | What the LLM does | What Python does | |-------|-------|-------------------|-----------------| | **Raw Sources** | `data/documents.json` | Reads (never modifies) | Stores chunks + metadata | | **Wiki** | `wiki/` (markdown) | Writes/updates pages | Manages index.md + log.md | | **Graph** | `data/graph.json` | Extracts entities + relations | Persists, deduplicates, traverses | --- ## ⚡ Quick Start for Agents ```python from scripts
- The Core Idea
- Three Layers
- ⚡ Quick Start for Agents
- Operations
- Ingest
- Query
- Lint
- Ingestion Constraints
- Retrieval Constraints
- Full Python API Reference
- Design Philosophy
What does the mini-context-graph skill do?
A persistent, compounding knowledge base combining Karpathy's LLM Wiki pattern with a structured knowledge graph. Ingest documents once — the LLM writes wiki pages, extracts entities/relations into the graph, and stores raw content for evidence retrieval. Knowledge accumulates and cross-references; it is never re-derived from scratch.
How do I install it?
Run `npx skills add github/awesome-copilot --skill mini-context-graph --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.