Router
Skill OctavianTocan/router
Route between your installed Codex skills and chain them into back-to-back workflows. Use when the user asks which skill to use, wants to pick or compare skills, asks for their most-used or top skills / skill usage stats, says "route this", "what skill should I use", "run the <name> workflow", or wants to define or run a multi-skill sequence like brainstorming → writing-plans → executing-plans.From its SKILL.md
npx -y skills add OctavianTocan/routerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.8 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
router
A meta-skill that helps you navigate your own skill library. It tracks which
skills you actually invoke (via a PostToolUse hook into a local SQLite DB),
ranks candidate skills for a request, and chains skills into named, declarative
workflows the way superpowers chains brainstorming → planning → execution.
Variables
- DB_PATH:
<skill-dir>/data/usage.dbby default — the script resolves its own install location via__file__, so the DB lives wherever the skill is installed. Override with theROUTER_DBenv var. - CLI:
python3 <skill-dir>/scripts/router.py <subcommand>(stdlib only) - WORKFLOWS_DIR:
<skill-dir>/workflows/— resolved at runtime; one*.mdper workflow. - HOOK_SETTINGS:
$HOME/.claude/settings.jsonby default; override with--settingsoninstall-hook.
The default install location is $HOME/.claude/skills/router/ (see README).
If you install elsewhere, swap that path into the commands above.
How It Works
A PostToolUse hook on the Skill tool logs every skill invocation (name, args,
session, timestamp) into SQLite. stats aggregates that log; pick blends
lexical relevance + usage frequency + recency into a shortlist that you choose
from; workflows are declarative markdown files the agent walks step by step,
announcing each handoff.
install-hook embeds the absolute path to the script at install time, so
the hook works no matter where the skill is installed.
Arguments
Invoke as /router <command> [arguments]. Parse the text after /router:
the first whitespace-delimited token is the command; everything after it is
that command's arguments (free text and/or --flags). --flags pass
straight through to the CLI.
| Invocation | Command | Arguments |
|---|---|---|
/router stats [--days N] [--limit N] | stats | optional window + cap |
/router pick <request> | pick | free-text task description (required) |
/router run <workflow> | run | a workflow name from /router workflows |
/router workflows | workflows | none |
/router setup | setup | none |
Defaults & aliases (apply before dispatching):
- No command but free text follows (e.g.
/router fix a flaky test) → treat the whole thing aspick <that text>. - No command and no text → show this Arguments table and stop.
- Aliases:
top/most-used/usage→stats;recommend/choose/which→pick;list→workflows. - Unrecognized command → show the table and ask which they meant; do not guess.
Once the command and arguments are parsed, read the matching cookbook file, then execute it with those arguments.
Commands
| Command | Purpose |
|---|---|
/router setup | Install the usage hook + initialize the SQLite DB |
/router stats | List your most-used skills (all-time or a recent window) |
/router pick <request> | Recommend the best-fit skills for a request; you choose |
/router workflows | List defined multi-skill workflows |
/router run <workflow> | Walk a named workflow step by step, with handoffs |
Cookbook
Each command has a detailed step-by-step guide. Read the relevant cookbook file before executing a command.
| Command | Cookbook | Use When |
|---|---|---|
| setup | cookbook/setup.md | First-time install, or the hook/DB is missing or broken |
| stats | cookbook/stats.md | User wants most-used / top skills or usage numbers |
| pick | cookbook/pick.md | User wants to choose a skill for a task, or "what should I use" |
| workflows | cookbook/workflows.md | User wants to list, run, or define a back-to-back workflow |
When a user invokes a /router command, read the matching cookbook file first, then execute the steps.
Reference
- references/schema.md — DB schema, hook mechanics, and the workflow file format.
Notes
- The hook records skills invoked through the
Skilltool in the main session, which includes skills you trigger with/slash(the agent routes those through theSkilltool). Counting starts whensetupruns — there is no backfill. - Plugin skills (e.g.
superpowers:brainstorming) are tracked by name even though theirSKILL.mdlives in the plugin cache rather than the scanned catalog roots; combine the file catalog with the live in-context skill list when picking.
What ships with it: 14 files
38.4 KB alongside SKILL.md, 1 of them executable
cookbook/
- pick.md2.4 KB
- setup.md1.9 KB
- stats.md1.4 KB
- workflows.md2.7 KB
data/
- .gitkeep0 B
references/
- schema.md2.9 KB
scripts/
- router.pyruns16.0 KB
workflows/
- bug-fix.md1.2 KB
- feature-build.md1.3 KB
- ship-pr.md983 B
- CHANGELOG.md1.3 KB
- .gitignore186 B
- LICENSE1.0 KB
- README.md5.1 KB