atproto-oauth

atproto-oauth is a skill for Claude Code from ngerakines/atproto-skills. It costs 711 tokens per session (4,103 once invoked), scanned A, original, MIT.

A guide to AT Protocol OAuth, the sign-in and permission system used by applications in the AT Protocol network, implemented in Rust, TypeScript, or Go.

In plain words
What is it for?
Use it to implement, audit, or debug backend, single-page web, and desktop OAuth clients and their authorization, token, and resource requests.
Why use it?
It helps avoid mistakes in a security-sensitive login flow that requires PKCE, PAR, DPoP, published client metadata, and carefully designed permissions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the atproto-skills plugin — 7 skills shipped together

Good fit Use it to implement, audit, or debug backend, single-page web, and desktop OAuth clients and their authorization, token, and resource requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ngerakines/atproto-skills/atproto-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 ngerakines/atproto-skills --skill atproto-oauth
Clone the repo
git clone --depth 1 https://github.com/ngerakines/atproto-skills

Made for: Claude Code.

Or install atproto-skills, the plugin that ships this one along with the rest of its 7 skills.

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 atproto-oauth

README.md
[![agentmods](https://agentmods.dev/badge/skills/ngerakines/atproto-skills/atproto-oauth/github.svg)](https://agentmods.dev/skills/ngerakines/atproto-skills/atproto-oauth)
Your own site
<a href="https://agentmods.dev/skills/ngerakines/atproto-skills/atproto-oauth"><img src="https://agentmods.dev/badge/skills/ngerakines/atproto-skills/atproto-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 atproto-oauth

Your own site · 80×15
<a href="https://agentmods.dev/skills/ngerakines/atproto-skills/atproto-oauth"><img src="https://agentmods.dev/badge/skills/ngerakines/atproto-skills/atproto-oauth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 711 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,103 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00711 $0.04103
Opus 5.5 $0.00284 $0.01641
Sonnet 5.5 $0.00142 $0.00821
Haiku 4.5 $0.00071 $0.00410

Measured 2mo ago against content hash de0c0545fa49, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

atproto-oauth scanned grade A with 0 findings 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 2mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate_client_metadata.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/atproto-oauth/SKILL.md · 194 lines

How it starts

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

AT Protocol OAuth

AT Protocol OAuth is an OAuth 2.1 profile with mandatory PKCE (S256), PAR, DPoP, and URL-based dynamic client registration via a published client metadata document. No client_secret — confidential clients authenticate to the token endpoint with a private_key_jwt assertion (ES256). Public / SPA / native clients authenticate by DPoP proof alone.

This skill routes to per-language guides for Rust, TypeScript, and Go, sitting on top of a language-neutral spec in shared/.

Defaults

  • client_id is a URL. It resolves to a JSON metadata document the AS fetches on demand. The URL path, host, and protocol must match byte-for-byte between registration, PAR, and authorize.
  • Every access token is DPoP-bound. dpop_bound_access_tokens: true is required in client metadata; every resource request carries a fresh DPoP proof with ath = SHA-256(access_token) and a per-origin nonce.
  • PAR is required. You push the authorize request to pushed_authorization_request_endpoint and redirect the user to {AS}/oauth/authorize?client_id=...&request_uri=urn:ietf:params:oauth:request_uri:.... Query parameters never hit the user-agent.
  • Scopes start with atproto. All flows must request atproto as the first scope. Further scopes are layered on: transition:generic, account:email?action=read, rpc:app.bsky.feed.*, include:<permission-set>, etc.
  • The session belongs to the DID. sub in the token response is a DID. Handles may change; DIDs don't. Persist by DID.
  • Identity verification is mandatory: sub → DID document → #atproto_pds → matches the PDS you discovered → authorization_servers[0] → matches the AS you talked to. Skip this step = CSRF window.

Full normative rules: shared/spec.md, shared/flows.md, shared/client-metadata.md, shared/dpop.md, shared/scopes.md, shared/sessions.md, shared/security-requirements.md. Fixtures: shared/test-vectors.md. Common failures: shared/troubleshooting.md. Cross-language differences: shared/divergence-matrix.md.

Read the full file on GitHub · 194 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. 2mo ago First seen · 194 lines · 711 tokens per session scan A de0c0545fa49

Subscribe to this mod's changes

atproto-oauth is a skill published in the GitHub repository ngerakines/atproto-skills (53 stars, last pushed 6mo ago), licensed MIT. It adds 711 tokens to every session and 4,103 once invoked, about $0.0028 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

atproto-oauth compared with skills from other repositories

atproto-oauth next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
atproto-oauthngerakines/atproto-skillsSkill536mo agoMITA711Claude Code
litellmmagnus919/agent-skillsSkill1662d agoMITA173Claude Code, Codex
emailmagnus919/agent-skillsSkill1662d agoMITA135Claude Code, Codex
supabasemagnus919/agent-skillsSkill1662d agoMITA94Claude Code, Codex
api-testingpetrkindlmann/qa-skillsSkill25015d agoMITA129Claude Code, Codex
vercel-evemagnus919/agent-skillsSkill1662d agoMITA99Claude Code, Codex
spring-aimagnus919/agent-skillsSkill1662d agoMITA80Claude Code, Codex