Skip to content
Skill

LLM gateway and routing

Gives an agent a plan for routing LLM calls across providers with fallbacks and schema

LLM gateway and routing is an open-source agent skill for ai models and llm tooling. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
13
Last commit
License
MIT
Listing updated

Similar skills

About LLM gateway and routing

This skill guides an agent through designing the layer between an application and its model providers. It covers classifying requests so they reach an appropriately sized model, ordering fallback candidates, and handling provider failures by class, such as throttling, retired model IDs, safety refusals and malformed responses, instead of applying one retry policy to everything.

The guidance is organized as numbered conventions plus a request-path walkthrough. It explains how to score candidates on live health signals after policy filtering, how to keep retry and fallback budgets separate, how to re-validate fallback output against the same schema, and how to log which provider answered and why. It also covers model IDs as runtime configuration, deprecation calendar alerts, and cost attribution per route, including the fallback path.

The material expects a service that calls model providers and an engineer who can wire up the router, its config and its tests. It points to companion skills for tracing, resilience primitives, deprecation cutovers and API contract versioning rather than duplicating them, and it lists reference digests of the underlying articles.

When your agent uses it

Route application LLM traffic across providers — request tiering, fallback chains, health-aware failover, deprecation planning, and schema-constrained outputs. Use when a production service calls model providers on a path that must succeed.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 10 files (87 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the claude-kit plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ajyadav013/claude-kit
/plugin install claude-kit@claude-kit

Or copy only this skill to ~/.claude/skills/llm-gateway-and-routing:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/llm-gateway-and-routing &&
cp -R "$tmp/skills/llm-gateway-and-routing" ~/.claude/skills/llm-gateway-and-routing &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/llm-gateway-and-routing inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/llm-gateway-and-routing to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/llm-gateway-and-routing &&
cp -R "$tmp/skills/llm-gateway-and-routing" ~/.agents/skills/llm-gateway-and-routing &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/llm-gateway-and-routing inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/llm-gateway-and-routing to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/llm-gateway-and-routing &&
cp -R "$tmp/skills/llm-gateway-and-routing" ~/.cursor/skills/llm-gateway-and-routing &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/llm-gateway-and-routing inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ajyadav013/claude-kit.git --path skills/llm-gateway-and-routing

Or copy the folder to ~/.gemini/skills/llm-gateway-and-routing yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/llm-gateway-and-routing:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/llm-gateway-and-routing &&
cp -R "$tmp/skills/llm-gateway-and-routing" ~/.copilot/skills/llm-gateway-and-routing &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/llm-gateway-and-routing inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ajyadav013/claude-kit.git

Then copy claude-kit/skills/llm-gateway-and-routing into your agent's skills folder as llm-gateway-and-routing. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Failure class handling
Maps provider errors such as 429, 5xx, 404 on retired models and safety refusals to distinct responses.
Tiered request routing
Describes triaging requests into fast, mid and top model tiers with traffic-share targets.
Fallback chain design
Covers ordering candidates by independence, filtering by policy, and scoring live health.
Schema as substitution contract
Explains enforcing output schemas at the boundary so a fallback model's output stays usable.
Model deprecation planning
Treats model retirement dates as scheduled events and keeps model IDs in runtime config.
Per-route cost attribution
Logs routing decisions and slices cost, latency and retries per route, including fallback spend.

Good for

  • Add a second LLM provider as a fallback for a production feature
  • Find and fix hardcoded model IDs that have announced retirement dates
  • Design a fast and smart model split to reduce inference spend
  • Make LLM responses that feed a database reliably match a schema
  • Set up retry and failover behavior that stops retrying safety refusals

LLM gateway and routing FAQ

When does LLM gateway and routing trigger?

It is meant for production services that call model providers on a path that must succeed, such as designing the call path, adding redundancy, or handling deprecations.

Does LLM gateway and routing change which model my coding agent uses?

No. The skill explicitly separates application traffic routing from the model tier an SDLC agent runs on, which is governed by a different rule.

Does LLM gateway and routing include scripts or tools?

The folder contains no scripts. It consists of guidance in SKILL.md and reference digests of source articles.

Which tools does LLM gateway and routing require?

The skill does not set an allowed tools list, and the content does not name required tools beyond the provider and tracing skills it references.

How do I install LLM gateway and routing in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/llm-gateway-and-routing to use it in all your projects, or to .claude/skills/llm-gateway-and-routing in one project. Or install the claude-kit plugin, which includes it: /plugin marketplace add ajyadav013/claude-kit, then /plugin install claude-kit@claude-kit.

Does LLM gateway and routing run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use LLM gateway and routing?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to LLM gateway and routing?

The closest alternatives to LLM gateway and routing are Model adaptation, AI gateway, LLM agent, API AI augmented and Agentic eval.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ajyadav013/claude-kit

  1. Guides an agent through pytest, async fixtures and security-regression tests for FastAPI

    • Open source
    • 13 GitHub stars
    • Developer tools
  2. Lets your agent inspect and debug live browser pages via Chrome DevTools MCP

    • Open source
    • 13 GitHub stars
    • Browser automation
  3. Runs concurrent load and stress tests against API endpoints to find latency and throughput

    • Open source
    • 13 GitHub stars
    • Developer tools
  4. Lets an agent click through a feature in a real browser and check how it behaves

    • Open source
    • 13 GitHub stars
    • Developer tools
  5. Runs quick health checks on backend, frontend and login to catch obvious breakage

    • Open source
    • 13 GitHub stars
    • Developer tools
  6. Guides an agent through red-green-refactor, bug reproduction tests and test pyramid

    • Open source
    • 13 GitHub stars
    • Developer tools