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.
Landing page: bnishit.github.io/openrouter-skill
npx skills add bnishit/openrouter-skillWorks with any AI agent that supports the skills install flow.
After install, invoke it as $openrouter-integration.
Direct git clone:
git clone https://github.com/bnishit/openrouter-skill.gitInstall from openrouter-skill. Use $openrouter-integration in prompts.
- Model Discovery — search 300+ models by capability, price, or provider and build a picker in minutes
- Image Generation — generate images via chat completions with presets for icons, OG images, and social assets
- Multimodal Chat — send text, images, and PDFs in the same conversation and parse any response type
- Cost Tracking — look up exact cost per generation with real billing data, not estimates
- Routing & Fallbacks — route to cheapest provider and fall back automatically when one goes down
- Tool Calling — agentic loops with safety limits and structured output with Zod validation
- Provider & Free Models — filter by provider and find zero-cost models automatically
- Starter Templates — Next.js and Express routes ready to copy, not configure
- Asset Workflows — icons, OG images, banners — generate, preview, and persist with metadata
- Production Playbooks — fallback rules, logging, audit trails — encoded, not remembered
- Safer Defaults — proxies block untrusted URLs unless you explicitly allowlist trusted hosts
- Verification — smoke tests and doc-check scripts that detect when OpenRouter changes
Use $openrouter-integration to add an OpenRouter model picker to this app.Use $openrouter-integration to add image generation plus image and PDF chat support through an OpenRouter server route.Use $openrouter-integration to make this OpenRouter workflow production-safe with the built-in best-practice playbooks for routing, tools, and observability.
.
├── SKILL.md
├── agents/openai.yaml
├── references/
├── scripts/
├── assets/
└── docs/
SKILL.md: trigger metadata plus the core OpenRouter workflowagents/openai.yaml: UI-facing metadata for supported agent skill systemsreferences/: targeted reference material for image generation, requests, routing, troubleshooting, and docs checksreferences/catalog-routing-best-practices.md: production rules for model catalogs, provider filters, and fallbacksreferences/image-generation-best-practices.md: concrete icon, OG image, social asset, preview, and storage rulesreferences/tool-calling-and-structured-output-best-practices.md: production rules for tools, schemas, and validation loopsreferences/operations-and-observability-best-practices.md: logging, generation id, cost audit, and artifact-traceability rulesscripts/: helper scripts for documentation checks and starter installationassets/: reusable templates, shared helpers, and smoke-test fixturesdocs/: static landing page and search-facing metadata for GitHub Pages
- Templates: Next.js and Express starter routes for models, chat, image generation, and cost lookup — plus UI components like a model picker and image workbench
- Shared helpers: TypeScript utilities for streaming (SSE), response parsing, generated-image extraction, asset persistence, and structured output validation
- Tests: Curl-based smoke tests and fixtures covering text, JSON, tools, image analysis, image generation, and PDFs
The starter proxies default to data: URLs for uploaded assets and block arbitrary remote http(s) image/PDF URLs unless you set OPENROUTER_ALLOWED_REMOTE_ASSET_HOSTS.
catalog-routing-best-practices.md: how to build searchable model pickers, provider-aware routing, and sane fallback behavior without stale hardcoded assumptionsimage-generation-best-practices.md: how to generate icons, OG images, and social assets with preview plus storage-ready metadatatool-calling-and-structured-output-best-practices.md: how to keep tool loops and JSON extraction reliable instead of fragileoperations-and-observability-best-practices.md: how to persist generation ids, log the right fields, and answer later cost/debug questions cleanly
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.
Treat official OpenRouter documentation as the source of truth for endpoints, parameters, and capability metadata.
Use:
python3 scripts/check_openrouter_docs.py --quickWhen the script flags drift, update the templates and examples against the relevant OpenRouter documentation.
MIT