oauth

oauth is a skill for Claude Code, Codex from prizmad/agent-skills. It costs 52 tokens per session (1,345 once invoked), scanned A, original, MIT.

An OAuth 2.1 authorization service for connecting apps and AI tools to protected services, with separate flows for interactive users and automated servers.

In plain words
What is it for?
Use it for connector sign-in with PKCE, automatic client registration, refresh tokens, headless server access, or direct API-key authentication.
Why use it?
It handles sign-in, token renewal, and machine-to-machine access without requiring every client to implement authentication itself.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for connector sign-in with PKCE, automatic client registration, refresh tokens, headless server access, or direct API-key authentication.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/prizmad/agent-skills/oauth
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add prizmad/agent-skills --skill oauth
Clone the repo
git clone --depth 1 https://github.com/prizmad/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for oauth

README.md
[![agentmods](https://agentmods.dev/badge/skills/prizmad/agent-skills/oauth/github.svg)](https://agentmods.dev/skills/prizmad/agent-skills/oauth)
Your own site
<a href="https://agentmods.dev/skills/prizmad/agent-skills/oauth"><img src="https://agentmods.dev/badge/skills/prizmad/agent-skills/oauth/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for oauth

Your own site · 80×15
<a href="https://agentmods.dev/skills/prizmad/agent-skills/oauth"><img src="https://agentmods.dev/badge/skills/prizmad/agent-skills/oauth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,345 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.01345
Opus 5 $0.00026 $0.00673
Sonnet 5 $0.00010 $0.00269
Haiku 4.5 $0.00005 $0.00135

Measured 8d ago against content hash 84e5ac3f9f62, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

oauth scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://prizmad.com/oauth/token \
oauth/SKILL.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prizmad OAuth 2.1

Prizmad publishes a full OAuth 2.1 authorization server with Dynamic Client Registration. Three grant types are supported, each for a different audience:

Grant When Output
authorization_code (PKCE S256, public client) Interactive MCP / connector flow — Claude Desktop, Claude.ai, ChatGPT, Cursor, Zed RS256 JWT, audience https://prizmad.com/api/mcp, 1 h, refresh-rotated
refresh_token Companion to authorization_code Same shape; old refresh is single-use, reuse revokes the chain
client_credentials Headless / server-to-server using an API key as client_secret HS256 JWT, audience https://prizmad.com/api, 1 h

The MCP server also accepts the raw API key (przmad_sk_live_...) as a Bearer token directly, without going through OAuth at all.

Discovery

Authorization Code + PKCE (the "Connect" flow)

This is what runs when a user clicks Add custom connector → enter https://prizmad.com/api/mcp in Claude Desktop, Claude.ai, ChatGPT, Cursor, etc. The client implements RFC 7591 / 8414 / 9728 / 7636 / 8707; no manual app registration is needed.

1. POST /api/mcp without auth
   ← 401 + WWW-Authenticate: Bearer resource_metadata="…"

2. GET /.well-known/oauth-protected-resource
   GET /.well-known/oauth-authorization-server

3. POST /oauth/register
   Body (RFC 7591):
     {
       "client_name":  "<your app>",
       "redirect_uris": ["<your callback URL>"],
       "grant_types":   ["authorization_code", "refresh_token"],
       "response_types": ["code"],
       "token_endpoint_auth_method": "none"
     }
   ← 201 { "client_id": "mcp_…", … } (no client_secret — public client)

4. Browser to /oauth/authorize?
       response_type=code
     & client_id=<from step 3>
     & redirect_uri=<from step 3>
     & code_challenge=<S256(verifier)>
     & code_challenge_method=S256
     & scope=videos:read videos:write
     & resource=https://prizmad.com/api/mcp
     & state=<csrf>
   User signs in (NextAuth) and approves on the consent screen.
   ← 302 redirect_uri?code=…&state=…

5. POST /oauth/token
     grant_type=authorization_code
     code=<from step 4>
     redirect_uri=<from step 3>
     client_id=<from step 3>
     code_verifier=<original PKCE verifier>
     resource=https://prizmad.com/api/mcp
   ← 200 { "access_token": "<RS256 JWT>", "refresh_token": "…", "expires_in": 3600, "token_type": "Bearer" }

6. POST /api/mcp with Authorization: Bearer <access_token>
   ← MCP traffic.

Read the full file on GitHub · 138 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 138 lines · 52 tokens per session scan A 84e5ac3f9f62

Subscribe to this mod's changes

oauth is a skill published in the GitHub repository prizmad/agent-skills (2 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 1,345 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.