llm-cli-gateway: Skill for Claude Code

.agents/skills/least-cost-routing/SKILL.md

least-cost-routing is a skill for Claude Code from verivus-oss/llm-cli-gateway. It costs 58 tokens per session (2,157 once invoked), scanned A, original, MIT.

A request router that chooses the least expensive provider and model capable of meeting a required quality level and spending limit. It works only when explicitly enabled and is intended for tasks where the exact model does not matter.

In plain words
What is it for?
Use it for ordinary model-independent tasks with a quality floor and hard cost cap; do not use it as a substitute for a required review by multiple providers.
Why use it?
It reduces the need to compare providers manually when cost matters more than using a particular model. It also keeps requests within the chosen quality and budget constraints.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: installed under .agents/ (shared by several agents); mentions Codex.

This is verivus-oss/llm-cli-gateway's own configuration. It tells Claude Code how to work on llm-cli-gateway itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything llm-cli-gateway configures →

Part of the llm-gateway plugin — 24 skills, 4 commands, 2 MCP servers shipped together

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/verivus-oss/llm-cli-gateway/main/.agents/skills/least-cost-routing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/verivus-oss/llm-cli-gateway

Made for: Claude Code.

Or install llm-gateway, the plugin that ships this one along with the rest of its 24 skills, 4 commands, 2 MCP servers.

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 least-cost-routing

README.md
[![agentmods](https://agentmods.dev/badge/skills/verivus-oss/llm-cli-gateway/least-cost-routing/github.svg)](https://agentmods.dev/skills/verivus-oss/llm-cli-gateway/least-cost-routing)
Your own site
<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.

agentmods 80×15 button for least-cost-routing

Your own site · 80×15
<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>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,157 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.00058 $0.02157
Opus 5 $0.00029 $0.01078
Sonnet 5 $0.00012 $0.00431
Haiku 4.5 $0.00006 $0.00216

Measured 12d ago against content hash 0026cec3fda5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

.agents/skills/least-cost-routing/SKILL.md · 175 lines

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_request when 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_1 route_request is fresh one-shot only: it accepts a registered workspace for CLI candidates, but no sessionId or worktree.
  • 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.

Read the full file on GitHub · 175 lines

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. 12d ago First seen · 175 lines · 58 tokens per session scan A 0026cec3fda5

Subscribe to this mod's changes

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.