openrouter-typescript-sdk — Claude Code skill
Use this skill to integrate the OpenRouter TypeScript SDK into a project. It covers model calls, agent tools, streaming, OAuth, and API key management.
npx skills add OpenRouterTeam/skills --skill openrouter-typescript-sdk -a claude-codeWhat openrouter-typescript-sdk does
The reference covers two packages. @openrouter/agent provides the callModel pattern, tools, streaming, and stop conditions; @openrouter/sdk handles platform features such as model listings, chat completions, OAuth, and API keys. It also describes retrieving generated text from a model response.
API requests require an OpenRouter key supplied through OPENROUTER_API_KEY. For user-facing apps, the guide outlines OAuth with PKCE: create an authorization code, then exchange it for the user’s key. Keep keys in environment variables rather than source code. Installing this skill is separate from adding either SDK package to your project.
What it helps with
- connect a TypeScript client to OpenRouter
- call a model with
callModel - add tools and streaming to an agent
- let users authorize through OAuth PKCE
- manage API keys from application code
Example prompts for the agent
- Show me how to call an OpenRouter model with
callModelin my TypeScript project. - Explain how to add tools with
@openrouter/agent. - Walk me through OAuth PKCE and exchanging an authorization code for a user API key.
How to install openrouter-typescript-sdk
1Skills CLI (Vercel)
npx skills add OpenRouterTeam/skills --skill openrouter-typescript-sdk -a claude-code2Manually: put the files in place
~/.claude/skills/openrouter-typescript-sdk/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/openrouter-typescript-sdk/
1Skills CLI (Vercel)
npx skills add OpenRouterTeam/skills --skill openrouter-typescript-sdk -a codex2Manually: put the files in place
.agents/skills/openrouter-typescript-sdk/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add OpenRouterTeam/skills --skill openrouter-typescript-sdk -a cursor2Manually: put the files in place
.cursor/skills/openrouter-typescript-sdk/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install OpenRouterTeam/skills openrouter-typescript-sdk2Manually: put the files in place
.github/skills/openrouter-typescript-sdk/SKILL.md1Skills CLI (Vercel)
npx skills add OpenRouterTeam/skills --skill openrouter-typescript-sdk -a gemini-cli2Platform CLI
gemini skills install https://github.com/OpenRouterTeam/skills --path skills/openrouter-typescript-sdkManually: put the files in place
.devin/skills/openrouter-typescript-sdk/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add OpenRouterTeam/skills --skill openrouter-typescript-sdk -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about openrouter-typescript-sdk
How do I install openrouter-typescript-sdk in Claude Code?
Run npx skills add OpenRouterTeam/skills --skill openrouter-typescript-sdk -a claude-code. The skill file is placed at ~/.claude/skills/openrouter-typescript-sdk/SKILL.md.
What does openrouter-typescript-sdk do?
It guides TypeScript integration with OpenRouter, including model calls, agent tools, streaming, OAuth, and API key management.
Which SDK packages does the skill cover?
@openrouter/agent covers agent features, while @openrouter/sdk provides platform features such as model access, OAuth, and key management.