Learn-skills.dev openrouter
OpenRouter AI integration — list available models, get integration code examples for different environments, and send prompts to any OpenRouter-compatible model. Requires OPENROUTER_API_KEY env var for chat operations.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/aibtcdev/skills/openrouter" ~/.claude/skills/neversight-learn-skills-dev-openrouter && rm -rf "$T"
manifest:
data/skills-md/aibtcdev/skills/openrouter/SKILL.mdsource content
OpenRouter Skill
Provides AI integration capabilities via OpenRouter — a unified API for 100+ LLMs.
- Model Discovery — List available OpenRouter models with capabilities, context windows, and pricing.
- Integration Guide — Get code examples and patterns for integrating OpenRouter in different environments (Node.js, Cloudflare Workers, browser).
- Chat — Send a prompt to any OpenRouter model and return the response. Requires
env var.OPENROUTER_API_KEY
Usage
bun run openrouter/openrouter.ts <subcommand> [options]
Subcommands
models
List available OpenRouter models with capabilities and pricing.
bun run openrouter/openrouter.ts models [--filter <term>]
Options:
(optional) — Filter models by name (case-insensitive substring match)--filter
guide
Print integration code examples for a target environment.
bun run openrouter/openrouter.ts guide [--env <environment>] [--feature <feature>]
Options:
— Target environment:--env
|nodejs
|cloudflare-worker
|browser
(default:all
)all
— Feature to show:--feature
|chat
|completion
|streaming
|function-calling
(default:all
)all
chat
Send a prompt to an OpenRouter model. Requires
OPENROUTER_API_KEY environment variable.
bun run openrouter/openrouter.ts chat --prompt "Hello" [--model <model-id>] [--max-tokens <n>]
Options:
(required) — The prompt to send--prompt
(optional) — Model ID (default:--model
)openai/gpt-4o-mini
(optional) — Max tokens in response (default: 1024)--max-tokens
Notes
andmodels
work without an API key.guide
requireschat
environment variable (get from https://openrouter.ai/keys).OPENROUTER_API_KEY- OpenRouter API base:
https://openrouter.ai/api/v1