gmail
Gmail Skill
Full CRUD Gmail management for AI agents. Search, read, compose, reply, forward, and manage messages.
Features
- Search: Advanced filtering using Gmail query syntax (from, to, subjects, labels, date ranges).
- Read: Fetch full message body, headers, and metadata.
- Thread: Read entire conversation threads.
- Draft: Create draft emails for the user to review.
- Send: Send emails directly.
- Reply: Reply to the sender of a message.
- Reply All: Reply to all recipients (sender + To + Cc, minus self).
- Forward: Forward a message with attribution header to new recipients.
- Trash / Untrash: Move messages to/from the trash.
- Labels: List labels. Add/remove labels on messages.
- Attachments: List and download message attachments.
Prerequisites
- Google Cloud Project with Gmail API enabled.
- OAuth 2.0 Credentials — either
gcloudADC orcredentials.json.
Setup
⚡ Quick Setup (Recommended)
Set up Gmail, Calendar, and Contacts all at once:
uv run ~/.agents/skills/gmail/scripts/setup_workspace.py
Manual Setup
-
Using gcloud ADC:
gcloud auth application-default login \ --scopes https://mail.google.com/,https://www.googleapis.com/auth/cloud-platformThen verify:
uv run skills/gmail/scripts/gmail.py verify -
Alternative (credentials.json):
- Place
credentials.jsonin~/.gmail_credentials/. - Run
uv run skills/gmail/scripts/gmail.py setup
- Place
Usage
Search for Emails
# Find unread emails from Obi-Wan
uv run skills/gmail/scripts/gmail.py search --query "from:obiwan@jedi.org is:unread"
# Find emails with attachments about Death Star plans
uv run skills/gmail/scripts/gmail.py search --query "has:attachment subject:plans" --limit 5
Read a Single Message (Full Body)
uv run skills/gmail/scripts/gmail.py read --id "18e..."
Read an Entire Thread
uv run skills/gmail/scripts/gmail.py thread --id "18e..."
Create a Draft
Safest option — creates a draft for the user to review before sending.
uv run skills/gmail/scripts/gmail.py draft \
--to "yoda@dagobah.net" \
--subject "Training Schedule" \
--body "Master, when shall we begin the next session?" \
--cc "mace@jedi.org"
Send an Email Directly
uv run skills/gmail/scripts/gmail.py send \
--to "yoda@dagobah.net" \
--subject "Urgent: Sith Sighting" \
--body "Master, I sense a disturbance in the Force."
Reply to a Message
# Reply (creates a draft by default)
uv run skills/gmail/scripts/gmail.py reply --id "18e..." --body "Acknowledged, Master."
# Reply and send immediately
uv run skills/gmail/scripts/gmail.py reply --id "18e..." --body "Acknowledged." --send
Reply to All
uv run skills/gmail/scripts/gmail.py reply-all --id "18e..." --body "Council noted." --send
Forward a Message
# Forward with a note (creates a draft by default)
uv run skills/gmail/scripts/gmail.py forward \
--id "18e..." \
--to "luke@tatooine.net" \
--body "FYI — see the original message below."
# Forward and send immediately
uv run skills/gmail/scripts/gmail.py forward \
--id "18e..." \
--to "luke@tatooine.net" \
--send
Trash / Untrash
uv run skills/gmail/scripts/gmail.py trash --id "18e..."
uv run skills/gmail/scripts/gmail.py untrash --id "18e..."
Label Management
# List all labels
uv run skills/gmail/scripts/gmail.py labels
# Add/remove labels
uv run skills/gmail/scripts/gmail.py modify-labels --id "18e..." --add STARRED --remove UNREAD
Download Attachments
uv run skills/gmail/scripts/gmail.py attachments --id "18e..." --output-dir ./downloads
Safety Guidelines
- Prefer
draftoversendfor new compositions — let the user review first. - Reply/Forward defaults to draft — use
--sendflag only when explicitly requested. - Trash is reversible — messages can be untrashed. Permanent deletion is intentionally not exposed.
- Threading: Reply, reply-all, and forward use proper
In-Reply-ToandReferencesheaders so Gmail threads them correctly.
JSON Output Structure
All commands produce JSON for easy parsing.
Search Result:
[
{
"id": "18e...",
"threadId": "18e...",
"snippet": "Help me, Obi-Wan Kenobi...",
"from": "Leia Organa <leia@alderaan.gov>",
"to": "obiwan@jedi.org",
"subject": "Urgent Message",
"date": "Mon, 13 Feb 2026 10:00:00 -0700",
"labels": ["INBOX", "UNREAD"]
}
]
Read Result (includes full body):
{
"id": "18e...",
"threadId": "18e...",
"body": "Full message text...",
"attachments": [
{ "filename": "plans.pdf", "mimeType": "application/pdf", "size": "42000" }
]
}
More from baphomet480/claude-skills
kitchen-sink-design-system
Kitchen Sink design system workflow for Next.js and React projects, with secondary support for Astro, SvelteKit, Nuxt, and static HTML. Use when asked for a Kitchen Sink page, Design System, UI Audit, Style Guide, or Component Inventory, or when a project needs a component inventory plus component creation and a sink page implementation. Covers CVA variant architecture, Tailwind v3/v4 token systems, shadcn/ui integration, and TinaCMS content modeling.
40deep-research
Conduct comprehensive, multi-round research that produces rich visual reports. Use when asked for "deep research", "comprehensive analysis", "compare frameworks", "evaluate options", "research the state of X", or any task requiring investigation across 10+ sources. NOT for quick lookups — this is a 5-15 minute deep dive that produces a briefing-quality artifact with screenshots, diagrams, tables, and cited findings.
37design-lookup
Search and retrieve CSS components, SVG icons, design patterns, and visual inspiration from the web. Use when the user asks to find, look up, or search for CSS snippets, SVG icons, UI components, loading spinners, animations, design inspiration, or any visual/frontend design resource. Triggers on requests like "find me a CSS button", "look up an SVG spinner", "search for a card component", "find a wave divider SVG", or "get design inspiration for a dashboard".
34nextjs-tinacms
Build Next.js 16 + React 19 + TinaCMS sites with visual editing, blocks-based page builder, and complete SEO. Use this skill whenever the user mentions TinaCMS, Tina CMS, Next.js with a CMS, visual editing with Next.js, click-to-edit, content-managed Next.js site, blocks pattern page builder, or migrating to Next.js + TinaCMS. Also trigger for TinaCMS schema design, self-hosted TinaCMS, TinaCMS media configuration, or any TinaCMS troubleshooting. Covers Day 0-2 setup from scaffolding through production deployment on Vercel.
32cloudflare-pages
Deploy static sites to Cloudflare Pages with custom domains and CI/CD. Use when the user wants to deploy a site to Cloudflare Pages, add a custom domain to a Pages project, set up GitHub Actions CI/CD for Cloudflare Pages, roll back a deployment, or verify deployment status. Triggers on "deploy to Cloudflare", "Cloudflare Pages", "add custom domain", "pages deploy", or any Cloudflare Pages hosting workflow.
31local-ocr
Local OCR pipeline for AI agents featuring auto-rotation, deskew, and searchable PDF generation via ocrmypdf and Tesseract.
23