stevesolun/ctx / docs
skill-router
FlaggedRepo-aware recommendation manager for ctx. Scans the active repository, identifies stack and workflow signals, recommends a capped set of skills, agents, and MCP servers, and unloads helpers that no longer match the current work after user confirmation. Harnesses are recommended by the custom-model onboarding flow or loop adapters and then attach to the same recommendation layer.
skill-router/index.md
View on GitHub# Skill router
!!! info "Part of the recommendation surface, not CTX Fit"
The product is **CTX Fit** (`ctx fit`): it finds the cheapest AI coding
setup that reliably works on a repository. See the [home page](../index.md).
This page documents the older graph-backed recommendation layer, which
still ships and is what the published PyPI release installs.
The skill router decides which skills, agents, and MCP servers are useful for
the active repository and current development task. Harnesses are recommended in
the custom-model onboarding flow or loop adapters; after a harness is attached,
the same capped skills/agents/MCP recommendation layer can be used by that host.
## Problem
Every loaded skill, agent, and MCP server costs tokens, attention, and tool
surface area. Most sessions need a small top-scored bundle from the 68,494 skills, 467 agents, and 10,790 MCP servers in the shipped graph, not the whole inventory.
Loading too much:
- wastes context on irrelevant instructions,
- causes the wrong helper to trigger for a task,
- slows response time, and
- creates conflicting instructions between helpers.
## Architecture
```text
ctx/
|-- src/scan_repo.py # Repo scanner -> stack profile
|-- src/ctx/core/resolve/resolve_skills.py # Profile -> load/unload manifest
|-- src/ctx/core/resolve/recommendations.py # Shared recommendation engine
|-- src/ctx/adapters/ # Host adapters + generic tools
`-- graph/wiki-graph-runtime.tar.gz # Shipped graph/wiki runtime
```
## Flow
1. `ctx-scan-repo --repo . --recommend` scans the repository and produces stack signals.
2. The shared resolver scores graph/wiki entities by tags, categories, semantic
edges, usage, quality, and configured gates.
3. The resolver returns a capped manifest: what to load, what to unload, and why.
4. The user confirms load/unload changes unless they configured automatic mode.
5. Usage and quality signals are recorded so future recommendations improve.
The same recommender is used by the CLI, MCP/library tools, Claude Code hooks,
LoopFlow/agent-loop adapter, and attached harness hosts. Entry points should
differ only in transport and confirmation UX, not in ranking logic.
## Reference Pages
- [Stack signatures](../stack-signatures.md) - file/config patterns used to
identify stack signals.
- [Skill-stack matrix](../skill-stack-matrix.md) - stack-to-capability mapping
used as scanner evidence.
- [Entity source registry](../marketplace-registry.md) - skill, GitHub,
MCP, harness, and local sources plus update rules.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |