Agent skill

Add Gmail

by sbusso in sbusso/claudeclaw

Add Gmail integration to ClaudeClaw. An agent skill from sbusso/claudeclaw.

MITAuto-check passedProductivity & Automation

Install Add Gmail

skills CLI
$ npx skills add sbusso/claudeclaw --skill add-gmail -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sbusso/claudeclaw add-gmail --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sbusso/claudeclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/add-gmail .claude/skills/add-gmail && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-gmail
GitHub stars
194
Token cost
~1.9k tokens
SKILL.md length
776 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Add Gmail integration to ClaudeClaw. An agent skill from sbusso/claudeclaw.

  • Works in 4 steps: Pre-flight → Apply Code Changes → Setup → …
  • Receive replies)
  • SKILL.md covers Phase 1: Pre-flight, Phase 2: Apply Code Changes, Phase 3: Setup and Phase 4: Verify, plus 2 more sections
  • Calls git, npm and npx; reaches github.com

What it does

Add Gmail is an agent skill from sbusso/claudeclaw. Add Gmail integration to ClaudeClaw. Can be configured as a tool (agent reads/sends emails when triggered from WhatsApp) or as a full channel (emails can trigger the agent, schedule tasks, and receive replies). Guides through GCP OAuth setup and implements the integration.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering Email management and OAuth and OpenID Connect. It works with Gmail, Google Cloud, WhatsApp and Model Context Protocol. The repository describes itself as: Use Claude to orchestrate agents like OpenClaw. The licence is MIT.

When your agent uses it

  • Receive replies)
  • Tasks that involve Email management
  • Tasks that involve OAuth and OpenID Connect

Example prompts

  • “/add-gmail”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Pre-flight
  2. Apply Code Changes
  3. Setup
  4. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 1395af4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • npm
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    Also links to:

    • console.cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Gmail loads about 1.9k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 776 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sbusso/claudeclaw at commit 1395af4, republished under its MIT licence (© sbusso). 776 words, ~1,919 tokens.

Download SKILL.mdSave it as .claude/skills/add-gmail/SKILL.md (or your agent's skills folder).
name
add-gmail
description
Add Gmail integration to ClaudeClaw. Can be configured as a tool (agent reads/sends emails when triggered from WhatsApp) or as a full channel (emails can trigger the agent, schedule tasks, and receive replies). Guides through GCP OAuth setup and implements the integration.

Add Gmail Integration

This skill adds Gmail support to ClaudeClaw — either as a tool (read, send, search, draft) or as a full channel that polls the inbox.

Phase 1: Pre-flight

Check if already applied

Check if src/channels/gmail.ts exists. If it does, skip to Phase 3 (Setup). The code changes are already in place.

Ask the user

Use AskUserQuestion:

AskUserQuestion: Should incoming emails be able to trigger the agent?

  • Yes — Full channel mode: the agent listens on Gmail and responds to incoming emails automatically
  • No — Tool-only: the agent gets full Gmail tools (read, send, search, draft) but won't monitor the inbox. No channel code is added.

Phase 2: Apply Code Changes

Ensure channel remote
bash
git remote -v

If gmail is missing, add it:

bash
git remote add gmail https://github.com/qwibitai/claudeclaw-gmail.git
Merge the skill branch
bash
git fetch gmail main
git merge gmail/main || {
  git checkout --theirs package-lock.json
  git add package-lock.json
  git merge --continue
}

This merges in:

  • src/channels/gmail.ts (GmailChannel class with self-registration via registerChannel)
  • src/channels/gmail.test.ts (unit tests)
  • import './gmail.js' appended to the channel barrel file src/channels/index.ts
  • Gmail credentials mount (~/.gmail-mcp) in src/orchestrator/container-runner.ts
  • Gmail MCP server (@gongrzhe/server-gmail-autoauth-mcp) and mcp__gmail__* allowed tool in agent/runner/src/index.ts
  • googleapis npm dependency in package.json

If the merge reports conflicts, resolve them by reading the conflicted files and understanding the intent of both sides.

Add email handling instructions (Channel mode only)

If the user chose channel mode, append the following to groups/main/CLAUDE.md (before the formatting section):

markdown
## Email Notifications

When you receive an email notification (messages starting with `[Email from ...`), inform the user about it but do NOT reply to the email unless specifically asked. You have Gmail tools available — use them only when the user explicitly asks you to reply, forward, or take action on an email.
Validate code changes
bash
npm install
npm run build
npx vitest run src/channels/gmail.test.ts

All tests must pass (including the new Gmail tests) and build must be clean before proceeding.

Phase 3: Setup

Check existing Gmail credentials
bash
ls -la ~/.gmail-mcp/ 2>/dev/null || echo "No Gmail config found"

If credentials.json already exists, skip to "Build and restart" below.

GCP Project Setup

Tell the user:

I need you to set up Google Cloud OAuth credentials:

  1. Open https://console.cloud.google.com — create a new project or select existing
  2. Go to APIs & Services > Library, search "Gmail API", click Enable
  3. Go to APIs & Services > Credentials, click + CREATE CREDENTIALS > OAuth client ID
    • If prompted for consent screen: choose "External", fill in app name and email, save
    • Application type: Desktop app, name: anything (e.g., "ClaudeClaw Gmail")
  4. Click DOWNLOAD JSON and save as gcp-oauth.keys.json

Where did you save the file? (Give me the full path, or paste the file contents here)

If user provides a path, copy it:

bash
mkdir -p ~/.gmail-mcp
cp "/path/user/provided/gcp-oauth.keys.json" ~/.gmail-mcp/gcp-oauth.keys.json

If user pastes JSON content, write it to ~/.gmail-mcp/gcp-oauth.keys.json.

OAuth Authorization

Tell the user:

I'm going to run Gmail authorization. A browser window will open — sign in and grant access. If you see an "app isn't verified" warning, click "Advanced" then "Go to [app name] (unsafe)" — this is normal for personal OAuth apps.

Run the authorization:

bash
npx -y @gongrzhe/server-gmail-autoauth-mcp auth

If that fails (some versions don't have an auth subcommand), try timeout 60 npx -y @gongrzhe/server-gmail-autoauth-mcp || true. Verify with ls ~/.gmail-mcp/credentials.json.

Build and restart

Clear stale per-group agent-runner copies (they only get re-created if missing, so existing copies won't pick up the new Gmail server):

bash
rm -r data/sessions/*/agent-runner-src 2>/dev/null || true

Rebuild the container (agent-runner changed):

bash
cd container && ./build.sh

Service name: Derived from the directory name: com.claudeclaw.<dirname> (macOS) / claudeclaw-<dirname> (Linux). For example, if cwd is my-assistant, the service is com.claudeclaw.my-assistant. Determine the correct service name before running service commands below.

Then compile and restart:

bash
npm run build
launchctl kickstart -k gui/$(id -u)/com.claudeclaw  # macOS
# Linux: systemctl --user restart claudeclaw
Show full SKILL.md (288 more words)Show less

Phase 4: Verify

Test tool access (both modes)

Tell the user:

Gmail is connected! Send this in your main channel:

@Andy check my recent emails or @Andy list my Gmail labels

Test channel mode (Channel mode only)

Tell the user to send themselves a test email. The agent should pick it up within a minute. Monitor: tail -f logs/claudeclaw.log | grep -iE "(gmail|email)".

Once verified, offer filter customization via AskUserQuestion — by default, only emails in the Primary inbox trigger the agent (Promotions, Social, Updates, and Forums are excluded). The user can keep this default or narrow further by sender, label, or keywords. No code changes needed for filters.

Check logs if needed
bash
tail -f logs/claudeclaw.log

Troubleshooting

Gmail connection not responding

Test directly:

bash
npx -y @gongrzhe/server-gmail-autoauth-mcp
OAuth token expired

Re-authorize:

bash
rm ~/.gmail-mcp/credentials.json
npx -y @gongrzhe/server-gmail-autoauth-mcp
Container can't access Gmail
  • Verify ~/.gmail-mcp is mounted: check src/orchestrator/container-runner.ts for the .gmail-mcp mount
  • Check container logs: cat groups/main/logs/container-*.log | tail -50
Emails not being detected (Channel mode only)
  • By default, the channel polls unread Primary inbox emails (is:unread category:primary)
  • Check logs for Gmail polling errors

Removal

Tool-only mode
  1. Remove ~/.gmail-mcp mount from src/orchestrator/container-runner.ts
  2. Remove gmail MCP server and mcp__gmail__* from agent/runner/src/index.ts
  3. Rebuild and restart
  4. Clear stale agent-runner copies: rm -r data/sessions/*/agent-runner-src 2>/dev/null || true
  5. Rebuild: cd container && ./build.sh && cd .. && npm run build && launchctl kickstart -k gui/$(id -u)/com.claudeclaw (macOS) or systemctl --user restart claudeclaw (Linux)
Channel mode
  1. Delete src/channels/gmail.ts and src/channels/gmail.test.ts
  2. Remove import './gmail.js' from src/channels/index.ts
  3. Remove ~/.gmail-mcp mount from src/orchestrator/container-runner.ts
  4. Remove gmail MCP server and mcp__gmail__* from agent/runner/src/index.ts
  5. Uninstall: npm uninstall googleapis
  6. Rebuild and restart
  7. Clear stale agent-runner copies: rm -r data/sessions/*/agent-runner-src 2>/dev/null || true
  8. Rebuild: cd container && ./build.sh && cd .. && npm run build && launchctl kickstart -k gui/$(id -u)/com.claudeclaw (macOS) or systemctl --user restart claudeclaw (Linux)

© sbusso, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/add-gmail of sbusso/claudeclaw.

Open the folder on GitHubat commit 1395af4

Compare with similar skills

Add Gmail next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Gmail compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Gmail this skillsbusso/claudeclaw194—~1.9kAutomated safety check: PassMIT
GCP Workspace Pivotwgpsec/AboutSecurity1.8k—~2.9kAutomated safety check: PassNone
Google Workspaceericrisco/rsc-harness156—~3.2kAutomated safety check: PassMIT
Ops Inboxdavepoon/buildwithclaude3.6k—~7.2kAutomated safety check: NotesMIT
Google Workspacetaracodlabs/aiden849—~1.1kAutomated safety check: PassApache-2.0
Bootstrap Google Toolsgoogle/adk-recipes10k—~5kAutomated safety check: WarnApache-2.0

Similar skills

  • GCP Workspace Pivot

    wgpsec/AboutSecurity

    GCP 到 Google Workspace 的穿越攻击方法论。当已获取 GCP Service Account 或 Project 权限并发现目标组织使用 Google Workspace、需要从云平台穿越到企业邮件/文档/管理控制台、或发现 Domain-Wide Delegation 配置时使用。覆盖 Domain-Wide Delegation 滥用、OAuth…

    1.8k GitHub stars~2.9k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Google Workspace

    ericrisco/rsc-harness

    A skill your agent uses when server-side code reads or writes Gmail, Drive, Calendar, or Sheets with a GCP service account and no human in the OAuth loop: picking the auth mode (app-owned vs…

    156 GitHub stars~3.2k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Ops Inbox

    davepoon/buildwithclaude

    Full inbox management across all channels — WhatsApp (wacli), Email (Gmail MCP), Slack (MCP), Telegram (user-auth MCP), Discord (webhook + REST read), Notion (MCP — comments, mentions, assigned…

    3.6k GitHub stars~7.2k tokensUpdated yesterday
    Productivity & AutomationAuto-check: notes
  • Google Workspace

    taracodlabs/aiden

    Gmail, Calendar, Drive, Sheets, Docs via Google API (SA / OAuth)

    849 GitHub stars~1.1k tokensUpdated 24 days ago
    Documents & OfficeAuto-check passed
  • Bootstrap Google Tools

    google/adk-recipes

    Official

    Install/auth CLIs the sandbox lacks - gws (Drive, Gmail, Sheets, Calendar), gcloud, agents-cli, mcp-cli (MCP servers).

    10k GitHub stars~5k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check: warnings
  • Openloomi Connectors

    melandlabs/openloomi

    openloomi Connectors tools - manage the native 7 messaging integrations and pair with the composio skill for the 1000+ apps OAuth layer (Slack, Discord, X, Gmail, Outlook, Google…

    1k GitHub stars~3.3k tokensUpdated 14 days ago
    Productivity & AutomationAuto-check passed

More from sbusso/claudeclaw

All 23 skills in this repo
  • Debug

    sbusso/claudeclaw

    Debug container agent issues. An agent skill from sbusso/claudeclaw.

    194 GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check: notes
  • X Integration

    sbusso/claudeclaw

    X (Twitter) integration for ClaudeClaw. An agent skill from sbusso/claudeclaw.

    194 GitHub stars~3k tokensUpdated 1 mo ago
    Auto-check: notes
  • Add Qmd

    sbusso/claudeclaw

    Add QMD (Query Markup Documents) as an advanced memory search backend.

    194 GitHub stars~629 tokensUpdated 1 mo ago
    Auto-check passed
  • Add Telegram

    sbusso/claudeclaw

    Add Telegram as a channel. An agent skill from sbusso/claudeclaw.

    194 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check: notes
  • Add Telegram Swarm

    sbusso/claudeclaw

    Add Agent Swarm (Teams) support to Telegram. An agent skill from sbusso/claudeclaw.

    194 GitHub stars~3.7k tokensUpdated 1 mo ago
    Auto-check: notes
  • Switch from Docker to Apple Container for macOS-native container isolation.

    194 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check: notes

Questions about Add Gmail

What does Add Gmail do?

Add Gmail integration to ClaudeClaw. An agent skill from sbusso/claudeclaw. Add Gmail is an agent skill from sbusso/claudeclaw. Add Gmail integration to ClaudeClaw.

When should I use Add Gmail?

Add Gmail fits situations like: receive replies); tasks that involve Email management; tasks that involve OAuth and OpenID Connect.

How do I install Add Gmail in Claude Code?

Run `npx skills add sbusso/claudeclaw --skill add-gmail -a claude-code`. Or copy the skill folder (skills/add-gmail in sbusso/claudeclaw) into .claude/skills/add-gmail in your project. Claude Code loads it when a task matches its description.

How do I install Add Gmail in Codex?

Run `npx skills add sbusso/claudeclaw --skill add-gmail -a codex`. Or copy the skill folder (skills/add-gmail in sbusso/claudeclaw) into .agents/skills/add-gmail in your project. Codex loads it when a task matches its description.

Can I use Add Gmail in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sbusso/claudeclaw --skill add-gmail -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-gmail, .gemini/skills/add-gmail, .github/skills/add-gmail and .opencode/skills/add-gmail in your project.

What does Add Gmail need to run?

Going by SKILL.md and its folder, Add Gmail needs the command-line tools its instructions call (git, npm and npx). Our summary lists: Node.js.

Does Add Gmail access the network?

SKILL.md names 2 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: console.cloud.google.com. This is read from the text; nothing was executed.

Is Add Gmail safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Gmail use?

Add Gmail is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Gmail use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Gmail?

Skills that share tags, products or a category with Add Gmail: GCP Workspace Pivot (wgpsec/AboutSecurity, 1.8k stars), Google Workspace (ericrisco/rsc-harness, 156 stars), Ops Inbox (davepoon/buildwithclaude, 3.6k stars) and Google Workspace (taracodlabs/aiden, 849 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Gmail?

sbusso (a GitHub user) maintains it in sbusso/claudeclaw, which has 194 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on August 12, 2026.

Source: sbusso/claudeclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.