Skip to content
Back to skills

Skill Router

ASecurity

Matches a free-text intent against the skills catalog and recommends the best-fit skill(s). Use when the user has a vague or cross-domain request and asks "which skill should I use", "is there a skill for this", "find the right skill", or "route this to the best skill" — it matches an intent against the whole skills library and recommends the best-fit skill(s).

  • 1,271 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 6, 2026
ai-agentspythongobash

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add borghei/Claude-Skills --skill skill-router --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Skill Router?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Skill Router
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/borghei-skill-router/badge)](https://www.skillsdirectory.com/skills/borghei-skill-router)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: skill-router
description: >
  Matches a free-text intent against the skills catalog and recommends the best-fit skill(s). Use when the user has a vague or cross-domain request and
  asks "which skill should I use", "is there a skill for this", "find the right
  skill", or "route this to the best skill" — it matches an intent against the
  whole skills library and recommends the best-fit skill(s).
license: MIT + Commons Clause
metadata:
  version: 1.0.0
  author: borghei
  category: workflow
  domain: orchestration
  updated: 2026-06-22
  python-tools: route_skill.py
  tags: [router, discovery, orchestration, navigation, intent-matching]
---
# Skill Router

## Overview

This library has hundreds of skills across 21 domains. A user rarely knows the
exact skill name — they know their *intent* ("I need to figure out what to build
next quarter," "I have to respond to a data breach"). The router closes that gap: it
matches a free-text request against every skill's description and tags, ranks the
candidates, and recommends the best fit — so the right skill activates on the first
try instead of the user grepping folders or guessing.

It is the **user-invoked orchestrator** in the two-tier model: it never does the work
itself, it routes to the skill (the discipline) that does. Treat its output as a
recommendation, then activate the chosen skill.

## Use when

- **Vague intent** — the user describes a goal but not which skill ("help me plan a launch").
- **Cross-domain ambiguity** — the request could plausibly live in several domains (is "pricing" PM, finance, or business-growth?).
- **Discovery** — the user asks whether a skill exists for X before assuming there isn't one.
- **Disambiguation** — several similarly named skills exist (e.g. multiple PRD or CRO skills) and you need the closest match.

## Clarify First

Before routing, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

- **The actual goal:** the outcome the user wants, in their words (the router matches intent, so a vague goal yields vague matches).
- **Artifact vs advice:** do they want to *produce* something or *decide/understand* something (separates generative skills from advisory ones).

If the request is already specific, skip the questions and route directly.

## Quick Start

```bash
# Recommend the best-fit skills for an intent (run from the repo root; the
# catalog cli/skills.json is auto-discovered, or pass --catalog <path>)
python3 workflow/skill-router/scripts/route_skill.py "respond to a data breach and notify the regulator"

# Narrow to a domain, widen the result set, or emit JSON
python3 workflow/skill-router/scripts/route_skill.py "forecast revenue" --domain finance --top 5 --format json

# Read the goal from a file, against the bundled sample catalog
python3 scripts/route_skill.py --input assets/sample_query.txt --catalog assets/sample_catalog.json
```

Real output of the last command:

```
ROUTED: breach-response (1 candidate(s))

Goal: "respond to a data breach and notify the regulator"
(read 4 skills from assets/sample_catalog.json; query terms: ['breach', 'data', 'notify', 'regulator', 'respond'])

1. breach-response  (legal)  score=57.0 (heuristic)
   path: legal/breach-response
   matched on: breach, data, regulator, respond, "respond to", "data breach", "respond to a"

Next: Activate breach-response: open legal/breach-response/SKILL.md and follow it.
```

## Exit codes

| Code | Meaning |
|------|---------|
| 0 | Strong match found (top score >= 6: a verbatim phrase, or a name plus tag hit). |
| 1 | No strong match: only weak keyword hits, or nothing matched. Rephrase or use `--domain`. |
| 2 | Unusable input: empty goal (or only stopwords), missing or invalid catalog, unknown `--domain`, `--top` below 1. One-line `BLOCKED:` message on stderr. |

Scores are an internal field-weighted heuristic (name 5, tags 3, domain 2, description 1,
plus a phrase bonus), not a benchmark. The output always says how many skills it read.

1. Run `route_skill.py "<the user's goal>"` against the generated catalog (`cli/skills.json`).
2. Review the ranked candidates and their match reasons.
3. Pick the top fit (or present the top 2-3 if genuinely ambiguous) and **activate that skill** - do not do the work in the router.
4. On exit 1, say so plainly and suggest the closest domain rather than forcing a weak match.

## How matching works

The script scores each skill by term overlap between the query and the skill's
`name`, `tags`, `domain`, and `description`, weighting exact name/tag hits highest.
It reads the catalog from `cli/skills.json` (regenerated by `scripts/build_manifest.py`),
so it always reflects the current library without hardcoding any skill list.

## Anti-patterns

- **Doing the work instead of routing.** The router recommends; the recommended skill executes. Don't blur the two.
- **Forcing a match.** If the top score is weak, say "no strong fit" — a confidently wrong route is worse than an honest miss.
- **Ignoring the artifact-vs-advice split.** Routing a "produce a PRD" intent to an advisory agent (or vice-versa) wastes the user's time.
- **Hardcoding skill names.** Always read the live catalog; the library changes.

## Scope & Limitations

**In Scope:** Matching a free-text intent against the skills catalog and recommending the best-fit skill(s); disambiguating similar skills; confirming whether a skill exists for a goal.

**Out of Scope:** Executing the matched skill's workflow (that's the target skill's job); multi-skill workflow orchestration across a sequence (see `standards/` orchestration protocol and the agent index in `agents/README.md`); installing or extracting skills.

**Dependency note:** the router reads the repo-level catalog `cli/skills.json`. It is a navigation aid for use *within* the library, not a standalone single-skill download — if the catalog is absent, point the script at it with `--catalog <path>` or regenerate it with `python3 scripts/build_manifest.py`.

## References

- `scripts/route_skill.py` — intent-to-skill scorer over `cli/skills.json`.
- `assets/` — sample catalog, sample/flawed/malformed queries and `contract.json`.

Files in this skill

  • SKILL.md4.6 KB
  • scripts/route_skill.py6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.