Back to Skills

context-graph

majiayu000
Updated Today
1 views
58
9
58
View on GitHub
Otherai

About

The context-graph skill enables Claude to store, search, and learn from past decision traces using semantic search with Voyage AI embeddings and ChromaDB vector storage. Use it when you need to query historical precedents, implement learning loops, or maintain persistent memory across conversations. It provides tools for storing traces, performing semantic searches, and updating outcomes to improve future decisions.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/majiayu000/claude-skill-registry
Git CloneAlternative
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/context-graph

Copy and paste this command in Claude Code to install this skill

Documentation

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 embeddings
  • context_query_traces - Semantic search
  • context_get_trace - Get by ID
  • context_update_outcome - Mark success/failure
  • context_list_traces - List with pagination
  • context_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

  1. Store trace after decisions with category + outcome
  2. Query precedents when facing similar situations
  3. 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

FieldDescription
idUnique trace identifier
timestampWhen stored
categoryGrouping (framework, api, error, etc.)
decisionWhat was decided (text)
outcomepending / success / failure
stateState machine state when decided
feature_idRelated feature (if any)
embedding1024-dim vector (Voyage AI)

Categories

  • framework - Tech stack choices
  • architecture - Design patterns, structure
  • api - Endpoint design, contracts
  • error - Failure modes, fixes
  • testing - Test strategies
  • deployment - Infra decisions

When to Use

SituationAction
Made a technical decisionStore trace with category
Facing similar problemQuery traces before deciding
Session completeQuery category → extract patterns
Repeating errorQuery traces for that error

GitHub Repository

majiayu000/claude-skill-registry
Path: skills/context-graph

Related Skills

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill

llamaguard

Other

LlamaGuard is Meta's 7-8B parameter model for moderating LLM inputs and outputs across six safety categories like violence and hate speech. It offers 94-95% accuracy and can be deployed using vLLM, Hugging Face, or Amazon SageMaker. Use this skill to easily integrate content filtering and safety guardrails into your AI applications.

View skill