Claude-skill-registry context-graph
Use when storing decision traces, querying past precedents, or implementing learning loops. Load in COMPLETE state or when needing to learn from history. Covers semantic search with Voyage AI embeddings, ChromaDB for cross-platform vector storage, and pattern extraction from history.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/context-graph" ~/.claude/skills/majiayu000-claude-skill-registry-context-graph && rm -rf "$T"
manifest:
skills/data/context-graph/SKILL.mdtags
source content
Context Graph
Living records of decision traces with semantic search. Find similar past decisions by meaning, not keywords.
Setup
MCP Server (recommended):
The context-graph MCP server provides the same functionality via tools:
- Store decisions with embeddingscontext_store_trace
- Semantic searchcontext_query_traces
- Get by IDcontext_get_trace
- Mark success/failurecontext_update_outcome
- List with paginationcontext_list_traces
- Category breakdowncontext_list_categories
Configure in
.claude/mcp.json:
{ "mcpServers": { "context-graph": { "command": "uv", "args": ["--directory", "context-graph-mcp", "run", "python", "server.py"], "env": {"VOYAGE_API_KEY": "your_key_here"} } } }
CLI Scripts (alternative):
# 1. Install dependencies pip install voyageai chromadb # 2. Set Voyage AI key export VOYAGE_API_KEY="your_key_here" # 3. Store/query traces python scripts/store-trace.py "DECISION" python scripts/query-traces.py "similar situation"
Instructions
- Store trace after decisions with category + outcome
- Query precedents when facing similar situations
- Update outcome to success/failure after validation
Quick Commands (MCP)
context_store_trace(decision="Chose FastAPI for async", category="framework") context_query_traces(query="web framework choice", limit=5) context_update_outcome(trace_id="trace_abc...", outcome="success")
Quick Commands (CLI)
# Store a decision trace python scripts/store-trace.py "Chose FastAPI over Flask for async support" --category framework # Find similar past decisions python scripts/query-traces.py "web framework selection" # Query by category python scripts/query-traces.py "database choice" --category architecture --limit 3 # Output JSON for parsing python scripts/query-traces.py "error handling" --json
Trace Schema
| Field | Description |
|---|---|
| Unique trace identifier |
| When stored |
| Grouping (framework, api, error, etc.) |
| What was decided (text) |
| pending / success / failure |
| State machine state when decided |
| Related feature (if any) |
| 1024-dim vector (Voyage AI) |
Categories
- Tech stack choicesframework
- Design patterns, structurearchitecture
- Endpoint design, contractsapi
- Failure modes, fixeserror
- Test strategiestesting
- Infra decisionsdeployment
When to Use
| Situation | Action |
|---|---|
| Made a technical decision | Store trace with category |
| Facing similar problem | Query traces before deciding |
| Session complete | Query category → extract patterns |
| Repeating error | Query traces for that error |