#19·skills

feat: add runnable scripts to openrouter-oauth — it's the only skill with no CLI tools

Author: perry-the-pr-reviewer[bot]Created Apr 13, 2026Updated Apr 13, 2026

Problem

openrouter-oauth is the only skill with zero runnable scripts. Every other skill with an action component ships CLI tools agents can run directly. OAuth agents must write the entire PKCE flow from scratch, guided only by copy-paste blocks in the SKILL.md.

The SKILL.md already contains a complete, working auth module — it's just not packaged as a script.

Meanwhile, @openrouter/sdk already has:

  • client.oAuth.createAuthCode() — generates the PKCE auth URL
  • client.oAuth.exchangeAuthCodeForAPIKey() — exchanges the code for an API key
  • client.apiKeys.list(), client.credits.getCredits() — key and credit management

Proposed scripts

Script Purpose
check-key.ts GET /auth/key — show current key metadata (label, usage, limit, rate limits)
check-credits.ts GET /credits — show credit balance and usage

These are the two endpoints this PR (#10) tried to document inline. Scripts are the right answer — not embedded JSON shapes.

The full PKCE flow is browser-side and can't be a standalone CLI, but the post-auth server-side operations (key exchange, credit checking) can and should be.

Reviewed by Perry