agentic-skill-router - Agentic Search-inspired skill routing and slimming
Use this skill when the user wants to inspect installed Agent Skills, identify
unused or stale skills, disable or restore skills, or route a request to a
locally disabled skill. For ordinary task requests, first use any enabled
local Agent Skill that clearly matches; if none does, use this fallback router
for skill-shaped requests involving named tools, APIs, services, CLIs, file
formats, platforms, datasets, or domain workflows. The skill instructions are
host-neutral; installation methods provide the host-specific plugin or
slash-command entry point.
Locate the CLI
If references/local-cli.md exists, read it before any filesystem search and
use the helper defined there; it is generated by agentic-skill-router init
and pins the right local CLI path and host. Do not search the current project,
package manager caches, or unrelated worktrees for another
agentic-skill-router binary unless that generated helper path is missing or
not executable.
When no generated local helper exists, prefer ${AGENTIC_SKILL_ROUTER_CLI} if
it is set. Otherwise locate the bundled CLI next to this skill installation.
- Installed plugin: compute the plugin root by taking
dirname three times
from this SKILL.md path (.../skills/agentic-skill-router/SKILL.md ->
plugin root), then append bin/agentic-skill-router.
- Repository checkout: only when this skill is being read inside the
agentic-skill-router repository checkout itself, use
bin/agentic-skill-router.
Always invoke the CLI by absolute path. Installed plugin wrappers set the host
before delegating to the shared runtime. Repository checkout CLIs default to
Claude Code.
Define a helper for the resolved CLI path:
agentic_skill_router() { "<abs-path-to-agentic-skill-router>" "$@"; }
Manage skills
For cleanup requests, run:
agentic_skill_router suggest --json
Show suggestions as a compact table with id, reason, confidence, and details.
Never disable without explicit user confirmation. After confirmation, disable
specific ids or all current suggestions. The CLI requires --yes for every
disable form; without it no skill files are renamed.
agentic_skill_router disable <id...> --yes
agentic_skill_router disable --all-suggested --yes
Use list --json for a full inventory, status --json for
disabled records and repair status, and enable <id...> to restore
previously disabled skills.
If the user wants to adjust the staleness threshold, mention
--unused-for=60d (or 2w, 3m, 1y) or the persistent config at
~/.agentic-skill-router/config.json:
{ "unusedForDays": 60 }
Route disabled skills
Use this fallback router after enabled local Agent Skills have been considered
and none clearly match a skill-shaped request: operating, querying, configuring,
deploying, inspecting, or troubleshooting a named tool, API, service,
dashboard, datastore, CLI, DSL, URL, file format, platform workflow, or domain
method.
Use the agentic-skill-router corpus primitives as an Agentic Search-inspired,
non-vectorized retrieval harness for skill management. Do not call
route. Do not call dci or body. During retrieval, do
not read disabled skill bodies. Route from disabled-skill metadata only. Do not
assume embeddings, a vector database, or any hidden semantic index exists.
Build two term sets from the current user request:
- must terms: 1-3 narrow terms that the correct skill should mention
(file extensions, exact APIs/tools, named methods, protocols, or required
operations).
- probe terms: 2-5 additional distinctive terms for recall and ranking.
Prefer exact technical terms over broad words like data, analysis,
report, file, output, or json. For file-format tasks, include both
the extension and artifact family when relevant, such as pptx plus
presentation, or docx plus document.
Search disabled-skill metadata with a bounded, agent-controlled query:
agentic_skill_router corpus search \
--all "<must1>" --any "<probe1>" --any "<probe2>" --any "<probe3>" \
--limit 30 --json
The result reports totalMatches, returned, truncated, and stable
ref values. Do not accept a truncated broad result as final evidence.
Iterate for a small bounded number of searches (2-4 total) until the
shortlist is useful: if totalMatches is 0, broaden or replace one must
term; if truncated is true or totalMatches > 30, narrow with another
--all term or more specific probes. Never dump the whole catalog.
Once the returned shortlist is small enough, compare the metadata evidence
in the JSON result. If one candidate explicitly covers the required
operation, choose it. If 2-3 candidates remain plausible, inspect only those
metadata records:
agentic_skill_router corpus inspect corpus-REF1 corpus-REF2 corpus-REF3 --json
Choose by metadata evidence:
- Prefer explicit operation coverage over nearby topic similarity.
- Prefer a dedicated file-format/tool skill when the task is to operate that
file format or tool.
- Prefer a domain/method skill when the named method/domain constraint is
central and the file/tool is only the substrate.
- For retrieve, extract, or structured-answer tasks, prefer metadata that
mentions evidence, search, extraction, or structured output over broad
discovery or planning.
- If still tied, choose the metadata covering the most distinctive required
verbs and nouns.
Record exactly one selected disabled skill, then read that skill file:
agentic_skill_router corpus select "<corpus-ref-or-id>" \
--query "<current user request>" \
--confidence high \
--reason "<brief metadata evidence>" \
--json
If the result has action: "read-skill-file" and a non-null selected,
read selected.skillMdPath even when it ends in
SKILL.md.agentic-skill-router-disabled, then follow that disabled skill's
instructions as if it were enabled.
If metadata evidence remains weak or ambiguous, stop the router path and
continue normally without selecting a disabled skill.
Safety
- Built-in and system skills are protected and cannot be disabled.
- The disable mechanism is a rename:
SKILL.md to
SKILL.md.agentic-skill-router-disabled. Never delete skill files.
- Never disable a skill without explicit user confirmation.
- Do not disable a whole plugin when a disabled skill still depends on that
plugin's MCP tools or app tools.
- State is stored under
~/.agentic-skill-router/state-<host>.json.
References
references/cli-location.md - CLI lookup details.
references/slimming.md - listing, suggestions, disable, enable, and status.
references/disabled-routing.md - L-agentic disabled-skill corpus workflow.
references/safety.md - confirmation, protection, and repair rules.
1---2name: agentic-skill-router3description: First use any clearly matching enabled local/user Agent Skill. If none matches, prefer this router for skill-shaped requests involving a named tool, API, service, CLI, platform, file format, dataset, or domain workflow, including when a generic built-in skill such as browser, Chrome, or web search also seems applicable; use built-ins directly only when explicitly requested or when the task is primarily live browsing, logged-in page operation, clicking, screenshotting, or current webpage inspection. Also use directly to audit, slim, disable, restore, or route locally installed Agent Skills across supported hosts. Examples include Vercel, Netlify, Cloudflare, Render, Playwright, Sentry, Linear, GitHub, OpenAI APIs, PDF, DOCX, PPTX, and spreadsheets.4---56# agentic-skill-router - Agentic Search-inspired skill routing and slimming78Use this skill when the user wants to inspect installed Agent Skills, identify9unused or stale skills, disable or restore skills, or route a request to a10locally disabled skill. For ordinary task requests, first use any enabled11local Agent Skill that clearly matches; if none does, use this fallback router12for skill-shaped requests involving named tools, APIs, services, CLIs, file13formats, platforms, datasets, or domain workflows. The skill instructions are14host-neutral; installation methods provide the host-specific plugin or15slash-command entry point.1617## Locate the CLI1819If `references/local-cli.md` exists, read it before any filesystem search and20use the helper defined there; it is generated by `agentic-skill-router init`21and pins the right local CLI path and host. Do not search the current project,22package manager caches, or unrelated worktrees for another23`agentic-skill-router` binary unless that generated helper path is missing or24not executable.2526When no generated local helper exists, prefer `${AGENTIC_SKILL_ROUTER_CLI}` if27it is set. Otherwise locate the bundled CLI next to this skill installation.2829- Installed plugin: compute the plugin root by taking `dirname` three times30 from this `SKILL.md` path (`.../skills/agentic-skill-router/SKILL.md` ->31 plugin root), then append `bin/agentic-skill-router`.32- Repository checkout: only when this skill is being read inside the33 `agentic-skill-router` repository checkout itself, use34 `bin/agentic-skill-router`.3536Always invoke the CLI by absolute path. Installed plugin wrappers set the host37before delegating to the shared runtime. Repository checkout CLIs default to38Claude Code.39Define a helper for the resolved CLI path:4041```bash42agentic_skill_router() { "<abs-path-to-agentic-skill-router>" "$@"; }43```4445## Manage skills4647For cleanup requests, run:4849```bash50agentic_skill_router suggest --json51```5253Show suggestions as a compact table with id, reason, confidence, and details.54Never disable without explicit user confirmation. After confirmation, disable55specific ids or all current suggestions. The CLI requires `--yes` for every56disable form; without it no skill files are renamed.5758```bash59agentic_skill_router disable <id...> --yes60agentic_skill_router disable --all-suggested --yes61```6263Use `list --json` for a full inventory, `status --json` for64disabled records and repair status, and `enable <id...>` to restore65previously disabled skills.6667If the user wants to adjust the staleness threshold, mention68`--unused-for=60d` (or `2w`, `3m`, `1y`) or the persistent config at69`~/.agentic-skill-router/config.json`:7071```json72{ "unusedForDays": 60 }73```7475## Route disabled skills7677Use this fallback router after enabled local Agent Skills have been considered78and none clearly match a skill-shaped request: operating, querying, configuring,79deploying, inspecting, or troubleshooting a named tool, API, service,80dashboard, datastore, CLI, DSL, URL, file format, platform workflow, or domain81method.8283Use the `agentic-skill-router` corpus primitives as an Agentic Search-inspired,84non-vectorized retrieval harness for skill management. Do not call85`route`. Do not call `dci` or `body`. During retrieval, do86not read disabled skill bodies. Route from disabled-skill metadata only. Do not87assume embeddings, a vector database, or any hidden semantic index exists.88891. Build two term sets from the current user request:90 - **must terms**: 1-3 narrow terms that the correct skill should mention91 (file extensions, exact APIs/tools, named methods, protocols, or required92 operations).93 - **probe terms**: 2-5 additional distinctive terms for recall and ranking.9495 Prefer exact technical terms over broad words like `data`, `analysis`,96 `report`, `file`, `output`, or `json`. For file-format tasks, include both97 the extension and artifact family when relevant, such as `pptx` plus98 `presentation`, or `docx` plus `document`.991002. Search disabled-skill metadata with a bounded, agent-controlled query:101102 ```bash103 agentic_skill_router corpus search \104 --all "<must1>" --any "<probe1>" --any "<probe2>" --any "<probe3>" \105 --limit 30 --json106 ```107108 The result reports `totalMatches`, `returned`, `truncated`, and stable109 `ref` values. Do not accept a truncated broad result as final evidence.110 Iterate for a small bounded number of searches (2-4 total) until the111 shortlist is useful: if `totalMatches` is 0, broaden or replace one must112 term; if `truncated` is true or `totalMatches` > 30, narrow with another113 `--all` term or more specific probes. Never dump the whole catalog.1141153. Once the returned shortlist is small enough, compare the metadata evidence116 in the JSON result. If one candidate explicitly covers the required117 operation, choose it. If 2-3 candidates remain plausible, inspect only those118 metadata records:119120 ```bash121 agentic_skill_router corpus inspect corpus-REF1 corpus-REF2 corpus-REF3 --json122 ```1231244. Choose by metadata evidence:125 - Prefer explicit operation coverage over nearby topic similarity.126 - Prefer a dedicated file-format/tool skill when the task is to operate that127 file format or tool.128 - Prefer a domain/method skill when the named method/domain constraint is129 central and the file/tool is only the substrate.130 - For retrieve, extract, or structured-answer tasks, prefer metadata that131 mentions evidence, search, extraction, or structured output over broad132 discovery or planning.133 - If still tied, choose the metadata covering the most distinctive required134 verbs and nouns.1351365. Record exactly one selected disabled skill, then read that skill file:137138 ```bash139 agentic_skill_router corpus select "<corpus-ref-or-id>" \140 --query "<current user request>" \141 --confidence high \142 --reason "<brief metadata evidence>" \143 --json144 ```145146 If the result has `action: "read-skill-file"` and a non-null `selected`,147 read `selected.skillMdPath` even when it ends in148 `SKILL.md.agentic-skill-router-disabled`, then follow that disabled skill's149 instructions as if it were enabled.150151If metadata evidence remains weak or ambiguous, stop the router path and152continue normally without selecting a disabled skill.153154## Safety155156- Built-in and system skills are protected and cannot be disabled.157- The disable mechanism is a rename: `SKILL.md` to158 `SKILL.md.agentic-skill-router-disabled`. Never delete skill files.159- Never disable a skill without explicit user confirmation.160- Do not disable a whole plugin when a disabled skill still depends on that161 plugin's MCP tools or app tools.162- State is stored under `~/.agentic-skill-router/state-<host>.json`.163164## References165166- `references/cli-location.md` - CLI lookup details.167- `references/slimming.md` - listing, suggestions, disable, enable, and status.168- `references/disabled-routing.md` - L-agentic disabled-skill corpus workflow.169- `references/safety.md` - confirmation, protection, and repair rules.