skill-invocation-router

skill-invocation-router is a skill for Claude Code, Codex from rohitg00/ai-engineering-from-scratch. It costs 36 tokens per session (332 once invoked), scanned A, original, MIT.

A router for deciding when an Agent Skill should be activated by a person, an AI model, another skill, a program, or a test harness. It applies separate rules for each request channel and limits chained skill calls.

In plain words
What is it for?
Use it to simulate activation decisions, filter eligible skills, check caller identity and composition depth, score matches, and abstain when no skill meets the policy.
Why use it?
It avoids treating every activation request the same way. This helps prevent accidental matches, unauthorized use, cyclic skill chains, and unbounded composition.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to simulate activation decisions, filter eligible skills, check caller identity and composition depth, score matches, and abstain when no skill meets the policy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rohitg00/ai-engineering-from-scratch/skill-invocation-router
About the project

AI Engineering from Scratch is a free, open-source curriculum that teaches people to build AI systems through lessons and reusable artifacts such as prompts, skills, agents, and MCP servers. It is for learners who want practical foundations or want to create AI applications, and the catalogue skills support parts of that curriculum.

rohitg00/ai-engineering-from-scratch · 52,653 stars · on GitHub · aiengineeringfromscratch.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rohitg00/ai-engineering-from-scratch --skill skill-invocation-router
Clone the repo
git clone --depth 1 https://github.com/rohitg00/ai-engineering-from-scratch

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for skill-invocation-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/rohitg00/ai-engineering-from-scratch/skill-invocation-router.svg)](https://agentmods.dev/skills/rohitg00/ai-engineering-from-scratch/skill-invocation-router)
Your own site
<a href="https://agentmods.dev/skills/rohitg00/ai-engineering-from-scratch/skill-invocation-router"><img src="https://agentmods.dev/badge/skills/rohitg00/ai-engineering-from-scratch/skill-invocation-router.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 332 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00332
Opus 5 $0.00018 $0.00166
Sonnet 5 $0.00007 $0.00066
Haiku 4.5 $0.00004 $0.00033

Measured 8d ago against content hash 7376d66c0da8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

skill-invocation-router scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/simulate_invocation.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

phases/13-tools-and-protocols/25-skill-invocation-and-routing/outputs/skill-invocation-router/SKILL.md · 23 lines

What it actually says

Skill invocation router

Use this skill when a host needs an auditable activation policy rather than one undifferentiated invocable flag.

  1. Read references/invocation-model.md and classify the requested channel.
  2. Review assets/host-policy.json as an example adapter configuration, not a portable standard.
  3. Run python3 scripts/simulate_invocation.py --policy assets/host-policy.json --actor ACTOR --name NAME --description DESCRIPTION --query QUERY [--explicit-name NAME] [--caller-name NAME] [--depth N] [--user-invocable true|false] [--disable-model-invocation true|false].
  4. For a human, application, skill, or harness request, require an exact discovered name and its channel-specific allowlist.
  5. For a skill caller, also require caller identity, a non-cyclic target, and a bounded composition depth.
  6. For a model or autonomous agent request, remove candidates that the actor or recognized host extensions make ineligible.
  7. Score only the remaining descriptions. Select the strongest eligible match or abstain when no eligible candidate clears the threshold.
  8. Return the JSON decision with the adapter, channel, score, and policy reason.

Activation loads instructions. It does not approve tools, filesystem changes, network access, secret use, or bundled scripts.

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 23 lines · 36 tokens per session scan A 7376d66c0da8

Subscribe to this mod's changes

skill-invocation-router is a skill published in the GitHub repository rohitg00/ai-engineering-from-scratch (52,653 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 332 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.