Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Lightweight Gmail integration with standalone OAuth authentication. No MCP server required.
.claude/skills/gmail-automation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✗→✓ | ▲ Improved | — | — |
| case-15 | ✗→✓ | ▲ Improved | — | — |
| case-14 | ✗→✓ | ▲ Improved | — | — |
| case-02 | ✗→✓ | ▲ Improved | — | — |
Lightweight Gmail integration with standalone OAuth authentication. No MCP server required.
> ⚠️ Requires Google Workspace account. Personal Gmail accounts are not supported.
Authenticate with Google (opens browser):
bashpython scripts/auth.py login
Check authentication status:
bashpython scripts/auth.py status
Logout when needed:
bashpython scripts/auth.py logout
All operations via scripts/gmail.py. Auto-authenticates on first use if not logged in.
bash# Search with Gmail query syntax python scripts/gmail.py search "from:someone@example.com is:unread" # Search recent emails (no query returns all) python scripts/gmail.py search --limit 20 # Filter by label python scripts/gmail.py search --label INBOX --limit 10 # Include spam and trash python scripts/gmail.py search "subject:important" --include-spam-trash
bash# Get full message content python scripts/gmail.py get MESSAGE_ID # Get just metadata (headers) python scripts/gmail.py get MESSAGE_ID --format metadata # Get minimal response (IDs only) python scripts/gmail.py get MESSAGE_ID --format minimal
bash# Send a simple email python scripts/gmail.py send --to "user@example.com" --subject "Hello" --body "Message body" # Send with CC and BCC python scripts/gmail.py send --to "user@example.com" --cc "cc@example.com" --bcc "bcc@example.com" \ --subject "Team Update" --body "Update message" # Send from an alias (must be configured in Gmail settings) python scripts/gmail.py send --to "user@example.com" --subject "Hello" --body "Message" \ --from "Mile9 Accounts <accounts@mile9.io>" # Send HTML email python scripts/gmail.py send --to "user@example.com" --subject "HTML Email" \ --body "<h1>Hello</h1><p>HTML content</p>" --html
bash# Create a draft python scripts/gmail.py create-draft --to "user@example.com" --subject "Draft Subject" \ --body "Draft content" # Send an existing draft python scripts/gmail.py send-draft DRAFT_ID
bash# Mark as read (remove UNREAD label) python scripts/gmail.py modify MESSAGE_ID --remove-label UNREAD # Mark as unread python scripts/gmail.py modify MESSAGE_ID --add-label UNREAD # Archive (remove from INBOX) python scripts/gmail.py modify MESSAGE_ID --remove-label INBOX # Star a message python scripts/gmail.py modify MESSAGE_ID --add-label STARRED # Unstar a message python scripts/gmail.py modify MESSAGE_ID --remove-label STARRED # Mark as important python scripts/gmail.py modify MESSAGE_ID --add-label IMPORTANT # Multiple label changes at once python scripts/gmail.py modify MESSAGE_ID --remove-label UNREAD --add-label STARRED
bash# List all Gmail labels (system and user-created) python scripts/gmail.py list-labels
Gmail supports powerful search operators:
| Query | Description | |-------|-------------| | from:user@example.com | Emails from a specific sender | | to:user@example.com | Emails to a specific recipient | | subject:meeting | Emails with "meeting" in subject | | is:unread | Unread emails | | is:starred | Starred emails | | is:important | Important emails | | has:attachment | Emails with attachments | | after:2024/01/01 | Emails after a date | | before:2024/12/31 | Emails before a date | | newer_than:7d | Emails from last 7 days | | older_than:1m | Emails older than 1 month | | label:work | Emails with a specific label | | in:inbox | Emails in inbox | | in:sent | Sent emails | | in:trash | Trashed emails |
Combine with AND (space), OR, or - (NOT):
bashpython scripts/gmail.py search "from:boss@company.com is:unread newer_than:1d" python scripts/gmail.py search "subject:urgent OR subject:important" python scripts/gmail.py search "from:newsletter@example.com -is:starred"
| Label | ID | |-------|-----| | Inbox | INBOX | | Sent | SENT | | Drafts | DRAFT | | Spam | SPAM | | Trash | TRASH | | Starred | STARRED | | Important | IMPORTANT | | Unread | UNREAD |
Tokens stored securely using the system keyring:
Service name: gmail-skill-oauth
Tokens automatically refresh when expired using Google's cloud function.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +77 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.