Every time you try to build an AI agent pipeline, you hit the wall of context window bloat. Loading too many skills, agents, and MCP servers into your session quickly overwhelms the AI’s limited memory, leading to degraded performance or costly token usage. ctx tackles this exact pain point by organizing over 100,000 AI skills and agents into a dynamic knowledge graph that recommends the most relevant entities per session, keeping context budgets in check.
what ctx does and how it is built
ctx is a Python CLI tool designed for managing and navigating a massive knowledge graph of AI skills, agents, MCP servers, and harness frameworks, primarily targeting Claude Code environments. The graph contains 104,079 nodes and nearly 3 million edges, representing 92,815 skills, 464 agents, 10,787 MCP servers, and 13 harness frameworks like LangGraph, CrewAI, and AutoGen.
Under the hood, ctx integrates deeply with Claude Code via hooks that trigger after tool use or stop events. When you point it at a repository, it scans and analyzes the codebase to recommend contextually relevant skills, agents, or MCP servers. This recommendation is powered by a graph-walking algorithm that prioritizes entities based on session signals, usage history, and quality scoring.
The architecture revolves around the knowledge graph as the central data structure. Skills are imported and hydrated from external sources such as Skills.sh, with over 90,000 entries included. The system maintains metadata about installation status, quality scores, and usage health, automatically flagging stale or unused skills to keep your AI agents focused on fresh, high-value components.
Python is the primary language, providing CLI tooling and integration glue. The system ships with a pre-built graph tarball for easy setup, including all cataloged skills and harnesses.
technical strengths and architecture tradeoffs
The standout technical feature is the use of a graph-based recommendation engine to optimize the AI context window. Instead of blindly loading all possible skills or agents, ctx selects the best 10-15 entities per session based on repository signals and historical usage. This approach addresses a common bottleneck in agentic AI development: context budget optimization.
The graph structure, with nearly 3 million edges, allows complex relationships and dependencies between skills, agents, and MCP servers to be encoded and traversed efficiently. This enables context-aware recommendations that adapt as the AI session evolves.
Quality scoring and health monitoring add another layer of intelligence. By scoring skills based on installation success, usage frequency, and update status, ctx helps maintain a clean and reliable skill set. The automatic flagging of stale skills reduces noise and improves developer DX.
A local monitoring dashboard provides real-time visualization of loaded entities, session timelines, audit logs, and SSE event streaming. This is useful for debugging and understanding what the AI agent is working with in a live session.
The tradeoff is the complexity of managing such a large graph and keeping metadata synchronized. The hydration and import processes require significant pre-processing. Also, the system is tightly coupled with Claude Code and MCP frameworks, which may limit its applicability outside that ecosystem.
quick start
pip install claude-ctx
ctx-init # terminal wizard: hooks, graph, model, harness goal
ctx-init --wizard # force the same wizard from scripts/tests
ctx-init --model-mode skip # non-interactive setup for automation
ctx-init --model-mode custom --model openai/gpt-5.5 --goal "build a CAD agent"
Optional extras: pip install "claude-ctx[embeddings]" for the semantic backend, pip install "claude-ctx[dev]" for the test toolchain.
For an out-of-the-box experience, a pre-built knowledge graph tarball containing all 104,079 nodes and 2,960,215 edges is available. It includes cataloged skills and harnesses ready to extract into ~/.claude/skill-wiki/ for immediate use.
verdict
ctx is a specialized tool for AI developers working within Claude Code or similar MCP frameworks who face the challenge of managing extensive skill and agent libraries without overwhelming the AI context window. Its graph-based approach to recommendation and lifecycle management is a pragmatic solution to a real bottleneck.
However, the complexity of the system and its dependency on Claude Code integrations mean it is not a plug-and-play solution for all AI projects. Setting up and maintaining the knowledge graph and related metadata requires investment.
If you’re building multi-agent AI systems and want a more structured, context-aware way to manage skills and agents, ctx is worth exploring. Just be prepared for the overhead that comes with scaling to over 100,000 nodes and millions of edges. The local monitoring dashboard and quality scoring features add useful operational insights to keep your AI tooling healthy and performant.
Related Articles
- Inside agents: a granular multi-agent orchestration system with PluginEval quality assurance — Explore agents, a Python-based multi-agent orchestration repo featuring 184 AI agents, 78 plugins, and a three-layer Plu
- LobeHub: An extensible AI agent playground with MCP plugin architecture — LobeHub offers a TypeScript-based AI agent platform with a unique MCP plugin system for integrating 10,000+ skills and c
→ GitHub Repo: stevesolun/ctx ⭐ 296 · Python