oauth-setup

oauth-setup is a skill for Claude Code, Codex from spinabot/brigade. It costs 66 tokens per session (858 once invoked), scanned A, original, MIT.

A setup guide for connecting an OAuth 2.0 account, such as Gmail or another Google service, using a built-in authorization flow. OAuth is the standard process for granting an app limited access without sharing your password.

In plain words
What is it for?
Use it to connect Gmail or Google APIs, start browser-based authorization, capture the approval code, and finish saving the account credentials.
Why use it?
It avoids common connection errors and stores the resulting access tokens after the account owner approves the requested permissions.

Skill for Claude CodeCodex

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

Good fit Use it to connect Gmail or Google APIs, start browser-based authorization, capture the approval code, and finish saving the account credentials.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spinabot/brigade/oauth-setup
About the project

Brigade is an ecosystem for running crews of AI agents as a personal intelligence system, with local handling of credentials and support for exposing agent crews to the internet for testing. It is for people who want to organize and operate multiple AI agents using their own API keys or existing Claude, ChatGPT, Copilot, Claude Code, or Codex access. The catalogue skills provide workflows for using Brigade and its agent ecosystem.

spinabot/brigade · 11,371 stars · on GitHub · brigade.spinabot.com

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 spinabot/brigade --skill oauth-setup
Clone the repo
git clone --depth 1 https://github.com/spinabot/brigade

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-setup

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

agentmods 80×15 button for oauth-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/spinabot/brigade/oauth-setup"><img src="https://agentmods.dev/badge/skills/spinabot/brigade/oauth-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 858 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 38
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00066 $0.00858
Opus 5.5 $0.00026 $0.00343
Sonnet 5.5 $0.00013 $0.00172
Haiku 4.5 $0.00007 $0.00086

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

Security

Grade A, and why

oauth-setup 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.

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/oauth-setup/SKILL.md · 56 lines

How it starts

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

OAuth setup

Use the oauth_authorize tool — NEVER hand-roll an http listener in bash. It opens a one-shot loopback listener on a free port (no EADDRINUSE, no port juggling), captures the code, and seals the tokens into the credential store.

The two mistakes to avoid (they cost a whole session once)

  1. Use a Desktop-app OAuth client, not a Web client. In Google Cloud Console → Credentials → Create OAuth client ID → Application type: Desktop app. Desktop clients accept ANY http://127.0.0.1:<port> loopback redirect with no redirect-URI registration. A Web client requires the exact redirect URI pre-registered, which is what causes redirect_uri_mismatch.
  2. Use the real scope. Gmail send is https://www.googleapis.com/auth/gmail.send (NOT https://gmail.com/..., which doesn't exist). Add openid https://www.googleapis.com/auth/userinfo.email if you want the account address auto-filled.

Flow

  1. Ask the operator to create a Desktop-app OAuth client (Gmail API enabled, consent screen in Testing with themselves as a test user) and paste the client id + secret.
  2. Start the flow:
    oauth_authorize({
      action: "start",
      provider: "google-gmail",
      authorizationEndpoint: "https://accounts.google.com/o/oauth2/v2/auth",
      tokenEndpoint: "https://oauth2.googleapis.com/token",
      userInfoEndpoint: "https://www.googleapis.com/oauth2/v3/userinfo",
      clientId: "<id>", clientSecret: "<secret>",
      scopes: ["https://www.googleapis.com/auth/gmail.send", "openid", "https://www.googleapis.com/auth/userinfo.email"],
      extraAuthParams: { access_type: "offline", prompt: "consent" }
    })
    
    access_type=offline + prompt=consent are required for a refresh token (otherwise re-auth is needed when the access token expires).
  3. Send the operator the returned authUrl to click.
  4. Await the redirect — it exchanges the code and seals the tokens:
    oauth_authorize({ action: "await", flowId: "<flowId from start>" })
    
    If it returns status pending, the operator hasn't clicked yet — tell them, then call await again.

Read the full file on GitHub · 56 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 · 56 lines · 66 tokens per session scan A 0e8060ca5a71

Subscribe to this mod's changes

oauth-setup is a skill published in the GitHub repository spinabot/brigade (11,371 stars, last pushed 2d ago), licensed MIT. It adds 66 tokens to every session and 858 once invoked, about $0.0003 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

oauth-setup compared with skills from other repositories

oauth-setup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
oauth-setupspinabot/brigadeSkill11k2d agoMITA66Claude Code, Codex
telephonyNousResearch/hermes-agentSkill261kyesterdayMITA17Claude Code, Codex
agent-quorum-managerruvnet/rufloSkill81kyesterdayMITA18Claude Code
har-derived-api-clientNousResearch/hermes-agentSkill261kyesterdayMITA19Claude Code, Codex
agent-crdt-synchronizerruvnet/rufloSkill81kyesterdayMITA25Claude Code
fastmcpNousResearch/hermes-agentSkill261kyesterdayMITA14Claude Code, Codex
stripe-projectsNousResearch/hermes-agentSkill261kyesterdayMITA15Claude Code, Codex