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.
npx skills add h4vzz/awesome-ai-agent-skills --skill oauth-2-0-setupgit clone --depth 1 https://github.com/h4vzz/awesome-ai-agent-skillsWrote 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.
[](https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/oauth-2-0-setup)<a href="https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/oauth-2-0-setup"><img src="https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/oauth-2-0-setup/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.
<a href="https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/oauth-2-0-setup"><img src="https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/oauth-2-0-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.03158 |
| Opus 5.5 | $0.00014 | $0.01263 |
| Sonnet 5.5 | $0.00007 | $0.00632 |
| Haiku 4.5 | $0.00003 | $0.00316 |
Grade A, and why
oauth-2-0-setup 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 1mo 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.
const tokenResponse = await fetch(OAUTH_CONFIG.tokenEndpoint, { This is a copy
98% identical to oauth-2-0-setup — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OAuth 2.0 Setup
This skill enables an AI agent to implement OAuth 2.0 authentication for API integrations. The agent selects the appropriate grant type for the use case—authorization code with PKCE for user-facing apps, client credentials for machine-to-machine auth, and device code for input-limited devices. It handles token storage, refresh token rotation, CSRF protection via the state parameter, and secure credential management throughout the flow.
Workflow
-
Select the appropriate grant type: Choose the OAuth 2.0 flow based on the client type. Use authorization code with PKCE for web and mobile apps where a user is present—PKCE replaces the client secret and prevents authorization code interception attacks. Use client credentials for server-to-server communication with no user context. Use device code flow for CLI tools or smart TVs where browser-based login isn't possible. Implicit flow is deprecated and should not be used.
-
Register the application with the provider: Create an OAuth application in the provider's developer console (Google, GitHub, Auth0, etc.). Configure the redirect URI precisely—mismatched URIs are the most common setup error. For PKCE flows, mark the application as a public client. Record the client ID, client secret (if applicable), authorization endpoint, token endpoint, and scopes.
-
Implement the authorization request: Construct the authorization URL with the required parameters:
client_id,redirect_uri,response_type=code,scope, and a cryptographically randomstateparameter for CSRF protection. For PKCE, generate a randomcode_verifier(43-128 characters), derive thecode_challengeusing SHA-256, and include bothcode_challengeandcode_challenge_method=S256in the request. Store the state and code_verifier in the session. -
Handle the callback and exchange tokens: When the provider redirects back with the authorization code, first verify the
stateparameter matches what was stored in the session. Then exchange the code for tokens by POSTing to the token endpoint withgrant_type=authorization_code, the authorization code,redirect_uri,client_id, and thecode_verifier(for PKCE). Parse the response foraccess_token,refresh_token,expires_in, andtoken_type.
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.
- 1mo ago First seen · 293 lines · 34 tokens per session scan A 0020839ef88c
oauth-2-0-setup is a skill published in the GitHub repository h4vzz/awesome-ai-agent-skills (36 stars, last pushed 22d ago), licensed MIT. It adds 34 tokens to every session and 3,158 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 98% identical to oauth-2-0-setup, differing in 2 lines, and is treated as a copy.
Other skills, from other repositories
django-tdd
Django testing strategies with pytest-django, TDD methodology, factoryboy, mocking, coverage, and testing Django REST Framework APIs.
kotlin-ktor-patterns
Ktor server patterns including routing DSL, plugins, authentication, Koin DI, kotlinx.serialization, WebSockets, and testApplication testing.
laravel-patterns
Laravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps.
goframe-v2
GoFrame development skill. TRIGGER when writing/modifying Go files, implementing services, creating APIs, or database operations. DO NOT TRIGGER for frontend/shell scripts.
java-coding-standards
Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.
api-contract
A guide for defining and reviewing an API contract: the agreed shape of requests, responses, authentication, errors, and compatibility rules between services. It can also guide OpenAPI checks and contract testing, which verifies that systems follow those agreements.