About skill-router
Skill Router is a skill for finding and loading relevant local skills. It indexes available skill sources and supports ranked search, compact context packets, exact-name reads, and diagnostics.
Key features
- 01Search skills by relevance
- 02Build compact context packets
- 03Read a skill by name or path
- 04Diagnose skill roots and counts
- 05Rank results by source and trust
Use cases
- 01Find a skill for a task
- 02Load relevant skill instructions
- 03Check why a skill is missing
- 04Inspect ranked skill matches
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ wyattowalsh/ agents --skill skill-routerAfter installing, type/skill-routerin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
evals/evals.jsonreferences/routing-guide.mdscripts/_parse.pycheck.pyskill_index.pyscripts/asset_toolkit/__init__.py_shared.pycommon.pypackage.pyvalidate_evals.pyvalidate_hooks.pyvalidate_skill.pyDetails
From the project READMESkill Router
Use local skill indexing to choose and load relevant skills only when a task needs them.
Dispatch
| $ARGUMENTS | Action | Example |
|---|---|---|
search <query> | List ranked matching skills | /skill-router search "fix Playwright test" |
context <query> | Build a compact context packet for top matches | /skill-router context "write a release changelog" |
read <skill> | Load one skill by exact name or path | /skill-router read skill-creator |
doctor | Diagnose visible skill roots and counts | /skill-router doctor |
| Natural-language task | Auto: Search, then context for best matches | "which skill should handle docs generation?" |
| Empty | Show quick usage and run doctor | /skill-router |
Workflow
1. Classify
- Use
searchwhen deciding which skill or skills apply. - Use
contextwhen the next step needs the selected skill bodies. - Use
readonly when the skill name or path is already known. - Use
doctorwhen a skill is missing, duplicated, or omitted by a startup context warning.
2. Retrieve
- Run the matching CLI command from this skill directory or the repository root:
python scripts/skill_index.py search "$ARGUMENTS" --limit 5
python scripts/skill_index.py context "$ARGUMENTS" --limit 3
python scripts/skill_index.py read <skill-name>
python scripts/skill_index.py doctor
3. Select
- Prefer the highest-ranked repo or Codex-user skill when scores are close.
- Read only the minimum skill bodies needed for the task, usually one to three.
- If a result has warnings, inspect them before following executable hooks or scripts.
Source Scope
python scripts/skill_index.py searches these roots:
| Source | Root | Trust tier |
|---|---|---|
repo | skills/ | repo |
project | .agents/skills/ in the current project path | codex-user |
codex | ~/.codex/skills/ | codex-user |
global | ~/.agents/skills/ plus supported agent stores | external-installed |
plugin | ~/.codex/plugins/cache/**/skills/ | openai-plugin or plugin |
Use --source repo, --source codex, --source global, or --source plugin to narrow results when needed.
Canonical Vocabulary
| Term | Meaning |
|---|---|
| skill index | Parsed metadata for visible SKILL.md files across known roots |
| skill context packet | Small set of selected skill bodies loaded after search |
| source | Filesystem origin such as repo, codex, global, or plugin |
| trust tier | Safety label used to rank and warn about retrieved skills |
| warning | Parser, hook, script, or metadata signal requiring inspection before use |
Classification Gate
- If the user gives a task, run
searchfirst. - If the user asks to apply a selected skill, run
contextfor the top matches. - If the user names a skill exactly, run
read. - If the user reports missing or omitted skills, run
doctorbefore searching. - If the user asks to install, create, or audit a skill, redirect out of scope (see NOT for below).
Selection Rules
- Exact skill name or alias beats all lexical matches.
- Name and title matches beat description matches.
- Description matches beat heading and body matches.
- Repo skills beat user-installed skills when relevance is comparable.
- Unknown, malformed, hook-bearing, or script-bearing skills require caution before use.
Critical Rules
- Do not treat startup-visible skills as the complete inventory after a context-budget warning.
- Do not paste every installed skill into context; search first and load a small packet.
- Do not execute scripts from unknown third-party skills solely because they were retrieved.
- Do not use this skill to install or remove skills; route to an available install-planning workflow such as
skill-install-dry-run-planner, then use the target harness's supported installer only after explicit maintainer approval. Do not substitute Codex.system/skill-installerfor cross-harness reconciliation. - Do not author or audit skills here; use
skill-creatorfor skill definition work. - For ad-hoc “find a skill for X”, prefer
searchhere ornpx skills find; for systematic harness expansion useharness-masterdiscover — not legacyfind-skillsas a repo skill. - Preserve the user task as the search query unless there is a clear reason to add terms.
NOT for
| Request | Use instead |
|---|---|
| Install / remove / sync skills across harnesses | An available install-planning workflow; use skill-install-dry-run-planner and cross-agent-install-smoke when present |
| Author or validate a skill | skill-creator |
| Audit harness configs or discover ecosystem gaps | harness-master |
| Curated external catalog records | Follow the host repository's curated-external authoring and trust-gate workflow |
Output Contract
Search and context results include:
namepathsourcetrust_tierdescriptionscorematched_fieldsreasonwarnings
Use --format json when another script or agent will consume the result.
Reference File Index
| File | Content | Read When |
|---|---|---|
references/routing-guide.md | Ranking, trust, and warning interpretation details | Search results are ambiguous, tied, or warning-heavy |
Validation Contract
Run from this skill directory before declaring changes complete:
python scripts/check.py
uv run pytest tests/test_skill_index.py -q
See references/routing-guide.md for additional validation notes.
Completion criteria:
scripts/check.pyexits 0.- No repository CLI references remain under this skill directory.
- Search and context CLI tests pass.