Borrowing it
Nothing to install: this file belongs to verivus-oss/llm-cli-gateway. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/verivus-oss/llm-cli-gateway/main/.agents/skills/least-cost-routing/SKILL.mdgit clone --depth 1 https://github.com/verivus-oss/llm-cli-gatewayWrote 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.
[](https://agentmods.dev/skills/verivus-oss/llm-cli-gateway/least-cost-routing)<a href="https://agentmods.dev/skills/verivus-oss/llm-cli-gateway/least-cost-routing"><img src="https://agentmods.dev/badge/skills/verivus-oss/llm-cli-gateway/least-cost-routing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/verivus-oss/llm-cli-gateway/least-cost-routing"><img src="https://agentmods.dev/badge/skills/verivus-oss/llm-cli-gateway/least-cost-routing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00058 | $0.02157 |
| Opus 5 | $0.00029 | $0.01078 |
| Sonnet 5 | $0.00012 | $0.00431 |
| Haiku 4.5 | $0.00006 | $0.00216 |
Grade A, and why
least-cost-routing 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 12d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Least-cost routing (route_request)
route_request (sync) and route_request_async (async) pick the cheapest
eligible (provider, model) candidate that meets your constraints, then
dispatch it through the normal provider path. They are dormant by default:
registered only when [least_cost].enabled = true in
~/.llm-cli-gateway/config.toml and Personal Agent Config Kit is disabled. If
the tools are absent, routing is off or Kit is active; use a specific provider
tool only when that tool is valid for the active boundary.
Never use this for a mandatory exhaustive review
Least-cost routing is for a model-agnostic, cost-constrained task. It is not a
review-completion mechanism. Do not use route_request, route_request_async,
select:"cheapest", select:"cheapest_per_tier", maxCostUsd, a budget
waiver, or output/token caps to restrict a required cross-provider review. A
complete review must use the local stdio gateway MCP surface and its explicit
required reviewer roster until every reviewer returns an evidence-backed
unconditional approval. If a reviewer cannot run, repair/retry it or report the
review incomplete/blocked; do not replace it with the cheapest candidate.
When the user explicitly authorizes full provider permissions and native MCP
access for that mandatory review, use multi-llm-review's full-access protocol:
build and launch the current target checkout's node dist/index.js --transport=stdio server, not a global gateway; reapply each provider-native
grant per fresh job; provide the corrective-program report and exact diff/file
identity; and set no caller caps. A user-required 90-second progress cadence
also applies. Neither cost routing nor an LCR budget setting can implement or
shorten that protocol.
When to use this vs a named provider tool
- Use
route_requestwhen the task is model-agnostic (summarize, answer, classify, rewrite) and you want the cheapest model that clears a quality floor. - Use
claude_request/codex_request/ etc. when you need a SPECIFIC model or provider, a provider-specific flag, session resume, or a worktree. In phase_1route_requestis fresh one-shot only: it accepts a registeredworkspacefor CLI candidates, but nosessionIdorworktree. - Discover configured API and CLI candidates with
list_models()and provider capabilities before forming an explicit candidate list. Do not assume a canonical CLI provider is installed, authenticated, priced, or eligible.
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.
- 12d ago First seen · 175 lines · 58 tokens per session scan A 0026cec3fda5
least-cost-routing is a skill published in the GitHub repository verivus-oss/llm-cli-gateway (16 stars, last pushed 3d ago), licensed MIT. It adds 58 tokens to every session and 2,157 once invoked, about $0.0003 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.
Other skills, from other repositories
provider-integration
Adds new AI providers to claude-council, configures provider API settings, troubleshoots provider connections, and documents the provider script interface. Covers creating provider shell scripts, setting API keys, and validating connectivity. Triggers on "add provider", "new AI agent", "provider not working", "API…
architect
System design, tradeoffs, and complex technical decisions.
plan-reviewer
Validate that a work plan is executable before work starts.
security-analyst
Threat-model and find vulnerabilities, with practical remediation.
researcher
Research external libraries, APIs, and best practices, with evidence.
debugger
Rank root-cause hypotheses and propose the smallest safe fix.