/copilot-customization-authoring:mini-context-graphfrom copilot-customization-authoring
Persistent knowledge base combining wiki pages, a knowledge graph, and raw source storage. Ingest documents once; the LLM writes wiki pages, extracts entities/relations, and stores provenance for evidence-backed retrieval.
Ships in copilot-customization-authoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Standard RAG re-discovers knowledge from scratch on every query. This skill is different:
The LLM writes; the Python tools handle all bookkeeping.
| 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 |
A complete runnable version of this workflow is in scripts/template_agent_workflow.py — copy and adapt it.
from scripts.contextgraph import ContextGraphSkill
from scripts.tools import wiki_store
skill = ContextGraphSkill()
# ===== INGEST WITH FULL RAG + WIKI =====
# 1. Read references/ingestion.md and references/ontology.md first
# 2. Extract entities and relations (LLM reasoning step)
entities = [
{"name": "memory leak", "type": "issue", "supporting_text": "memory leaks cause crashes"},
{"name": "system crash", "type": "issue", "supporting_text": "system crashes due to memory leaks"},
]
relations = [
{"source": "memory leak", "target": "system crash", "type": "causes",
"confidence": 1.0, "supporting_text": "System crashes due to memory leaks."},
]
result = skill.ingest_with_content(
doc_id="doc_001",
title="System Crash Analysis",
source="/docs/incident_report.pdf",
raw_content="System crashes due to memory leaks. Memory leaks occur when objects are not released.",
entities=entities,
relations=relations,
)
# result = {"doc_id": "doc_001", "chunk_count": 1, "nodes_added": 2, "edges_added": 1}
# 3. Write a wiki summary page for this document
wiki_store.write_page(
category="summary",
title="System Crash Analysis Summary",
content="""---
title: System Crash Analysis
source_document: doc_001
tags: [summary, incident]
---
# System Crash Analysis
**Source:** incident_report.pdf
## Key Claims
- [[memory-leak]] causes [[system-crash]] (confidence: 1.0)
## Entities
- [[memory-leak]] (issue)
- [[system-crash]] (issue)
""",
summary="Incident report: memory leaks cause system crashes.",
)
# ===== QUERY WITH EVIDENCE =====
result = skill.query_with_evidence("Why does the system crash?")
# Returns: {"query": ..., "subgraph": ..., "supporting_documents": [...], "evidence_chain": ...}
# ===== WIKI SEARCH (read wiki before answering) =====
pages = wiki_store.search_wiki("memory leak")
# Returns: [{slug, category, path, snippet}, ...]
When a user provides a new document:
references/ingestion.md — entity/relation extraction rules.references/ontology.md — type normalization rules.skill.ingest_with_content(...) — stores raw content + chunks + graph nodes + provenance.wiki_store.write_page(category="summary", ...).wiki_store.write_page(category="entity", ...).When a user asks a question:
wiki_store.search_wiki(query) to find relevant pages. Read them.skill.query_with_evidence(query).supporting_documents.Periodically health-check the wiki:
from scripts.tools import wiki_store
issues = wiki_store.lint_wiki()
# Returns: {orphan_pages, missing_pages, broken_wikilinks, isolated_pages}
Ask the LLM to review and fix: broken links, orphan pages, stale claims, missing cross-references. See references/lint.md for full lint workflow.
supporting_text for every entity and relation — this enables provenance| Method | Purpose | When to Use |
|---|---|---|
skill.ingest_with_content(doc_id, title, source, raw_content, entities, relations) | Full RAG ingest: raw docs + graph + provenance | Every new document |
skill.add_node(name, node_type) | Add single entity (no provenance) | Quick additions without a source doc |
skill.add_edge(source_name, target_name, relation, confidence) | Add single relation | Quick additions without a source doc |
skill.query(query) | Graph-only retrieval → subgraph | Structural queries |
skill.query_with_evidence(query) | Graph + provenance → subgraph + source chunks | Queries requiring citations |
wiki_store.write_page(category, title, content, summary) | Write/update a wiki page | After every ingest; after answering queries |
wiki_store.read_page(category, title) | Read a wiki page | Before answering; for cross-referencing |
wiki_store.search_wiki(query) | Keyword search across wiki | Fast path before graph traversal |
wiki_store.list_pages(category) | List all wiki pages | Getting an overview |
wiki_store.get_log(last_n) | Read recent operations | Understanding wiki history |
wiki_store.lint_wiki() | Health check | Periodic maintenance |
documents_store.list_documents() | List all ingested raw sources | Audit / provenance checking |
documents_store.search_chunks(query) | Chunk-level search | Finding specific evidence |
"The wiki is a persistent, compounding artifact. The cross-references are already there. The synthesis already reflects everything you've read." — Karpathy
| Layer | What Happens | Who Owns It |
|---|---|---|
| LLM Reasoning | Extraction, synthesis, writing wiki pages | Agent (.md guidance files) |
| Wiki Persistence | Index, log, file I/O | wiki_store.py |
| Graph Persistence | Dedup, index, BFS traverse | graph_store.py, retrieval_engine.py |
| Raw Source Storage | Immutable docs + chunks + provenance | documents_store.py |
The human curates sources and asks questions. The LLM writes the wiki, extracts the graph, and answers with citations. Python handles all bookkeeping.
At discovery time, only name and description are loaded. Read or execute bundled resources only when the current task needs them.
references/ingestion.md, references/ontology.md, references/retrieval.md, and references/lint.md: extraction, normalization, retrieval, and lint guidance.scripts/template_agent_workflow.py, scripts/contextgraph.py, scripts/config.py, and scripts/tools/: runnable workflow and storage APIs.## Mini context graph result
**Status:** ingested | answered | linted | blocked
**Operation:** <ingest | query | lint>
**Source/query:** `<doc_id, source path, or user question>`
### Evidence
- Documents: <supporting_documents or ingested sources>
- Entities: <entity names and types>
- Relations: <source -> relation -> target with confidence>
### Wiki updates
- `<wiki page>`: <created | updated | read | unchanged>
supporting_text.MIN_CONFIDENCE or confidence 0.6 was added.skill.ingest_with_content(...) and wrote a summary page.references/ingestion.md (opens in a new tab)references/lint.md (opens in a new tab)references/ontology.md (opens in a new tab)references/retrieval.md (opens in a new tab)scripts/config.py (opens in a new tab)scripts/contextgraph.py (opens in a new tab)scripts/template_agent_workflow.py (opens in a new tab)scripts/tools/__init__.py (opens in a new tab)scripts/tools/documents_store.py (opens in a new tab)scripts/tools/graph_store.py (opens in a new tab)scripts/tools/index_store.py (opens in a new tab)scripts/tools/ontology_store.py (opens in a new tab)scripts/tools/retrieval_engine.py (opens in a new tab)scripts/tools/wiki_store.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin copilot-customization-authoring21 skills in this plugin
/agent-skill-stackFind, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a multi-step workflow, asks which Skills fit a project, needs an installed-Skill audit or conflict check, has low Skill recall, wants indirect helpers such as humanizers or compliance checks, or wants a project-specific Skill Stack with controlled installation. Search local Skills, registries, GitHub, and OpenCLI; compare adoption, verified fit, safety, and overlap. Do not use for locating one known or common Skill; use the generic find-skills workflow./ai-readyHelp users install and use John Papa's ai-ready skill as the up-to-date source for making repositories AI-ready with AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and stack-specific guidance. Use when the user asks to make a repo ai-ready, set up AI config, prepare for AI contributions, or install ai-ready./boost-promptRefine a rough task request into a high-quality markdown prompt by clarifying scope, deliverables, constraints, context, and success criteria, then copy the final prompt to the clipboard with Joyride. Use when the user asks to improve, boost, rewrite, or polish a prompt without writing code. Requires Joyride.Other plugins' skills for the same job