openrouter
Skill11 starsChanged 27 days agoMITView on GitHub
List, ask, compare and launch OpenRouter models from the shell. Use when the user types /openrouter, asks which models exist or what they cost, wants one answer from a named non-Claude model, wants two models compared on one prompt, or wants to start a coding session on another model.
- Reads credentials
12 other projects use a version of this.
Adopted by
Most recently taken up by
- karanmrn/kstackword for word, first seen Nov 29, 2026
- Ghost7802/awesome-api-skillstheir own version, first seen Nov 29, 2026
- alexdcd/Mafia-Claude-Skillstheir own version, first seen Nov 29, 2026
- JustinPerea/nebula-nodestheir own version, first seen Nov 23, 2026
- davidondrej/skillstheir own version, first seen Nov 15, 2026
- andreab67/agent-skillstheir own version, first seen Nov 11, 2026
Other versions12 projects use a version of this.
Word for word · 1
- karanmrn/kstack★ 11100% same
Edited · 0
None found.
Wrote their own version · 11
- davidondrej/skills★ 4.4ksame name
- alexdcd/Mafia-Claude-Skills★ 71same name
- rawveg/skillsforge-marketplace★ 40same name
- JustinPerea/nebula-nodes★ 23same name
- Ghost7802/awesome-api-skills★ 13same name
- aibtcdev/skills★ 11same name
- nateslabach/skills★ 6same name
- andreab67/agent-skills★ 1same name
- juliasadler/muse-skills-cn★ 1same name
- YOSSII812001/claude-code-jarvis★ 1same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository155 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 14-day stale PR closeSkill
- AhoySkill
- api-and-interface-designSkill
- architectSkill
- arenaSkill
- ask-mattSkill
- audit-agent-worktreesSkill
- automate-meSkill
- axiSkill
- babysit-prSkill
- benchmark-checklistSkill
- blast-radiusSkill
- broSkill
- browser-testing-with-devtoolsSkill
- cache-architectureSkill
- chief-of-staffSkill
- chrome-devtools-axiSkill
- ci-cd-and-automationSkill
- claude-handoffSkill
- codebase-designSkill
- code-review-and-qualitySkill
- code-reviewSkill
- code-simplificationSkill
- compact-adviserSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- correctSkill
- councilSkill
- create-formal-verification-skillSkill
- create-verification-skillSkill
- debugging-and-error-recoverySkill
- delegate-to-modelSkill
- deprecation-and-migrationSkill
- diagnosing-bugsSkill
- documentation-and-adrsSkill
- domain-modelingSkill
- doubt-driven-developmentSkill
- figure-it-outSkill
- file-prSkill
- frontend-ui-engineeringSkill
- full-sendSkill
- full-stopSkill
- gh-axiSkill
- git-guardrails-claude-codeSkill
- git-workflow-and-versioningSkill
- gnhfSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- hill-climbSkill
- howSkill
- idea-refineSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- incremental-implementationSkill
- interrogateSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Run openrouter <command> --help for all flags.
- Very specific: line 33
Run list with a filter. Show the user a short, relevant subset, not hundreds of rows.
- Distinctive: line 34
If the user named a task, recommend two or three models.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenRouter
scripts/openrouter (in this skill's folder) calls https://openrouter.ai/api/v1 directly. It needs only python3. Below, openrouter means that script.
Every ask and compare spends credit on the user's OpenRouter account. list and launch are free. Before a paid call, check the price with list. Add --max-tokens to put a limit on the reply. Use a :free model when the task permits.
Key
The CLI reads OPENROUTER_API_KEY from the environment. If that is empty, it reads the file named by OPENROUTER_KEY_FILE. The file holds the bare key or a .env line OPENROUTER_API_KEY=<key>.
The key is a secret. Keep it out of commands, output, logs and commits. Refer to it only as $OPENROUTER_API_KEY.
Commands
openrouter list [filter] # id, context, $/M in, $/M out, free marker
openrouter ask <model> "<prompt>" # streams the reply; tokens and cost go to stderr
openrouter ask <model> - < handoff.md # "-" reads the prompt from stdin
openrouter compare <m1> <m2> "<prompt>" # both replies side by side
openrouter launch <model> [--tool claude|codex|env] # prints the session commandRun openrouter <command> --help for all flags.
Procedure
- Run
listwith a filter. Show the user a short, relevant subset, not hundreds of rows. - If the user named a task, recommend two or three models. Give one line each on why, with the price.
- For one answer now, run
ask. Tell the user the cost from the stderr line. - To choose between models, run
compareon one representative prompt. - For a coding session, run
launchand give the user the printed command.
A running session keeps its model. launch only prints a command that starts a new session. The user runs it in another terminal.
Launch notes
- Claude Code talks to OpenRouter's Anthropic-compatible endpoint. It warns that it does not know the model's context window. The session still works.
- Codex CLI uses the Responses API through
-coverrides. Codex sends its full system prompt and project instructions, so even a short task can use many prompt tokens. - A model without tool calling cannot drive a coding agent.
launchprints a warning for such a model. - OpenCode reads models from its own catalog, which can lag OpenRouter. Run
opencode models openrouterto see what it accepts.
Errors
| Message | Cause |
no API key | Set OPENROUTER_API_KEY or OPENROUTER_KEY_FILE. |
HTTP 401 | The key is not valid or was revoked. |
HTTP 402 | The account or the key has no credit left. Tell the user. Do not retry. |
unknown model | The id changed or the model was retired. Run list with a filter. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

