Agent skill

Gmail Automation

by davepoon in davepoon/buildwithclaude

Automate Gmail tasks via Rube MCP (Composio): send/reply, search, labels, drafts, attachments.

MITAuto-check passedProductivity & Automation

Install Gmail Automation

skills CLI
$ npx skills add davepoon/buildwithclaude --skill gmail-automation -a claude-code

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

GitHub CLI
$ gh skill install davepoon/buildwithclaude gmail-automation --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/davepoon/buildwithclaude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/all-skills/skills/gmail-automation .claude/skills/gmail-automation && 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
gmail-automation
GitHub stars
3.6k
Used in
4 other repos
Token cost
~2.7k tokens
SKILL.md length
1,224 words
Files
1
Skills in repo
245
Repo updated
First seen
Licence
MIT

At a glance

Automate Gmail tasks via Rube MCP (Composio): send/reply, search, labels, drafts, attachments.

  • Works in 6 steps: Send an Email → Reply to a Thread → Search and Filter Emails → …
  • Tasks that involve Email management
  • SKILL.md covers Prerequisites, Setup, Core Workflows and Common Patterns, plus 2 more sections
  • Reaches rube.app

What it does

Gmail Automation is an agent skill from davepoon/buildwithclaude. Automate Gmail tasks via Rube MCP (Composio): send/reply, search, labels, drafts, attachments. Always search tools first for current schemas.

Its SKILL.md is about 2.7k 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 App automation through connectors. It works with Gmail and Composio. The repository describes itself as: A single hub to find Claude Skills, Agents, Commands, Hooks, Plugins, and Marketplace collections to extend Claude Code, Claude Desktop, Agent SDK and OpenClaw. The licence is MIT.

When your agent uses it

  • Tasks that involve Email management
  • Tasks that involve App automation through connectors

Example prompts

  • “/gmail-automation”

Workflow steps

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

  1. Send an Email
  2. Reply to a Thread
  3. Search and Filter Emails
  4. Manage Labels
  5. Apply/Remove Labels on Messages
  6. Handle Drafts and Attachments

What it can do on your machine

Read from SKILL.md and the folder at commit 10bfc43. 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

    No scripts in the folder and no shell commands in SKILL.md.

    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:

    • rube.app

    Also links to:

    • composio.dev

    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

Gmail Automation loads about 2.7k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 1,224 words of instructions outside code blocks.

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

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 davepoon/buildwithclaude at commit 10bfc43, republished under its MIT licence (© davepoon). 1,224 words, ~2,655 tokens.

Download SKILL.mdSave it as .claude/skills/gmail-automation/SKILL.md (or your agent's skills folder).
name
gmail-automation
description
Automate Gmail tasks via Rube MCP (Composio): send/reply, search, labels, drafts, attachments. Always search tools first for current schemas.
requires.mcp
rube
category
email

Gmail Automation via Rube MCP

Automate Gmail operations through Composio's Gmail toolkit via Rube MCP.

Toolkit docs: composio.dev/toolkits/gmail

Prerequisites

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active Gmail connection via RUBE_MANAGE_CONNECTIONS with toolkit gmail
  • Always call RUBE_SEARCH_TOOLS first to get current tool schemas

Setup

Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.

  1. Verify Rube MCP is available by confirming RUBE_SEARCH_TOOLS responds
  2. Call RUBE_MANAGE_CONNECTIONS with toolkit gmail
  3. If connection is not ACTIVE, follow the returned auth link to complete Google OAuth
  4. Confirm connection status shows ACTIVE before running any workflows

Core Workflows

1. Send an Email

When to use: User wants to compose and send a new email

Tool sequence:

  1. GMAIL_SEARCH_PEOPLE - Resolve contact name to email address [Optional]
  2. GMAIL_SEND_EMAIL - Send the email [Required]

Key parameters:

  • recipient_email: Email address or 'me' for self
  • subject: Email subject line
  • body: Email content (plain text or HTML)
  • is_html: Must be true if body contains HTML markup
  • cc/bcc: Arrays of email addresses
  • attachment: Object with {s3key, mimetype, name} from prior download

Pitfalls:

  • At least one of recipient_email, cc, or bcc required
  • At least one of subject or body required
  • Attachment mimetype MUST contain '/' (e.g., 'application/pdf', not 'pdf')
  • Total message size limit ~25MB after base64 encoding
  • Use from_email only for verified aliases in Gmail 'Send mail as' settings
2. Reply to a Thread

When to use: User wants to reply to an existing email conversation

Tool sequence:

  1. GMAIL_FETCH_EMAILS - Find the email/thread to reply to [Prerequisite]
  2. GMAIL_REPLY_TO_THREAD - Send reply within the thread [Required]

Key parameters:

  • thread_id: Hex string from FETCH_EMAILS (e.g., '169eefc8138e68ca')
  • message_body: Reply content
  • recipient_email: Reply recipient
  • is_html: Set true for HTML content

Pitfalls:

  • thread_id must be hex string; prefixes like 'msg-f:' are auto-stripped
  • Legacy Gmail web UI IDs (e.g., 'FMfcgz...') are NOT supported
  • Subject is inherited from original thread; setting it creates a new thread instead
  • Do NOT include subject parameter to stay within thread
3. Search and Filter Emails

When to use: User wants to find specific emails by sender, subject, date, label, etc.

Tool sequence:

  1. GMAIL_FETCH_EMAILS - Search with Gmail query syntax [Required]
  2. GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID - Get full message details for selected results [Optional]

Key parameters:

  • query: Gmail search syntax (from:, to:, subject:, is:unread, has:attachment, after:YYYY/MM/DD, before:YYYY/MM/DD)
  • max_results: 1-500 messages per page
  • label_ids: System IDs like 'INBOX', 'UNREAD'
  • include_payload: Set true to get full message content
  • ids_only: Set true for just message IDs
  • page_token: For pagination (from nextPageToken)

Pitfalls:

  • Returns max ~500 per page; follow nextPageToken via page_token until absent
  • resultSizeEstimate is approximate, not exact count
  • Use 'is:' for states (is:unread, is:snoozed, is:starred)
  • Use 'label:' ONLY for user-created labels
  • Common mistake: 'label:snoozed' is WRONG — use 'is:snoozed'
  • include_payload=true on broad searches creates huge responses; default to metadata
  • Custom labels require label ID (e.g., 'Label_123'), NOT label name
4. Manage Labels

When to use: User wants to create, modify, or organize labels

Tool sequence:

  1. GMAIL_LIST_LABELS - List all labels to find IDs and detect conflicts [Required]
  2. GMAIL_CREATE_LABEL - Create a new label [Optional]
  3. GMAIL_PATCH_LABEL - Rename or change label colors/visibility [Optional]
  4. GMAIL_DELETE_LABEL - Delete a user-created label (irreversible) [Optional]

Key parameters:

  • label_name: Max 225 chars, no commas, '/' for nesting (e.g., 'Work/Projects')
  • background_color/text_color: Hex values from Gmail's predefined palette
  • id: Label ID for PATCH/DELETE operations

Pitfalls:

  • 400/409 error if name is blank, duplicate, or reserved (INBOX, SPAM, CATEGORY_*)
  • Color specs must use Gmail's predefined palette of 102 hex values
  • DELETE is permanent and removes label from all messages
  • Cannot delete system labels (INBOX, SENT, DRAFT, etc.)
5. Apply/Remove Labels on Messages

When to use: User wants to label, archive, or mark emails as read/unread

Tool sequence:

  1. GMAIL_LIST_LABELS - Get label IDs for custom labels [Prerequisite]
  2. GMAIL_FETCH_EMAILS - Find target messages [Prerequisite]
  3. GMAIL_BATCH_MODIFY_MESSAGES - Bulk add/remove labels (up to 1000 messages) [Required]
  4. GMAIL_ADD_LABEL_TO_EMAIL - Single-message label changes [Fallback]

Key parameters:

  • messageIds: Array of message IDs (max 1000)
  • addLabelIds: Array of label IDs to add
  • removeLabelIds: Array of label IDs to remove
  • message_id: 15-16 char hex string for single operations

Pitfalls:

  • Max 1000 messageIds per BATCH call; chunk larger sets
  • Use 'CATEGORY_UPDATES' not 'UPDATES'; full prefix required for category labels
  • SENT, DRAFT, CHAT are immutable — cannot be added/removed
  • To mark as read: REMOVE 'UNREAD'. To archive: REMOVE 'INBOX'
  • message_id must be 15-16 char hex, NOT UUIDs or web UI IDs
Show full SKILL.md (500 more words)Show less
6. Handle Drafts and Attachments

When to use: User wants to create, edit, or send email drafts, possibly with attachments

Tool sequence:

  1. GMAIL_CREATE_EMAIL_DRAFT - Create a new draft [Required]
  2. GMAIL_UPDATE_DRAFT - Edit draft content [Optional]
  3. GMAIL_LIST_DRAFTS - List existing drafts [Optional]
  4. GMAIL_SEND_DRAFT - Send a draft (requires explicit user approval) [Optional]
  5. GMAIL_GET_ATTACHMENT - Download attachment from existing message [Optional]

Key parameters:

  • recipient_email: Draft recipient
  • subject: Draft subject (omit for reply drafts to stay in thread)
  • body: Draft content
  • is_html: Set true for HTML content
  • attachment: Object with {s3key, mimetype, name}
  • thread_id: For reply drafts (leave subject empty to stay in thread)

Pitfalls:

  • Response includes data.id (draft_id) AND data.message.id; use data.id for draft operations
  • Setting subject on a thread reply draft creates a NEW thread instead
  • Attachment capped at ~25MB; base64 overhead can push near-limit files over
  • UPDATE_DRAFT replaces entire content, not patches; include all fields you want to keep
  • HTTP 429 on bulk draft creation; use exponential backoff

Common Patterns

ID Resolution

Label name → Label ID:

1. Call GMAIL_LIST_LABELS
2. Find label by name in response
3. Extract id field (e.g., 'Label_123')

Contact name → Email:

1. Call GMAIL_SEARCH_PEOPLE with query=contact_name
2. Extract emailAddresses from response

Thread ID from search:

1. Call GMAIL_FETCH_EMAILS or GMAIL_LIST_THREADS
2. Extract threadId (15-16 char hex string)
Pagination
  • Set max_results up to 500 per page
  • Check response for nextPageToken
  • Pass token as page_token in next request
  • Continue until nextPageToken is absent or empty string
  • resultSizeEstimate is approximate, not exact
Gmail Query Syntax

Operators:

  • from:sender@example.com - Emails from sender
  • to:recipient@example.com - Emails to recipient
  • subject:"exact phrase" - Subject contains exact phrase
  • is:unread - Unread messages
  • is:starred - Starred messages
  • is:snoozed - Snoozed messages
  • has:attachment - Has attachments
  • after:2024/01/01 - After date (YYYY/MM/DD)
  • before:2024/12/31 - Before date
  • label:custom_label - User-created label (use label ID)
  • in:sent - In sent folder
  • category:primary - Primary category

Combinators:

  • AND - Both conditions (default)
  • OR - Either condition
  • NOT - Exclude condition
  • () - Group conditions

Examples:

  • from:boss@company.com is:unread - Unread emails from boss
  • subject:invoice has:attachment after:2024/01/01 - Invoices with attachments this year
  • (from:alice OR from:bob) is:starred - Starred emails from Alice or Bob

Known Pitfalls

ID Formats:

  • Custom label operations require label IDs (e.g., 'Label_123'), not display names
  • Always call LIST_LABELS first to resolve names to IDs
  • Message IDs are 15-16 char hex strings
  • Do NOT use UUIDs, web UI IDs, or 'thread-f:' prefixes

Query Syntax:

  • Use 'is:' for states (unread, snoozed, starred)
  • Use 'label:' ONLY for user-created labels
  • System labels use 'is:' or 'in:' (e.g., 'is:sent', 'in:inbox')

Rate Limits:

  • BATCH_MODIFY_MESSAGES max 1000 messages per call
  • Heavy use triggers 403/429 rate limits
  • Implement exponential backoff for bulk operations

Response Parsing:

  • Response data may be nested under data_preview or data.messages
  • Parse defensively with fallbacks
  • Timestamp messageTimestamp uses RFC3339 with 'Z' suffix
  • Normalize to '+00:00' for parsing if needed

Attachments:

  • Attachment s3key from prior download may expire
  • Use promptly after retrieval
  • Mimetype must include '/' separator

Quick Reference

TaskTool SlugKey Params
Send emailGMAIL_SEND_EMAILrecipient_email, subject, body, is_html
Reply to threadGMAIL_REPLY_TO_THREADthread_id, message_body, recipient_email
Search emailsGMAIL_FETCH_EMAILSquery, max_results, label_ids, page_token
Get message detailsGMAIL_FETCH_MESSAGE_BY_MESSAGE_IDmessage_id
List labelsGMAIL_LIST_LABELS(none)
Create labelGMAIL_CREATE_LABELlabel_name, background_color, text_color
Modify labels bulkGMAIL_BATCH_MODIFY_MESSAGESmessageIds, addLabelIds, removeLabelIds
Create draftGMAIL_CREATE_EMAIL_DRAFTrecipient_email, subject, body, thread_id
Send draftGMAIL_SEND_DRAFTdraft_id
Get attachmentGMAIL_GET_ATTACHMENTmessage_id, attachment_id
Search contactsGMAIL_SEARCH_PEOPLEquery
Get profileGMAIL_GET_PROFILE(none)

Powered by Composio

© davepoon, 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 plugins/all-skills/skills/gmail-automation of davepoon/buildwithclaude.

Open the folder on GitHubat commit 10bfc43

Used in 4 other repositories

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in davepoon/buildwithclaude, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Gmail Automation 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.

Gmail Automation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gmail Automation this skilldavepoon/buildwithclaude3.6k4 repos~2.7kAutomated safety check: PassMIT
Connect Apps with ComposioComposioHQ/awesome-claude-skills77k3 repos~557Automated safety check: PassNone
Composio Cloud Toolsquarqlabs/argus277—~543Automated safety check: PassApache-2.0
Openloomi Connectorsmelandlabs/openloomi1k—~3.3kAutomated safety check: PassApache-2.0
Applescript Mails-morgan-jeffries/apple-mail-fast-mcp104—~2.5kAutomated safety check: PassMIT
Composio CLIrome-os/rome725—~2.7kAutomated safety check: PassMIT

Similar skills

  • Connect Apps with Composio

    ComposioHQ/awesome-claude-skills

    Connects an agent to 1000+ external apps through the Composio Tool Router plugin, so it can actually send emails, create issues and post messages instead of only drafting them.

    77k GitHub starsUsed in 3 repos~557 tokens
    Productivity & AutomationAuto-check passed
  • Composio Cloud Tools

    quarqlabs/argus

    Routes requests to external SaaS apps such as GitHub, Gmail, Google Calendar, Slack, Notion and Linear through cloud tools, with safeguards on irreversible actions.

    277 GitHub stars~543 tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check passed
  • 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
  • Applescript Mail

    s-morgan-jeffries/apple-mail-fast-mcp

    A skill your agent uses when writing, modifying, or debugging ANY AppleScript that interacts with Apple Mail.

    104 GitHub stars~2.5k tokensUpdated 29 days ago
    Productivity & AutomationAuto-check passed
  • Composio CLI

    rome-os/rome

    Help users operate the published Composio CLI to find the right tool, connect accounts, inspect schemas, execute tools, subscribe to trigger events with composio listen, script workflows with…

    725 GitHub stars~2.7k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Benchmark Email Automation

    ComposioHQ/awesome-claude-skills

    Automate Benchmark Email tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~760 tokens
    Productivity & AutomationAuto-check passed

More from davepoon/buildwithclaude

All 245 skills in this repo
  • Qwen Vision

    davepoon/buildwithclaude

    A skill your agent uses when the user asks to "analyze video", "watch this video", "what happens in this video", "describe this clip", "review this footage", "classify these videos", "compare…

    3.6k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Hard Predict Future

    davepoon/buildwithclaude

    Activate this agent for any future-oriented question that requires deep quantitative analysis, historical precedents, and structured scenario planning.

    3.6k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • iOS Hig Design Guide

    davepoon/buildwithclaude

    Build, update, and apply iOS design specifications using Apple Human Interface Guidelines (HIG) source data.

    3.6k GitHub stars~735 tokensUpdated 2 days ago
    Auto-check passed
  • Video Downloader

    davepoon/buildwithclaude

    Download YouTube videos with customizable quality and format options.

    3.6k GitHub starsUsed in 1 repo~871 tokens
    Auto-check passed
  • Atlas Cloud Media

    davepoon/buildwithclaude

    Discover Atlas Cloud image and video models, inspect their live schemas, and submit one confirmed media generation request with bounded GET polling.

    3.6k GitHub stars~852 tokensUpdated 2 days ago
    Auto-check passed
  • Slack Gif Creator

    davepoon/buildwithclaude

    Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives.

    3.6k GitHub starsUsed in 12 repos~4.3k tokens
    Auto-check passed

Works with

Questions about Gmail Automation

What does Gmail Automation do?

Automate Gmail tasks via Rube MCP (Composio): send/reply, search, labels, drafts, attachments. Gmail Automation is an agent skill from davepoon/buildwithclaude. Automate Gmail tasks via Rube MCP (Composio): send/reply, search, labels, drafts, attachments.

When should I use Gmail Automation?

Gmail Automation fits situations like: tasks that involve Email management; tasks that involve App automation through connectors.

How do I install Gmail Automation in Claude Code?

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

How do I install Gmail Automation in Codex?

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

Can I use Gmail Automation 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 davepoon/buildwithclaude --skill gmail-automation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gmail-automation, .gemini/skills/gmail-automation, .github/skills/gmail-automation and .opencode/skills/gmail-automation in your project.

What does Gmail Automation need to run?

SKILL.md names no scripts, command-line tools or credentials: Gmail Automation is instructions for the agent only.

Does Gmail Automation access the network?

SKILL.md names 2 domains. In commands or code: rube.app; the agent is likely to contact it when it follows the instructions. As links in the text: composio.dev. This is read from the text; nothing was executed.

Is Gmail Automation 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 Gmail Automation use?

Gmail Automation 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 Gmail Automation use?

About 2.7k tokens (SKILL.md is roughly 11k 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 Gmail Automation?

Skills that share tags, products or a category with Gmail Automation: Connect Apps with Composio (ComposioHQ/awesome-claude-skills, 77k stars), Composio Cloud Tools (quarqlabs/argus, 277 stars), Openloomi Connectors (melandlabs/openloomi, 1k stars) and Applescript Mail (s-morgan-jeffries/apple-mail-fast-mcp, 104 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gmail Automation?

davepoon (a GitHub user) maintains it in davepoon/buildwithclaude, which has 3,604 GitHub stars. The repository holds 245 skills in this directory. The repository was last updated on October 6, 2026.

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