SSkilltecabyclaudinhocode
Enviar skill
← Voltar para o catálogo

skill-router

Design e Frontend

INVOKE BEFORE EVERY NON-TRIVIAL TASK — before writing code, before using any tool, before answering. Do not skip. Produces the required Skill + Agent + Model for the task. Routing engine for 2,700+ skills.

7estrelas
Ver no GitHub ↗Autor: hussi9Licença: MIT

Skill Router — Universal Router

Output always: Skill + Agent + Model


THE 3-QUESTION TRIAGE (run now, takes 5 seconds)

Q1: Is something BROKEN / WRONG / FAILING?
    Error, crash, test fail, unexpected output, user correction
    YES → BROKEN PATH

Q2: Is this CREATE / BUILD / ADD something new?
    New feature, file, component, integration, page, script
    YES → BUILD PATH

Q3: Everything else (improve, ship, configure, automate, research)
    → OPERATE PATH

AMBIGUOUS? → Default to HIGHER-COMPLEXITY path

BROKEN PATH

SignalSkillAgentModelThinking
Error / crash / exceptionsuperpowers:systematic-debugginggeneral-purposesonnetthink
Test failingtest-runnersuperpowers:systematic-debuggingtest-runnersonnetnone
TypeScript errorstypescript-expertgeneral-purposesonnetnone
Performance regressionperfsuperpowers:systematic-debuggingoptimizersonnetthink
Security issue foundsecuritysecurity-auditorsonnetthink-hard
Deploy / build failedsuperpowers:systematic-debugginggeneral-purposesonnetthink
User says "no" / "wrong"STOP → superpowers:systematic-debugginggeneral-purposesonnetthink
Production incidentsuperpowers:systematic-debugginggeneral-purposeopusultrathink

BUILD PATH

Multi-file / new feature: brainstormingwriting-plans → domain skill Single file / trivial add: go directly to domain skill

WhatSkillAgentModelThinking
UI component / pagefrontend-design:frontend-designfeature-dev:code-architectsonnetnone
API endpointfeature-dev:feature-devfeature-dev:code-architectsonnetthink
Database schemadb-expertdb-expertsonnetthink
Auth / permissionsbrainstormingsecuritysecurity-auditoropusultrathink
AI feature / agentsuperpowers:brainstormingfeature-dev:code-architectsonnetthink-hard
3rd-party integrationconnect-appsintegration-specialistsonnetnone
Mobile screenfrontend-design:frontend-designfeature-dev:code-architectsonnetnone
CLI / automation scriptsuperpowers:writing-plansgeneral-purposesonnetthink
Skill / Claude skill filesuperpowers:writing-skillsgeneral-purposesonnetthink

OPERATE PATH

SignalSkillAgentModelThinking
Refactor / clean uprefactorcode-simplifier:code-simplifiersonnetnone
Add tests / coveragesuperpowers:test-driven-developmenttest-runnersonnetnone
Performance optimizeperfoptimizersonnetthink
Write docsdocsgeneral-purposesonnetnone
Code reviewsuperpowers:requesting-code-reviewsuperpowers:code-reviewersonnetthink-hard
Got review feedbacksuperpowers:receiving-code-reviewgeneral-purposesonnetthink
Deploysuperpowers:verification-before-completionvercel:deploygeneral-purposesonnetnone
Merge / PR / pushsuperpowers:finishing-a-development-branchgeneral-purposesonnetnone
DB migrationdb-expertdb-expertsonnetthink
2+ independent taskssuperpowers:dispatching-parallel-agentsgeneral-purposesonnetnone
Resume previous worksuperpowers:executing-plansgeneral-purposesonnetnone
Research / docs lookupcontext7 → brainstorminggeneral-purposesonnetnone
Architecture / scope decisionsuperpowers:brainstormingsuperpowers:writing-plansgeneral-purposeopusultrathink

WHEN NO SKILL IS NEEDED

Single-line fix · reading code · one factual question · one command · under 3 trivial steps

Router precision contract: when no triage signal matches (BROKEN/BUILD/OPERATE), the router emits nothing — silence is the correct output. A missing [skill-router] line means the prompt was conversational, exploratory, or trivial. Do not interpret silence as "OPERATE → refactor" by default; the router only suggests when it is confident.

Iron rule enforcement: when the router does announce a chain, the announcement includes an IRON RULE block naming the next required Skill(skill="<X>") call. A PreToolUse hook denies state-changing tools (Bash, Edit, Write, Task) until that skill is invoked, and a Stop hook blocks turn end if it never was. Read/Glob/Grep/ TodoWrite remain allowed so context-gathering still works.

Escape hatch: the USER must include [no-router] in their next message to disable enforcement for that turn. The router stays silent and clears pending state on UserPromptSubmit, so all hooks pass through. Writing [no-router] in your own response text does NOT clear pending state — only the user's prompt triggers the clear. If the Stop hook is blocking you on a ghost skill, it will self-clear on the next user message regardless (ghost-skill guard).

Calibration: tests/calibration.py runs ~100 curated prompts through the router and reports precision/recall/F1 by triage path. Run with --min-accuracy N for a CI gate. Current baseline: 100% path accuracy, 95.2% skill accuracy.

Learning loop: scripts/learn-from-history.py joins announcement events (~/.claude/skill_router_log.jsonl) with actual Skill invocations (~/.claude/ skill_usage.log) and surfaces tuning suggestions — which announced skills are ignored most often, and which Skill invocations the router missed. Run periodically to keep patterns calibrated to real usage.


COMPLETION GATE

Before any "done" claim → superpowers:verification-before-completion

□ Code actually runs correctly
□ TypeScript passes (tsc --noEmit)
□ Tests pass
□ Original request fully met (re-read it)

COMPLEXITY RULE

1 domain  → 1 skill         → single-domain announcement
2+ domains → announce chain   → multi-domain announcement

Operators in the chain:

  • sequential (B depends on A)
  • + parallel (steps don't share state)

Full chain syntax + standard shapes: see references/multi-domain-chaining.md.


ANNOUNCEMENT FORMAT — Output VERBATIM (substitute only <vars>)

The announcement is the testable contract. Users will grep '\[skill-router\]' their transcript to verify what fired matches what was announced. Format is non-negotiable. Output it BEFORE any other tool call (Read, Edit, Bash, Agent).

Single-domain (one skill, no chain):

[skill-router] This is a <BROKEN|BUILD|OPERATE> task → <skill> → <agent>.
[skill-router] Model: <model>  ·  Thinking: <thinking>
[skill-router] Invoke now:

▶ <skill>  (<model>, <in-session | via Agent>)

Multi-domain (computed chain):

[skill-router] This touches <N> domains: <d1>, <d2>, <d3>.
[skill-router] Chain: <s1> → <s2> + <s3> → <s4>
[skill-router] Models: <m1> · <m2>+<m3> · <m4>  ·  Thinking: <max-thinking>
[skill-router] Invoke step 1/<N> now:

▶ <s1>  (<m1>, <in-session | via Agent>)
▶ <s2> + <s3>  (<m2>, parallel via Agent)
▶ <s4>  (<m4>, <in-session | via Agent>)

Multi-domain (saved chain wins):

[skill-router] Using your saved chain `<name>`: <s1> → <s2> + <s3>
[skill-router] Models: <m1> · <m2>+<m3>  ·  Thinking: <max-thinking>
[skill-router] Invoke step 1/<N> now:

▶ <s1>  (<m1>, <in-session | via Agent>)
▶ <s2> + <s3>  (<m2>, parallel via Agent)

Rules:

  • Models: line uses · between sequential steps and + inside one parallel step.
  • Thinking: is the highest depth of any step (none / think / think-hard / ultrathink). Omit the field when every step is none.
  • Each line ends with one of: in-session, via Agent, or parallel via Agent — matching the dispatch protocol decision below.

Como adicionar

/plugin marketplace add hussi9/skill-router

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Comentários · Nenhum comentário

Entre para comentar. Entrar

  • Ainda não há comentários. Seja o primeiro.