Agent skill

Openrouter

by davidondrej in davidondrej/skills

Design, build, debug, and optimize OpenRouter API integrations.

MITAuto-check passedAI & LLM Engineering

Install Openrouter

skills CLI
$ npx skills add davidondrej/skills --skill openrouter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davidondrej/skills openrouter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davidondrej/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ops-and-setup/openrouter .claude/skills/openrouter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
openrouter
GitHub stars
4.1k
Token cost
~1.3k tokens
SKILL.md length
646 words
Files
6 (incl. references)
Skills in repo
51
Repo updated
First seen
Licence
MIT

At a glance

Design, build, debug, and optimize OpenRouter API integrations.

  • Works in 5 steps: Inspect the actual outgoing request, SDK… → Verify exact model IDs and live… → Choose and record an explicit reasoning… → …
  • Any OpenRouter API work
  • SKILL.md covers Before changing configuration, Rules that prevent expensive…, Read only what the task needs and Verify the integration
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Openrouter is an agent skill from davidondrej/skills. Design, build, debug, and optimize OpenRouter API integrations. Use for any OpenRouter API work, including models, reasoning, routing, media, tools, structured output, cost, or performance.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/api-field-map.md`, `references/media-and-tools.md` and `references/reasoning-and-output.md`).

It sits in AI & LLM Engineering, covering Model routing and gateways, Third-party API integration and Structured output and tool calling. It works with OpenRouter. The repository describes itself as: access to david ondrej's personal agent skills. The licence is MIT.

When your agent uses it

  • Any OpenRouter API work
  • Including models
  • Structured output

Example prompts

  • “/openrouter”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Inspect the actual outgoing request, SDK version, existing configuration, and user preferences. Redact credentials and content. A setting…
  2. Verify exact model IDs and live capabilities through the models API. Inspect the selected model's provider endpoints too. Check…
  3. Choose and record an explicit reasoning setting for each reasoning model. Use the user's requested effort. If unspecified, choose a…
  4. Set an output ceiling, total deadline, bounded retry policy, and cost limits appropriate to the workload. Reasoning uses output tokens…
  5. Read the relevant reference below. Consult current official docs for unfamiliar fields; do not invent model IDs, provider slugs, parameter…

What it can do on your machine

Read from SKILL.md and the folder at commit 7874889. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • openrouter.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Openrouter loads about 1.3k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 50 tokens; SKILL.md has 646 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~10k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davidondrej/skills at commit 7874889, republished under its MIT licence (© davidondrej). 646 words, ~1,296 tokens.

Download SKILL.mdSave it as .claude/skills/openrouter/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
openrouter
description
Design, build, debug, and optimize OpenRouter API integrations. Use for any OpenRouter API work, including models, reasoning, routing, media, tools, structured output, cost, or performance.

OpenRouter

Make model behavior explicit. Preserve the user's quality, cost, privacy, and reliability requirements across every route and retry.

Before changing configuration

  1. Inspect the actual outgoing request, SDK version, existing configuration, and user preferences. Redact credentials and content. A setting in a UI or config file does not prove the SDK sends it.
  2. Verify exact model IDs and live capabilities through the models API. Inspect the selected model's provider endpoints too. Check input/output modalities, context and output limits, supported parameters, reasoning options, prices, and provider availability for both primary and fallback models.
  3. Choose and record an explicit reasoning setting for each reasoning model. Use the user's requested effort. If unspecified, choose a supported value for the task and state the choice; do not silently inherit a provider default or impose one effort on every model. Read reasoning and output before setting these fields.
  4. Set an output ceiling, total deadline, bounded retry policy, and cost limits appropriate to the workload. Reasoning uses output tokens too. A model's context window is not its maximum output length.
  5. Read the relevant reference below. Consult current official docs for unfamiliar fields; do not invent model IDs, provider slugs, parameter support, or SDK syntax.

Rules that prevent expensive mistakes

  • Use the unified reasoning object. reasoning.exclude: true hides reasoning; it does not turn reasoning off or make it free. Mandatory reasoning models cannot be disabled.
  • Check every fallback against the same required capabilities and privacy/cost constraints. A single models request shares configuration across candidates. If models need different efforts or budgets, implement bounded application-level attempts with separate configs.
  • Separate provider failover from model fallback. provider.order is a preference; only restricts providers; ignore excludes them. Use provider.require_parameters: true when silently dropping requested parameters would break correctness. Recheck endpoint support; this is not a semantic guarantee.
  • Match routing to the real goal: provider.sort: "price" for price, "latency" for TTFT, "throughput" for tokens/second. :nitro also permits priority tiers; :floor also permits flex tiers. They can change price or availability beyond plain sorting.
  • HTTP 200 is not application success. Check errors, finish reason, expected output type, schema, and task-specific validity. Null text may be a valid tool call. A truncated or unreviewed answer must not become a successful artifact.
  • Do not repeat a deterministic failure unchanged. On a confirmed output-limit failure, consider a supported lower effort, smaller task, or compatible fallback within the quality budget. Increasing the cap is one option, not the automatic answer. Preserve fail-closed validation on every attempt.
  • Keep keys server-side. Log diagnostic metadata, not prompts, attachments, raw reasoning, or provider errors that may contain private content. Never weaken safety/privacy restrictions just to get a successful response.
Show full SKILL.md (202 more words)Show less

Read only what the task needs

Verify the integration

Capture the serialized request in a redacted local test. Verify explicit reasoning, output limits, fallbacks, and routing constraints survive SDK serialization. Test the actual failure boundary: limit reached, null/tool output, malformed JSON, missing required capability, or mid-stream error. Run a small real smoke test when inference is authorized; do not describe mock validation as a production test.

For tuning, compare representative tasks using valid-result rate, cost per valid result, time to first visible answer, and total duration. Include retries and failed attempts. Lower effort or a faster route is acceptable only if required quality and safety still pass.

Report the chosen primary/fallback models, explicit effort and caps, routing goal, and what was verified. Distinguish confirmed API evidence from hypotheses.

© davidondrej, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/ops-and-setup/openrouter of davidondrej/skills.

  • SKILL.md
  • references/api-field-map.md
  • references/media-and-tools.md
  • references/reasoning-and-output.md
  • references/reliability.md
  • references/routing-cost-speed.md

Open the folder on GitHubat commit 7874889

Compare with similar skills

Openrouter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Openrouter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Openrouter this skilldavidondrej/skills4.1k—~1.3kAutomated safety check: PassMIT
Openrouter Function Callingjeremylongshore/tons-of-skills-marketplace2.8k—~2.6kAutomated safety check: PassMIT
Freetoken Botslimin112/min-skill412—~1.3kAutomated safety check: PassNone
Add Modelget-convex/convex-evals130—~1.5kAutomated safety check: NotesApache-2.0
Agents And MiddlewareVectorSpaceLab/AREX-Skill330—~1.2kAutomated safety check: PassMIT
To Imgrtadewald/skills185—~673Automated safety check: NotesNone

Similar skills

  • Openrouter Function Calling

    jeremylongshore/tons-of-skills-marketplace

    Implement function/tool calling with OpenRouter models. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Freetoken Bots

    limin112/min-skill

    Discover, verify, and maintain zero-priced OpenRouter models for Pi child-agent workflows used by Muse, Grokbot, or Dot.

    412 GitHub stars~1.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Add Model

    get-convex/convex-evals

    Add a new model to the convex-evals coding leaderboard, and optionally the decision benchmark, through a PR, then dispatch its baseline runs.

    130 GitHub stars~1.5k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Agents And Middleware

    VectorSpaceLab/AREX-Skill

    Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime…

    330 GitHub stars~1.2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • To Img

    rtadewald/skills

    Gera imagens em paralelo via OpenRouter a partir de um pedido simples ou de um batch com prompts e filenames definidos.

    185 GitHub stars~673 tokensUpdated 11 days ago
    AI & LLM EngineeringAuto-check: notes
  • AI Agent Builder

    claude-office-skills/skills

    Build AI agents with tools, memory, and multi-step reasoning - ChatGPT, Claude, Gemini integration patterns

    502 GitHub stars~3.1k tokensUpdated 8 mo ago
    AI & LLM EngineeringAuto-check passed

More from davidondrej/skills

All 51 skills in this repo
  • Nagent

    davidondrej/skills

    Launch a new bb worker thread with the right project, model, worktree, and task brief.

    4.1k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check: notes
  • Browser Harness

    davidondrej/skills

    Direct browser control via CDP. An agent skill from davidondrej/skills.

    4.1k GitHub starsUsed in 2 repos~3k tokens
    Auto-check passed
  • Persistent Localhost

    davidondrej/skills

    Manage persistent dev servers, APIs, and other local processes on a port using macOS LaunchAgents.

    4.1k GitHub stars~618 tokensUpdated yesterday
    Auto-check passed
  • Reset Cursor Acp

    davidondrej/skills

    Reset a stuck Cursor ACP thread in <chat-system and reload its configuration.

    4.1k GitHub stars~728 tokensUpdated yesterday
    Auto-check passed
  • Anti Sleep

    davidondrej/skills

    Keep a Mac awake for a set duration or while a process runs.

    4.1k GitHub stars~640 tokensUpdated yesterday
    Auto-check: warnings
  • Bb CLI

    davidondrej/skills

    Use this when controlling bb. An agent skill from davidondrej/skills.

    4.1k GitHub stars~823 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Openrouter

What does Openrouter do?

Design, build, debug, and optimize OpenRouter API integrations. Openrouter is an agent skill from davidondrej/skills. Design, build, debug, and optimize OpenRouter API integrations.

When should I use Openrouter?

Openrouter fits situations like: any OpenRouter API work; including models; structured output.

How do I install Openrouter in Claude Code?

Run `npx skills add davidondrej/skills --skill openrouter -a claude-code`. Or copy the skill folder (skills/ops-and-setup/openrouter in davidondrej/skills) into .claude/skills/openrouter in your project. Claude Code loads it when a task matches its description.

How do I install Openrouter in Codex?

Run `npx skills add davidondrej/skills --skill openrouter -a codex`. Or copy the skill folder (skills/ops-and-setup/openrouter in davidondrej/skills) into .agents/skills/openrouter in your project. Codex loads it when a task matches its description.

Can I use Openrouter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davidondrej/skills --skill openrouter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/openrouter, .gemini/skills/openrouter, .github/skills/openrouter and .opencode/skills/openrouter in your project.

What does Openrouter need to run?

SKILL.md names no scripts, command-line tools or credentials: Openrouter is instructions for the agent only. Our summary lists: Python 3.

Does Openrouter access the network?

SKILL.md names 1 domain. As links in the text: openrouter.ai. This is read from the text; nothing was executed.

Is Openrouter safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Openrouter use?

Openrouter is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Openrouter use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.7k tokens, read only when the agent opens those files.

What are the alternatives to Openrouter?

Skills that share tags, products or a category with Openrouter: Openrouter Function Calling (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Freetoken Bots (limin112/min-skill, 412 stars), Add Model (get-convex/convex-evals, 130 stars) and Agents And Middleware (VectorSpaceLab/AREX-Skill, 330 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Openrouter?

davidondrej (a GitHub user) maintains it in davidondrej/skills, which has 4,112 GitHub stars. The repository holds 51 skills in this directory. The repository was last updated on October 8, 2026.

Source: davidondrej/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.