Skip to content

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

@perry-the-pr-reviewer

Description

@perry-the-pr-reviewer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions