capability-router

A request router that chooses one of three code-help functions: defining terms, showing code structure, or searching code. It uses fixed rules first and may accept a local model’s choice only when it matches the known options.

In plain words
What is it for?
Use it to direct questions such as “what does this acronym mean?”, “who calls this function?”, or “find code related to payments” to the appropriate code-analysis function.
Why use it?
It prevents unclear or unavailable model decisions from sending a request to the wrong function. It also records how each choice was made.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hellothisworld/open-mind/capability-router
Any agent
npx skills add HelloThisWorld/open-mind --skill capability-router
Clone the repo
git clone --depth 1 https://github.com/HelloThisWorld/open-mind

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 447 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.00447
Opus 5 $0.00031 $0.00224
Sonnet 5 $0.00012 $0.00089
Haiku 4.5 $0.00006 $0.00045

Measured yesterday against content hash 1e739f75e4b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

capability-router scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/capability-router/SKILL.md · 36 lines

What it actually says

Capability router — agent-style invocation with graceful degradation

What it does

Given a natural-language or identifier query, decides which capability should handle it and (optionally) invokes it:

  • glossary — define a term/acronym,
  • structure — callers/callees, dependencies, modules, flow,
  • search — find code by concept or identifier.

How the decision is made (the engineering point)

  1. A deterministic if-else classifier always runs first (_heuristic_route) — the always-available floor (e.g. a bare identifier or "what is X" → glossary; "who calls X" / "dependency graph" → structure; otherwise → search).
  2. If a local model is ready, it is asked to classify into one capability word. Its answer is validated against the capability set and accepted ONLY if valid.
  3. An unavailable, slow, or off-spec model silently degrades to the deterministic choice. The model can never select a capability outside the known set or override the floor unchecked.

The response is a full trace: {capability, decided_by, deterministic_fallback, reason} — so the routing is auditable and behaviour never depends on the model being right.

Invocation

  • MCP tools: route(query) (decision + trace), dispatch(scope, query) (route then invoke the capability, returning its result + trace).
  • REST: GET /route?query=, GET /dispatch?scope=&query=.

Implementation / verification

openmind/router.py. The deterministic floor is covered by routing a fixed query set with use_model=False; readiness gating reuses openmind.llm_client.is_ready().

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 36 lines · 62 tokens per session scan A 1e739f75e4b4

Subscribe to this mod's changes

capability-router is a skill published in the GitHub repository HelloThisWorld/open-mind (1 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 447 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

codestory-grounding

Use when an agent should ground a local repository with CodeStory before making source claims, planning edits, choosing tests, reviewing changes, or using broad retrieval evidence through the CodeStory plugin MCP.

TheGreenCedar/CodeStory · 44 tokens

memtrace-first

Route code discovery, debugging, flow tracing, how-code-works questions, and pre-edit rationale checks in indexed source-code repos to Memtrace graph plus Cortex decision tools. Use first before searching/reading code, and before editing, refactoring, deleting, or re-picking an approach that may have a recorded…

syncable-dev/memtrace-public · 115 tokens

memtrace-style-fingerprint

Pull the codebase's empirical style norm from Memtrace and match it when writing or editing source code in an indexed repo. Use when choosing between competing idioms (ternary vs if-else, arrow vs function declaration, const vs let, await vs .then, early-return vs nested-return), matching naming case, or when the user…

syncable-dev/memtrace-public · 111 tokens

memtrace-decision-memory

Use Cortex decision memory through the normal Memtrace MCP tools. Trigger for free-text questions about what was decided, chosen, rejected, banned, or established as a convention; for why a symbol exists or which contracts constrain it; for whether a known decision held, drifted, or was violated; and for the…

syncable-dev/memtrace-public · 137 tokens

memtrace-docs

Use official hosted Memtrace documentation before guessing, web search, or stale local copies. Trigger when the user asks how Memtrace works; how to install, configure, or deploy CLI, MCP, fleet, Cortex, or enterprise MemDB; what tools, skills, or commands exist; wants to find or locate official docs for a topic; or…

syncable-dev/memtrace-public · 125 tokens

memtrace-evolution

Trace source-code change history from Memtrace's symbol-level temporal memory. Use when the user asks about change history, recent modifications, what changed since a date, symbol timeline, evolution, unexpected changes, or incident timelines. Do not use git log, git diff, Grep, or manual file search to reconstruct…

syncable-dev/memtrace-public · 107 tokens