Index of every page on this site: llms.txt
All skills
modiqo avatar

/skill-router

@f4d9ab5
by modiqomodiqo/skillspec641 stars
43
Run it yourself

Use for every user request when SkillSpec router mode is enabled. First check the local SkillSpec router index, load the selected skill only when route decision is use_skill, and continue with normal agent behavior when the decision is bypass or ambiguous.

  • 2 files
  • 15.6 KB
  • Updated 5 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/modiqo/skillspec/skill-router

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈68 tokens for metadata: the name and description. ≈804 when used: this file. ≈3k more on demand in 1 file.

Description uses 3.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈271 characters, or 3.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Skill Router

This skill is a thin native harness loader for the SkillSpec router. When router mode is enabled and the harness has been restarted, this router is the first hop for every user request in managed skill roots. All routed skills are explicit-only/manual-only, so check the router index before reading, searching for, or guessing at a domain skill.

The router does not execute task work. It decides whether a local skill should be loaded, reports confidence and candidate paths, and asks for direct or durable execution only after a use_skill decision when the task will use tools and the user has not already chosen an execution mode.

Runtime Contract

  1. For ordinary requests with prompt-hook context first_hop_ready=true, use the fast path: do not read ./skill.spec.yml and do not run skillspec router index status.

  2. Run one route query:

    skillspec route --index <index-file-or-router-dir> --query '<user task>' --top 5 --json
  3. If route output says decision: "use_skill" and selected is non-null, read that skill's SKILL.md and follow it.

  4. If route output says decision: "bypass", do not load any candidate skill; continue with normal agent behavior for the request.

  5. If route output says decision: "ambiguous", do not silently choose a candidate. Ask only when the user explicitly requested skill selection; otherwise continue with normal agent behavior.

  6. If route output includes execution_mode_direct_or_durable for a use_skill decision, ask the user whether to run direct or durable before tool-backed execution.

  7. Load and follow ./skill.spec.yml only for router lifecycle, repair, visibility, guard, index status, index refresh, or when guard context is missing or failed.

  8. If the user chooses durable execution, hand the selected skill and task context to durable-executor. The router still only routes; durable-executor owns workspace evidence, rote execution policy, alignment, token stats, and final closure.

Router Management

Use lifecycle commands for managed installation:

skillspec router install --roots <skill-root>... --index <index-file-or-router-dir>
skillspec router index status --roots <skill-root>... --index <index-file-or-router-dir> --visibility-manifest <manifest>
skillspec router index refresh --roots <skill-root>... --index <index-file-or-router-dir> --visibility-manifest <manifest>
skillspec router uninstall

Any index argument can be either the SQLite file itself or the router directory; directory paths resolve to skill-index.sqlite.

Use visibility commands for explicit controls:

skillspec visibility plan --roots <skill-root>... --json
skillspec visibility apply --roots <skill-root>... --manifest <manifest> --json
skillspec visibility restore --manifest <manifest> --json
skillspec skills set-visibility <skill-name> manual-only --roots <skill-root>... --manifest <manifest>
skillspec skills disable <skill-name> --roots <skill-root>... --manifest <manifest>
skillspec skills enable <skill-name> --roots <skill-root>... --manifest <manifest>

The manifest is the rollback boundary. Do not bulk-restore visibility by inference when the manifest is missing.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at f4d9ab5. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 5 months ago
Other metadata
metadata
{
  "routing": {
    "tags": [
      "skills",
      "router",
      "discovery",
      "codex",
      "claude"
    ],
    "triggers": [
      "choose the right skill",
      "route to a skill",
      "many skills installed",
      "skill descriptions shortened",
      "install skill router",
      "disable implicit skill invocation"
    ],
    "negative_triggers": [
      "ordinary code generation"
    ]
  }
}

README badge

README badge for modiqo/skillspec/skill-router