mcpbeat Sign in

Routerbase Model Gateway Agent Skill

Integrate and route AI model requests through RouterBase. Use when migrating OpenAI-compatible clients, choosing model IDs, configuring fallbacks, or building chat, image, video, audio, speech, and embedding workflows.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
3248
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/davepoon/buildwithclaude --skill routerbase-model-gateway

The instruction itself

10 sections, as written by the author

RouterBase Model Gateway

Use routerbase as an OpenAI-compatible model gateway for chat, image, video, audio, speech, and embedding workloads. This skill helps agents migrate existing SDK clients, keep credentials private, choose model IDs, and document safe fallback behavior.

When to Use This Skill

  • The user wants to migrate an OpenAI SDK or OpenAI-compatible integration to RouterBase.
  • The user needs a model routing plan across cost, latency, quality, context length, streaming, tool calling, JSON mode, or vision requirements.
  • The user is adding chat, image, video, audio, speech, or embedding calls to an application.
  • The user is debugging RouterBase auth, endpoint, model ID, streaming, media, or payload issues.
  • The user needs documentation or a smoke-test checklist for a RouterBase integration.

What This Skill Does

  • Detects the target stack and where the AI provider client should live.
  • Configures the base URL as https://routerbase.com/v1.
  • Uses ROUTERBASE_API_KEY as a server-side secret.
  • Preserves OpenAI-compatible request shapes unless a selected model requires a specific option.
  • Produces a primary and fallback model plan with validation steps.
  • Separates synchronous chat/image flows from asynchronous video or audio jobs.

How to Use

Basic Usage

Use routerbase-model-gateway to migrate this OpenAI chat integration to RouterBase.
Use routerbase-model-gateway to design a fallback model plan for low-latency support chat.
Use routerbase-model-gateway to add image and video generation with safe polling and storage.

Integration Pattern

Prefer the user's existing OpenAI-compatible SDK. Change the base URL, store the API key in environment configuration, and keep request payloads standard.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ROUTERBASE_API_KEY,
  baseURL: process.env.ROUTERBASE_BASE_URL || "https://routerbase.com/v1",
});

const response = await client.chat.completions.create({
  model: "google/gemini-2.5-flash",
  messages: [{ role: "user", content: "Write one sentence about model routing." }],
});

Routing Plan Format

When recommending models, return a table like this:

| Use case | Primary model | Fallback model | Reason | Validation |
| --- | --- | --- | --- | --- |
| Support chat | model-id | model-id | Low latency and tool support | Run fixture prompts and compare output shape |

Treat model IDs, pricing, and availability as live data. If a live catalog check is not possible, mark examples clearly and tell the user what must be verified before production.

Debug Checklist

  • Authentication: missing ROUTERBASE_API_KEY, wrong environment, or server-side secret not loaded.
  • Endpoint: missing /v1, wrong media endpoint, or client still pointing at another provider.
  • Model ID: unavailable, misspelled, disabled for the account, or unsupported for the requested modality.
  • Request shape: unsupported field, invalid content part, invalid tool schema, or model-specific parameter mismatch.
  • Streaming: client does not consume Server-Sent Events or SDK chunks correctly.
  • JSON mode: missing response_format or no downstream schema validation.
  • Async media: task ID not persisted, polling has no timeout, or generated media is not stored before temporary URLs expire.

Guardrails

  • Never paste, infer, print, or log real API keys.
  • Never put RouterBase keys in browser code, mobile apps, screenshots, or public repositories.
  • Do not retry authentication, invalid model, validation, or policy errors blindly.
  • Do not claim example model IDs, pricing, or availability are permanent facts.
  • Validate model-specific support for streaming, tool calling, JSON mode, vision, context length, media size, and async behavior.
  • Require human review for high-impact medical, legal, financial, safety, security, or compliance use cases.

Output

Return:

  • The target endpoint or base URL.
  • Required environment variables.
  • Files to change or create.
  • A minimal request example.
  • A model routing table.
  • Fallback and retry behavior.
  • Validation or smoke-test steps.
  • Remaining assumptions that must be checked against live RouterBase docs or account access.

Other skills for the same job

different authors, same section of the catalogue
Canvas Design
by anthropics
vendor ×13

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

1388k tokens
Algorithmic Art
by anthropics
vendor ×10

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

15k tokens scripts
Image Enhancer
by frostant
×6

Improves the quality of images, especially screenshots, by enhancing resolution, sharpness, and clarity. Perfect for preparing images for presentations, documentation, or social media posts.

635 tokens
Video Downloader
by CommandCodeAI
×4

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

671 tokens
Histolab
by christophacham
×3

Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.

18k tokens
Omero Integration
by christophacham
×3

Microscopy data management platform. Access images via Python, retrieve datasets, analyze pixels, manage ROIs/annotations, batch processing, for high-content screening and microscopy workflows.

32k tokens
Pydicom
by christophacham
×3

Python library for working with DICOM (Digital Imaging and Communications in Medicine) files. Use this skill when reading, writing, or modifying medical imaging data in DICOM format, extracting pixel data from medical images (CT, MRI, X-ray, ultrasound), anonymizing DICOM files, working with DICOM metadata and tags, converting DICOM images to other formats, handling compressed DICOM data, or processing medical imaging datasets. Applies to tasks involving medical image analysis, PACS systems, radiology workflows, and healthcare imaging applications.

13k tokens scripts
Transformers
by christophacham
×3

This skill should be used when working with pre-trained transformer models for natural language processing, computer vision, audio, or multimodal tasks. Use for text generation, classification, question answering, translation, summarization, image classification, object detection, speech recognition, and fine-tuning models on custom datasets.

13k tokens

How to use it

Copy the folder

Take davepoon/routerbase-model-gateway from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.