Skip to content

Skill invocation router

Decides which installed skill an agent should activate, with auditable allow-list and abstain rules

Stars
76,331
Licence
MIT
Files
4 files

What it does

This skill teaches an agent to act as a routing gatekeeper for a catalog of other skills. Instead of a single on/off switch, it classifies who or what is asking (a human, the model itself, an application, another skill, or a harness), checks that the requested skill is an exact discovered name on an allowlist for that channel, guards against skill-to-skill loops and runaway nesting, and then picks the best-matching description or declines if nothing is a confident fit. It returns a JSON decision explaining the choice. It is mainly a design and testing aid for people building agent platforms.

Great for

  • Engineers designing how an agent platform decides which skills can be triggered by users, the model, or other skills
  • Teams auditing or testing activation policies before shipping a skill catalog
  • Learners studying agent tool and skill routing as part of an AI engineering course

Skip it if

  • Everyday end users who just want an agent to do a task; this skill governs activation rules rather than producing content, and it is not needed for normal skill use
  • Production security enforcement: the bundled host-policy is an example adapter, not a portable standard, and the simulator only scores decisions, so it should not be the sole access control for sensitive tools

Try asking

  • “Design an activation policy that lets users invoke a skill explicitly but blocks the model from auto-triggering it”
  • “Simulate which skill an agent would pick for the query 'summarize this PDF' and explain why others were rejected”
  • “Check that a skill-to-skill call cannot loop back to its caller and respects a maximum composition depth”
  • “Review a host policy JSON file and list which channels each skill is allowed on”
Step-by-step guide: how to use Skill invocation routerInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the MIT licence and an attribution note.

    skill-invocation-router.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip skill-invocation-router.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip skill-invocation-router.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Start by reading references/invocation-model.md to pick the correct channel before running the simulator
  • Treat assets/host-policy.json as a template to adapt to your own host, not as a standard to copy unchanged
  • Test abstain cases too: a good policy should sometimes decline rather than force a low-scoring match

What's inside

  • assets/host-policy.json
  • references/invocation-model.md
  • scripts/simulate_invocation.py
  • SKILL.md

Redistributed unmodified from rohitg00/ai-engineering-from-scratch under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.