Skip to content

OAuth account connection

Connect Gmail or Google APIs via a click-to-authorize link and use the sealed tokens safely

Stars
11,367
Licence
MIT
Files
1 file

What it does

This skill teaches an AI agent how to link an external account, such as Gmail or another OAuth 2.0 service, to the agent. The agent gives you a link to click, you approve access on the provider's site, and the agent stores the resulting tokens in an encrypted credential store rather than in a plain file. Afterwards the agent can call the connected service, for example to send email, without you pasting passwords into the chat.

Great for

  • Developers building agents that need to send email or call Google APIs on a user's behalf
  • Operators setting up Brigade-style agents with a Gmail account
  • Teams who want tokens kept sealed rather than in config files

Skip it if

  • Users who do not want an agent holding access to their email, since approving access grants it ongoing ability to act on the account
  • Setups where the Google Cloud project or client secret is shared with untrusted people, because the client credentials are passed through the chat
  • Non-OAuth services with API keys only, since this skill covers the OAuth 2.0 flow specifically

Try asking

  • “Connect my Gmail account so you can send emails for me”
  • “Set up a Google API OAuth connection using my Desktop-app client ID and secret”
  • “Check which OAuth accounts are currently connected and when they expire”
  • “Send the authorization link for my Google account and wait until I approve it”
Step-by-step guide: how to use OAuth account connectionInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    oauth-setup.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip oauth-setup.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip oauth-setup.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Create a Desktop-app OAuth client rather than a Web client, otherwise you will hit redirect_uri_mismatch errors
  • Use the full scope URL such as https://www.googleapis.com/auth/gmail.send and avoid guessed scope names
  • Only grant the scopes you need, and review connected accounts with the status action periodically

What's inside

  • SKILL.md

Redistributed unmodified from spinabot/brigade under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.