OpenRouter Skill

Stop rebuilding the same OpenRouter integration every project.

A reusable skill that gives your AI coding agent ready-made patterns for model discovery, image generation, cost lookup, routing, and production playbooks — so the agent writes better OpenRouter code instead of starting from scratch.

A skill is a knowledge pack your AI coding agent loads to write better integration code — templates, playbooks, and structured references it applies instead of starting from scratch.

npx skills add bnishit/openrouter-skill
MIT Licensed · Open Source · TypeScript

Real problems. Concrete solutions.


Three steps. Then you are building.

1

Install

npx skills add bnishit/openrouter-skill

One command installs the skill, templates, helpers, tests, and playbooks. Open your terminal and run it.

2

Invoke

Talk to your AI agent. Mention the skill and say what you need:

Use the OpenRouter skill to add image generation to this app. Use the OpenRouter skill to build an agentic tool-calling loop. Use the OpenRouter skill to add a model picker with free-model filtering. Use the OpenRouter skill to look up exact cost per generation. Use the OpenRouter skill to set up provider routing with fallbacks. Use the OpenRouter skill to add PDF and image chat support.
3

Ship

Your agent scaffolds production-ready code using the skill's knowledge:

  • Routes and API handlers from starter templates
  • Edge cases covered by production playbooks
  • Cost tracking and logging wired in
  • Fallback and routing configured
  • You review, test, deploy

The full toolkit. Every card shows you how.

Provider & Free Models

Filter by provider. Find zero-cost models automatically.

See how →

Starter Templates

Next.js and Express routes. Copy, not configure.

See how →

Asset Workflows

Icons, OG images, banners. Generate, preview, persist.

See how →

Production Playbooks

Fallback rules, logging, audit trails. Encoded, not remembered.

See how →

Safer Defaults

Proxies block untrusted URLs. Allowlist what you trust.

See how →

Verification

Smoke tests and doc-check scripts. Know when OpenRouter changes.

See how →

Install in one command. Build in minutes.

Skills CLI
npx skills add bnishit/openrouter-skill
Git Clone
git clone https://github.com/bnishit/openrouter-skill.git

After install, your AI agent gains access to the full OpenRouter skill — model catalogs, multimodal patterns, cost tracking, routing playbooks, and starter templates. Invoke with $openrouter-integration in any prompt.


If any of these sound familiar.

"I need AI in my product, and I don't want to pick one provider."

Building a product with AI models for chat, search, content, images, documents. Want access to every model through one API without rewiring when you switch providers.

"I need to understand and control AI costs."

AI features in production, bill growing. Need exact per-generation cost data, route to cheaper providers for low-stakes tasks, and know where the money goes.

"I need to ship AI features fast and not break them later."

On a deadline. Need starter templates that work, fallback handling that doesn't require incident-driven learning, and the ability to add models without touching integration code.


The stuff the page above didn't cover.

The SDK is the transport layer — HTTP calls and auth. This skill is the decision layer — which model to pick, how to route, what to do on failure, how to audit costs. They complement each other.

No. Works with any agent supporting skills install. Templates produce standard Next.js/Express code. Stop using the skill, keep all generated code.

The skill fetches catalogs live from the OpenRouter API — it never ships hardcoded model lists. Run check_openrouter_docs.py --quick to detect API drift.

The skill enforces server-side key management. Proxy route templates handle auth headers plus OpenRouter attribution headers. Keys never touch the browser.

Yes. Every capability is modular. Use just image generation, or just cost tracking, or just routing playbooks. Pick what you need.

They encode specific patterns: tool-call loop limits, Zod schema validation, generation-ID persistence, provider fallback ordering, remote-asset URL allowlisting. Extracted from real production incidents, not theoretical best practices.

You can, and you should for reference. The skill exists because reading docs doesn't prevent you from rebuilding the same integration scaffolding every project. It encodes the patterns that worked — model filtering, provider fallbacks, cost lookup, streaming setup, multimodal request shapes — so your agent applies them directly instead of translating docs into code from scratch each time.