Agent skill
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 this agent skill to your Project
npx add-skill https://github.com/ingpoc/SKILLS/tree/main/context-graph
SKILL.md
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:
context_store_trace- Store decisions with embeddingscontext_query_traces- Semantic searchcontext_get_trace- Get by IDcontext_update_outcome- Mark success/failurecontext_list_traces- List with paginationcontext_list_categories- Category breakdown
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 |
|---|---|
id |
Unique trace identifier |
timestamp |
When stored |
category |
Grouping (framework, api, error, etc.) |
decision |
What was decided (text) |
outcome |
pending / success / failure |
state |
State machine state when decided |
feature_id |
Related feature (if any) |
embedding |
1024-dim vector (Voyage AI) |
Categories
framework- Tech stack choicesarchitecture- Design patterns, structureapi- Endpoint design, contractserror- Failure modes, fixestesting- Test strategiesdeployment- Infra decisions
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 |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
scroll-storyteller
Use when creating interactive scroll-based storytelling experiences with mouse-following spotlight effects, animated SVG art, and the Anthropic design language. Load for explainer pages, product showcases, visual narratives, or any content needing immersive scroll storytelling with organic shapes and smooth animations. Supports GSAP-powered or lightweight CSS-only animations.
enforcement
Use when implementing hooks that BLOCK invalid actions, creating quality gates for state transitions, or enforcing tested:true verification. Load when designing enforcement mechanisms. Uses exit code 2 to block, JSON permissionDecision:deny, or updatedInput modification. Rules are instructions; hooks are enforcement.
async-programming-skill
This skill provides async/await patterns and best practices for concurrent programming
postgresql-skill
This skill provides PostgreSQL-specific patterns for database design, optimization, and transaction management
token-efficient
Use when processing 50+ items, analyzing CSV/log files, executing code in sandbox, or searching for tools. Load for data processing tasks. Achieves 98%+ token savings via in-sandbox execution, progressive disclosure, and pagination. Supports heredocs for multi-line bash.
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Didn't find tool you were looking for?