The apimodels Agent Skill
A skill is a capability pack for coding agents (Claude Code, Cursor, Codex and friends). Once installed, just tell your agent "make me a vertical poster for a coffee shop" — it picks a sensible model, quotes the price first, generates, and hands you the file. You never memorise a model name or an API detail.
Install
The recommended path is the Skills CLI (the skills.sh ecosystem — one command covers Claude Code, Cursor, Codex, Cline, Gemini CLI and the other agents skills.sh supports):
npx skills add stimQQ/apimodels-skill@apimodels-imageCareful: the skill name is apimodels-image (from SKILL.md), not the directory name. @image fails with “No matching skills found”.
Manual install (Claude Code only)
git clone https://github.com/stimQQ/apimodels-skill
cp -r apimodels-skill/image ~/.claude/skills/apimodels-imageclaude.ai web / desktop: upload a zip
cd apimodels-skill && zip -r apimodels-image.zip image -x '*.DS_Store'
# claude.ai → Settings → Capabilities → 开启 Code execution
# → Customize → Skills → + Create skill → 上传 zipZip the image/ directory as the archive root (not the repo root), or claude.ai will not find SKILL.md.
Set up your API key: one browser click
After installing, have the agent run (or run yourself) the command below. It opens an apimodels.app authorization page; log in, click Authorize once, and a dedicated key named “CLI · date” is minted and delivered straight to this machine — nothing to copy-paste anywhere, and the key never appears in any chat, shell history or URL bar.
node ~/.claude/skills/apimodels-image/scripts/generate.mjs --loginVerify (it also shows your balance):
node ~/.claude/skills/apimodels-image/scripts/generate.mjs --checkTwo alternatives: if you already manage a key, set APIMODELS_API_KEY in your environment; on machines with no browser at all (CI, bare SSH) pipe the key in via --save-key. Revoke any key individually from the console whenever you like.
One habit worth keeping: never paste a key into an AI conversation — what enters the chat enters the transcript. The --login flow above exists precisely so you never have to.
How to use it
No ceremony needed — once installed, just ask in natural language. The skill holds the agent to these rules:
| You say | The agent does |
|---|---|
| “Make a 2K product shot with crisp text” | Picks gpt-image-2 ($0.03 at 2K, best small text), quotes, then generates |
| “Fuse these two references into one poster” | Picks a multi-reference model and says why in one line |
| “Batch 8 storyboard drafts” | Anything ≥5 images: total cost first, generates only after you confirm |
| “Upscale this to 4K” | Uses the Real-ESRGAN upscaler — no repainting |
Details and caveats
- Model names come from data/models.json. The skill forbids the agent from inventing model names or quoting prices from memory — ids, prices and doc links are read from the live catalog shipped with the skill.
- Failures are never charged. On a failure the agent says so plainly and offers a retry or a different model.
- Result links live for 30 days. Ask the agent to save locally with --out when you need it longer.
- Updating:
npx skills update(CLI installs); manual installs re-run the clone + cp. - First troubleshooting step: run --check. It distinguishes “no key”, “invalid key” and “insufficient balance”, each with its own fix.
- Sandboxes (claude.ai): the sandbox cannot see your machine’s environment; after the zip install, follow the agent’s key prompts. Credentials live inside the sandbox and may need re-setup in a fresh session.
What’s next
Video (Seedance, Kling, VEO, MiniMax Hailuo) and audio (ElevenLabs, Suno, MiniMax) skills are planned — same repository, same install.