Agent Skills
Let Claude Code, Codex, Cursor and other coding agents generate images and video with your RouteMux API key. Three steps — get a key, install, ask.
RouteMux Agent Skills give your coding agent new abilities: generate and edit images with GPT Image 2.5, make short videos with MiniMax H3, look up models and prices, and connect your tools to RouteMux. You ask in plain words; the agent does the rest and bills your RouteMux wallet.
They work in Claude Code, Codex, Cursor, OpenCode, Gemini CLI and any other agent that
reads the SKILL.md format.
Before you start
- A RouteMux account that has topped up at least once. The image models
(
openai/gpt-image-2.5-flare,openai/gpt-image-2.5-sunburst) and the video model (minimax/minimax-h3) unlock after your first top-up. Any amount works — top up here. bash,curlandpython3on your machine. The skills use nothing else.
Step 1: Get your API key
Already using RouteMux in Claude Code, Codex, Qwen Code or Gemini CLI? Skip this step: the skills reuse the key your agent already sends to RouteMux. See Where the key comes from.
Otherwise:
-
Create a key at routemux.com/console/keys.
-
Add this line to your shell profile —
~/.zshrcif you use zsh (the macOS default),~/.bashrcif you use bash:export ROUTEMUX_API_KEY='sk-...' -
Open a new terminal so the change takes effect.
If you use the install script in step 2, it can ask for the key and save it to your profile for you.
Step 2: Install the skills
npx skills add https://routemux.com -gThis needs Node.js. It finds the agents installed on your machine and asks which ones to install into. To skip the question, name the agent:
npx skills add https://routemux.com -g -a codexnpx skills add https://routemux.com -g -a claude-code-g installs for all your projects. Leave it out to install into the current project only.
No Node.js, or prefer a Claude Code plugin? See Other ways to install.
Step 3: Ask
Start your agent from a new terminal, so it sees the key, and ask:
Draw a minimalist coffee shop logo and save it to ./logo.pngThe agent writes a detailed prompt, generates the image and tells you where it saved it, its real size, the model and the price.
The first time a skill runs, your agent asks for permission. Allow it:
- Claude Code asks to run a Bash command.
- Codex may ask to approve network access.
If Codex was already running when you installed, restart it first.
Started your agent from the Dock?
Agents started from the Dock or a desktop launcher do not read your shell profile, so they may not see the key. Start the agent from a terminal, or set the key in the agent's own config — see Agent cannot see the key.
Call a skill by name
Asking in plain words is enough. To call a skill directly:
| Agent | Images | Video |
|---|---|---|
| Claude Code, installed as a plugin | /routemux:routemux-images | /routemux:routemux-video |
| Claude Code, installed with npx or the script | /routemux-images | /routemux-video |
| Codex | $routemux-images | $routemux-video |
| Any other agent | Just ask | Just ask |
What's included
| Skill | What it does | Try asking |
|---|---|---|
routemux-images | Generate and edit images with GPT Image 2.5. Guide | "Make a poster for a jazz night" |
routemux-video | Make videos from text with MiniMax H3. Guide | "A 5-second clip of rain on a window" |
routemux-models | Which models your key can call, what they cost, what they support | "Which image models can my key use?" |
routemux-setup | Point your tools at RouteMux | "Set up Codex to use RouteMux" |
Other ways to install
Claude Code plugin
Requires Claude Code 2.1.224 or later. Type these inside a Claude Code session, one at a time:
/plugin marketplace add https://routemux.com/.well-known/agent-skills/marketplace.json/plugin install routemux@routemux/reload-pluginsPlugin or npx — pick one
For Claude Code, install either the plugin or the npx version, not both. With both, every skill shows up twice.
Install script (no Node.js)
curl -fsSL https://routemux.com/.well-known/agent-skills/install.sh | shThe script:
- Finds the agents on your machine and installs the skills into each one's skills directory.
- Checks every download against its sha256 digest and stops if one does not match.
- If
ROUTEMUX_API_KEYis not set, asks for your key (the input is hidden), checks it with RouteMux, and — only if you say yes — adds it to your shell profile. It tells you plainly that the key is stored there in plain text. If your agent already uses RouteMux, press Enter to skip this.
To install for one agent only:
curl -fsSL https://routemux.com/.well-known/agent-skills/install.sh | sh -s -- --agent codexOther options: --dir PATH installs into a directory you choose, and --no-key skips the
key step.
| Agent | Skills directory |
|---|---|
| Claude Code | ~/.claude/skills |
| Codex | ~/.agents/skills |
| Cursor | ~/.cursor/skills |
| OpenCode | ~/.config/opencode/skills |
| Gemini CLI | ~/.gemini/skills |
Manual download
The index at
routemux.com/.well-known/agent-skills/index.json
lists one zip per skill. Each entry has a url (relative to https://routemux.com) and a
digest (sha256:...).
-
Download the zip for the skill you want.
-
Check that its sha256 matches the digest —
shasum -a 256on macOS,sha256sumon Linux. -
Unzip it into a folder named after the skill, inside your agent's skills directory (see the table above).
SKILL.mdsits at the root of the zip:mkdir -p ~/.claude/skills/routemux-images unzip routemux-images-*.zip -d ~/.claude/skills/routemux-images
Where the key comes from
The skills take the first key they find, in this order:
| Where | Used when |
|---|---|
ROUTEMUX_API_KEY | Always |
ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY | ANTHROPIC_BASE_URL is https://api.routemux.com — Claude Code set up for RouteMux |
OPENAI_API_KEY | OPENAI_BASE_URL is https://api.routemux.com/v1 — Qwen Code, OpenAI SDKs |
GEMINI_API_KEY | GOOGLE_GEMINI_BASE_URL is https://api.routemux.com/vertex-ai — Gemini CLI |
~/.codex/config.toml: a provider's experimental_bearer_token, or the variable its env_key names | that provider's base_url is https://api.routemux.com/v1 — Codex. The active model_provider is tried first |
~/.claude/settings.json: env.ANTHROPIC_AUTH_TOKEN or env.ANTHROPIC_API_KEY | env.ANTHROPIC_BASE_URL is https://api.routemux.com — Claude Code, when the skill runs in another agent |
Only the host of the base URL is compared, so /v1 or a trailing slash makes no
difference. A key whose base URL points anywhere else — the vendor's own API, another
gateway, or no base URL at all — belongs to that service, and the skills never use it.
In the config files a key is only ever paired with the base URL of its own entry, and
CODEX_HOME / CLAUDE_CONFIG_DIR are honoured.
What the skills touch
- The key comes from the places above only: environment variables, and the RouteMux
entry of the Codex and Claude Code config files. The skills never read
.envor any other file, never write the key anywhere, and only send it toapi.routemux.com. - The only files they write are the images and videos you ask for.
- No
eval, no SDK — justbash,curland a littlepython3. MIT-licensed.
Next
- Images — sizes, editing, models and pricing
- Video — length, resolution, aspect ratio and pricing
- Troubleshooting — key not found, top-up required, updating and uninstalling