oauth-setup
Connect an OAuth 2.0 service (Gmail, Google APIs, etc.) using the built-in oauth_authorize tool — get a click-to-authorize link, auto-capture the code, and…
Skill by spinabot
Chalk Labs
Need help deploying oauth-setup?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/spinabot-oauth-setup
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/oauth-setup
What's inside
- Skill name
oauth-setup- Description
- Connect an OAuth 2.0 service (Gmail, Google APIs, etc.) using the built-in oauth_authorize tool — get a click-to-authorize link, auto-capture the code, and seal the tokens. Use whenever the operator asks to connect Gmail / a Google API / any OAuth account.
- License
- MIT
- Instructions
- 45 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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.
## Using a connected account (sending mail)
The tokens are sealed in the credential store — you can't read them from a file or the DB, and you shouldn't try. To use a connected account:
1. **Check what's connected:** `oauth_authorize({ action: "status" })` → lists each account (provider, email, scopes, expiry). No secrets.
2. **Get a usable token:** `oauth_authorize({ action: "token", provider: "google-gmail" })` → returns `accessToken`. It auto-refreshes from the sealed refresh token when the old one expired, so you always get a live token. (Pass `provider` only if more than one account is connected.)
3. **Call the API** with it. Gmail send:
`POST https://gmail.googleapis.com/gmail/v1/users/me/messages/send`, header `Authorization: Bearer <accessToken>`, body `{ "raw": "<base64url RFC-822 message>" }`.
Never `cat` the credential store, grep for the token, or hand-roll a refresh — `action:"token"` is the only retrieval path, and it keeps the refresh token + client secret sealed.From spinabot/brigade, MIT.
More from spinabot/brigade
- 0.788score
skill-creator
spinabot
Create, edit, improve, or audit AgentSkills.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
hyperframes
spinabot
Author HTML compositions that the `render_video` tool turns into deterministic MP4 video — animated charts and dashboards, data explainers, text/quote cards…
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
pdf
spinabot
Create and edit PDFs to a professional standard — generate from content, draw vector/precise layouts, embed custom (incl.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
share-skills
spinabot
Use when you need to author, package, or share a skill folder — understanding the SKILL.md format, where skills live, and how to bundle a folder so it can be…
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
slack
spinabot
Use when you need to control Slack from Brigade via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
github
spinabot
GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
lead-scout
spinabot
How to find and VERIFY business leads (any niche, any city) — especially "businesses without a website" prospecting.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
healthcheck
spinabot
Host security hardening and risk-tolerance configuration for Brigade deployments.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
node-connect
spinabot
Diagnose Brigade node connection and pairing failures for Android, iOS, and macOS companion apps.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
docx
spinabot
Create and edit Microsoft Word (.docx) documents to a professional standard — reports, proposals, contracts, letters, memos — with custom styles, multi-level…
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
taskflow
spinabot
Use when work should span one or more detached tasks but still behave like one job with a single owner context.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
taskflow-inbox-triage
spinabot
Example TaskFlow authoring pattern for inbox triage.
SkillBFreshness: B★ 11.4KClaude Code +9
Signals
- Stars
- 11,356
- Forks
- 77
- Open issues
- 1
- Last commit (this folder)
- Jun 13, 2026 (4 months ago)
- Last release
- Sep 15, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/spinabot/brigade
- Website
- www.brigade.spinabot.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from spinabot
- 0.788score
skill-creator
spinabot
Create, edit, improve, or audit AgentSkills.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
github
spinabot
GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
pdf
spinabot
Create and edit PDFs to a professional standard — generate from content, draw vector/precise layouts, embed custom (incl.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
docx
spinabot
Create and edit Microsoft Word (.docx) documents to a professional standard — reports, proposals, contracts, letters, memos — with custom styles, multi-level…
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
slack
spinabot
Use when you need to control Slack from Brigade via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
SkillBFreshness: B★ 11.4KClaude Code +9 - 0.786score
healthcheck
spinabot
Host security hardening and risk-tolerance configuration for Brigade deployments.
SkillBFreshness: B★ 11.4KClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get oauth-setup running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
oauth-setup skill. Agent Mart. https://agentmart.dev/skills/spinabot-oauth-setup (last updated 2026-10-24)