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.
npx skills add cosmicstack-labs/mercury-agent-skills --skill routerbase-model-gatewaygit clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skillsWrote 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/cosmicstack-labs/mercury-agent-skills/routerbase-model-gateway)<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/routerbase-model-gateway"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/routerbase-model-gateway/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/cosmicstack-labs/mercury-agent-skills/routerbase-model-gateway"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/routerbase-model-gateway.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.00033 | $0.01633 |
| Opus 5 | $0.00016 | $0.00816 |
| Sonnet 5 | $0.00007 | $0.00327 |
| Haiku 4.5 | $0.00003 | $0.00163 |
Grade A, and why
routerbase-model-gateway 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 11d 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 — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RouterBase Model Gateway
Use routerbase when an application needs an OpenAI compatible gateway for chat, embeddings, image, video, audio, speech, model routing, or fallback behavior.
The goal is not to rewrite the whole AI layer. The goal is to move provider selection behind a clean server side boundary, keep credentials private, and make model choices reversible.
When To Use
Use this skill when the user asks to:
- Migrate an OpenAI compatible client to RouterBase.
- Add RouterBase to a backend API, worker, command line tool, or agent runtime.
- Route requests across multiple model providers through one API surface.
- Choose primary and fallback models for latency, quality, price, or availability.
- Add image, video, audio, speech, or embedding generation through a gateway.
- Debug RouterBase base URLs, model IDs, streaming, JSON output, or media job polling.
Do not use this skill for:
- General API gateway design unrelated to AI models.
- Direct provider SDK features that are not exposed through the OpenAI compatible API.
- Frontend only integrations that would expose API keys to users.
- Production security review of the whole application.
Implementation Principles
1. Keep The Gateway Server Side
All RouterBase calls should run in trusted code:
- backend route
- serverless function
- worker
- command line tool
- internal service
- agent runtime process
Never place ROUTERBASE_API_KEY in browser code, mobile applications, public logs, screenshots, or checked in examples.
2. Change Configuration Before Code Shape
Most migrations should start with configuration:
- base URL:
https://routerbase.com/v1 - API key variable:
ROUTERBASE_API_KEY - chat model variable:
ROUTERBASE_CHAT_MODEL - embedding model variable:
ROUTERBASE_EMBEDDING_MODEL - media model variables for image, video, audio, or speech
Keep the OpenAI compatible request shape until there is a documented reason to change it.
3. Isolate Provider Choices
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.
- 11d ago First seen · 200 lines · 33 tokens per session scan A 323d470cba68
routerbase-model-gateway is a skill published in the GitHub repository cosmicstack-labs/mercury-agent-skills (470 stars, last pushed 16d ago), licensed MIT. It adds 33 tokens to every session and 1,633 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.
Other skills, from other repositories
gemini-interactions-api
Guides the usage of Gemini Interactions API on Gemini Enterprise Agent Platform. Use when the user wants to use the stateful, server-managed Interactions API for multi-turn conversations, background execution, streaming, structured output, and function calling on the Agent Platform.
notebooklm
Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API.…
gemini-live-api
Generates a Gemini LiveAPI client service class in the user's chosen programming language. Use when the user wants to build, scaffold, or integrate a client that connects to the Gemini Enterprise LiveAPI websocket endpoint, handles session setup/resumption, bearer token refresh, and sending/receiving…
gemini-api-dev
Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…
migrating-ai-sdk-to-common-ai
Migrates Airflow projects from airflow-ai-sdk to apache-airflow-providers-common-ai 0.4.0+. Use when replacing airflow-ai-sdk with the official Airflow AI provider - migrating LLM decorators (@task.llm, @task.agent, @task.llmbranch, @task.embed), switching from model strings/objects to connection-based LLM…
creating-openlineage-extractors
Create custom OpenLineage extractors for Airflow operators. Use when the user needs lineage from unsupported or third-party operators, wants column-level lineage, or needs complex extraction logic beyond what inlets/outlets provide.