Skip to content
Skill

AI gateway

Guides an agent to set up and operate Vercel AI Gateway for model routing and spend

AI gateway 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
5
Last commit
License
MIT
Listing updated

Similar skills

About AI gateway

This skill gives a coding agent working knowledge of Vercel AI Gateway, a service that serves models from many providers behind one set of credentials, model IDs, billing and logs. It tells the agent to check live sources before editing code: fetch the current model list, read the matching docs page, and run the Vercel CLI help for any command before using it. It then points to focused reference guides for setup, provider routing and fallbacks, reusable virtual models, typed decision requests, spend and observability, and coding-agent configuration.

The guidance covers choosing between an API key and Vercel OIDC for authentication, picking an integration path for AI SDK, OpenAI-compatible or Anthropic-compatible code, and keeping secrets out of source and chat. It also includes a verification checklist and rules for when a live request, key creation or budget change is appropriate. Some validation patterns flag common mistakes such as missing provider prefixes or provider keys used without BYOK.

The skill expects a project that uses the AI SDK or an existing OpenAI or Anthropic client, and access to a Vercel team for the gateway itself. Commands include the Vercel CLI's ai-gateway group, and it refers to AI SDK skill material when SDK code is involved.

When your agent uses it

Vercel AI Gateway guidance for setup, model discovery, authentication, routing, fallbacks, virtual models, evaluation models, BYOK, budgets, spend reporting, observability, compatible APIs, and coding-agent configuration. Use when adding AI Gateway to an app, migrating provider calls, choosing models or providers, centralizing model configuration, evaluating application state, debugging gateway requests, or running `vercel ai-gateway` commands.

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 8 files (68 KB) on GitHub on 2 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 better-supabase plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase

Or copy only this skill to ~/.claude/skills/ai-gateway:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ai-gateway &&
cp -R "$tmp/.agents/skills/ai-gateway" ~/.claude/skills/ai-gateway &&
rm -rf "$tmp"

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

Claude Code docs on skills

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ai-gateway &&
cp -R "$tmp/.agents/skills/ai-gateway" ~/.agents/skills/ai-gateway &&
rm -rf "$tmp"

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

Codex docs on skills

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ai-gateway &&
cp -R "$tmp/.agents/skills/ai-gateway" ~/.cursor/skills/ai-gateway &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/ai-gateway 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/ScaleDockHQ/better-supabase.git --path .agents/skills/ai-gateway

Or copy the folder to ~/.gemini/skills/ai-gateway yourself.

Gemini CLI docs on skills

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ai-gateway &&
cp -R "$tmp/.agents/skills/ai-gateway" ~/.copilot/skills/ai-gateway &&
rm -rf "$tmp"

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

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git

Then copy better-supabase/.agents/skills/ai-gateway into your agent's skills folder as ai-gateway. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Gateway setup guidance
Explains how to add AI Gateway to an app with API key or Vercel OIDC authentication.
Live model discovery
Directs the agent to fetch the current model list instead of guessing model IDs.
Routing and fallbacks
Covers provider ordering, model fallbacks, timeouts and BYOK provider credentials.
Virtual model configuration
Describes reusable team-scoped model configurations addressed by a vmc slug.
Spend and observability
Covers budgets, credit balance, request logs and debugging of gateway calls.
Coding agent connection
Explains routing coding agents' model traffic through the gateway via the CLI setup command.

Good for

  • Add Vercel AI Gateway to an existing AI SDK application
  • Switch an OpenAI SDK client to route through AI Gateway
  • Set up provider fallbacks for a model call
  • Create a reusable virtual model for a team
  • Set a spend budget for an API key
  • Debug why a gateway request failed or routed to an unexpected provider

AI gateway FAQ

What does the skill need to be loaded?

It triggers when a task involves adding AI Gateway to an app, migrating provider calls, choosing models or providers, debugging gateway requests, or running vercel ai-gateway commands.

How does AI gateway handle authentication?

It recommends an AI Gateway API key for scripts, CI and non-Vercel hosts, and Vercel OIDC for Vercel deployments and linked local projects, and forbids pasting secrets into chat or committed files.

Does AI gateway make changes without asking?

It says spending credits, creating keys, changing budgets, routing rules or coding-agent config should only happen when the user requested or approved that action.

How do I install AI gateway in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ai-gateway to use it in all your projects, or to .claude/skills/ai-gateway in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

Does AI gateway 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 AI gateway?

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 AI gateway?

The closest alternatives to AI gateway are AI SDK, Azure aigateway, Apigee agent gateway governance, Developing genkit js and API AI augmented.

Where this comes from

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

More from ScaleDockHQ/better-supabase

  1. Apply the CommonMark 0.31.2 spec when parsing or rendering Markdown

    • Open source
    • 5 GitHub stars
    • Files and documents
  2. Publish Agent Cards and run agent-to-agent calls over the A2A 1.0 protocol

    • Open source
    • 5 GitHub stars
    • Developer tools
  3. Lets an agent stream runs, tool calls and shared state to user-facing apps over AG-UI 1.0

    • Open source
    • 5 GitHub stars
    • Developer tools
  4. Lets an AI agent drive Chrome or Chromium through a fast browser automation CLI

    • Open source
    • 5 GitHub stars
    • Browser automation
  5. Guides an agent to write, review and validate SKILL.md skills against the Agent Skills

    • Open source
    • 5 GitHub stars
    • Developer tools
  6. Write, place, migrate and review AGENTS.md instruction files for coding agents

    • Open source
    • 5 GitHub stars
    • Developer tools