oauth

oauth is a command for coding agents from xcodethink/open-claude-code-skills. It costs 27 tokens per session (319 once invoked), scanned A, original, MIT.

A safety workflow for changing OAuth, the standard used by services such as Google Sign-In to let users log in through another account.

In plain words
What is it for?
Use it when modifying Google login, NextAuth, session handling, authentication middleware, providers, environment settings, callback URLs, or post-deployment sign-in and sign-out.
Why use it?
It protects login from accidental breakage by restricting sensitive file changes, checking deployment settings, and testing the complete login path after release.

Command

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.

agentmods
npx agentmods add commands/xcodethink/open-claude-code-skills/oauth
Clone the repo
git clone --depth 1 https://github.com/xcodethink/open-claude-code-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 oauth

README.md
[![agentmods](https://agentmods.dev/badge/commands/xcodethink/open-claude-code-skills/oauth.svg)](https://agentmods.dev/commands/xcodethink/open-claude-code-skills/oauth)
Your own site
<a href="https://agentmods.dev/commands/xcodethink/open-claude-code-skills/oauth"><img src="https://agentmods.dev/badge/commands/xcodethink/open-claude-code-skills/oauth.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 319 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00027 $0.00319
Opus 5 $0.00014 $0.00160
Sonnet 5 $0.00005 $0.00064
Haiku 4.5 $0.00003 $0.00032

Measured 3d ago against content hash 38a16db6033b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 3d 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.

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.

commands/oauth.md · 23 lines

What it actually says

oauth — OAuth / 登录路径保护

用户输入 /oauth $ARGUMENTS 触发 三阶段强制流程(部署后 OAuth 60% 破坏率,重灾区)。

立刻读取并完整加载: ~/.claude/prompts/lib/05-部署/OAuth保护.md

按其"行为契约"段严格执行:

  1. 开发阶段:不碰 auth 文件清单(auth.ts / middleware.ts / providers/ / layout.tsx 含 SessionProvider / .env auth 段)— 碰了必须单独说明影响等用户 yes
  2. 部署前:验证 env vars 齐全 + NEXTAUTH_URL 与域名一致 + Google Console 回调 URI + git diff auth 文件无意外
  3. 部署后(强制):登录按钮可见 → Google 登录完成跳转 → session 有效 → 退出重登。任一失败 → 立即 git revert

参数含修饰符 → 叠加对应文件。

核心契约:auth 文件改动绝不"顺便",绝不在生产调试。任何疑似 auth 改动单独列影响等 yes。

参数: $ARGUMENTS

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. 3d ago First seen · 23 lines · 0 tokens per session scan A 38a16db6033b

Subscribe to this mod's changes

oauth is a command published in the GitHub repository xcodethink/open-claude-code-skills (2 stars, last pushed 28d ago), licensed MIT. It adds 27 tokens to every session and 319 once invoked, about $0.0001 per session on Opus 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-31.