agentleFS
juliasadlerjuliasadler/muse-skills-cn/skills/openrouter/SKILL.md

openrouter

Skill1 starsChanged 29 days agoMITView on GitHub

Use OpenRouter when the user asks for OpenRouter or this provider's API.

  • Reads credentials

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use OpenRouter (https://openrouter.ai) — one API key for hundreds of models.

    line 10
  2. Distinctive:

    Use it whenever the user asks for OpenRouter or a specific model served through it.

    line 11
  3. Distinctive:

    Use this skill when the user asks for OpenRouter or this provider's API.

    line 37
  4. Distinctive:

    Do not print, log, or persist raw credentials.

    line 39

“Common” is measured: kept by at least 6 in 10 of the 6 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OpenRouter

Purpose

Use OpenRouter (https://openrouter.ai) — one API key for hundreds of models. Use it whenever the user asks for OpenRouter or a specific model served through it.

Auth

Set the OPENROUTER_API_KEY environment variable (get one at https://openrouter.ai/keys):

export OPENROUTER_API_KEY="sk-or-v1-..."

The CLI never prints, logs, or persists the key. A 401/403 is a question about the request before it is a question about the key — check that the header was attached, then verify the key in the OpenRouter dashboard.

Tooling

CLI: ./bin/openrouter (Python 3, stdlib only, executable).

  • openrouter check — verify the key: GET /api/v1/auth/key (free, no token spend). Run this first whenever auth is in doubt.
  • openrouter chat --model <slug> --prompt "<text>" [--max-tokens N] [--provider "A,B"] [--quantizations "bf16,fp16"] — dispatch one chat completion. --provider pins the serving provider(s); --quantizations filters by precision (use bf16,fp16 to avoid low-bit "dumbed-down" deployments).
  • openrouter image --model <slug> --prompt "<text>" [--out PATH] [--modalities image,text] — generate via chat/completions with modalities (for Gemini/GPT image models).
  • openrouter images --model <slug> --prompt "<text>" [--out PATH] [--size 1024x1024] — generate via POST /api/v1/images (for pure image models like qwen-image, seedream, flux that reject chat/completions).

Operating Rules

  1. Use this skill when the user asks for OpenRouter or this provider's API.
  2. Restrict authenticated requests to: openrouter.ai.
  3. Do not print, log, or persist raw credentials.
  4. Tip: omit HTTP-Referer / X-Title headers — some free-tier providers return empty content when they are present.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.