Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Interact with Gmail - search emails, read messages, send emails, create drafts, and manage labels. Use when user asks to: search email, read email, send email, create email draft, mark as read, archive email, star email, or manage Gmail labels. Lightweight alternative to full Google Workspace MCP server with standalone OAuth authentication.
.claude/skills/sanjay3290-gmail/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | -46% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -17% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -42% | 0% |
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-01 | fail→fail | 10,898 | 7,401 | -32% | 1 | 1 | 0% | 1,600 | 1,801 | +13% | 0 | 0 | — |
case-02 | fail→fail | 14,539 | 6,930 | -52% | 1 | 1 | 0% | 729 | 1,605 | +120% | 0 | 0 | — |
case-03 | fail→fail | 6,794 | 8,172 | +20% | 1 | 1 | 0% | 1,255 | 1,760 | +40% | 0 | 0 | — |
case-04 | fail→pass | 21,926 | 2,499 | -89% | 1 | 1 | 0% | 2,832 | 1,538 | -46% | 0 | 0 | — |
case-05 | fail→fail | 10,597 | 9,280 | -12% | 1 | 1 | 0% | 1,833 | 2,823 | +54% | 0 | 0 | — |
case-06 | fail→pass | 9,302 | 2,781 | -70% | 1 | 1 | 0% | 1,682 | 1,620 | -4% | 0 | 0 | — |
case-07 | fail→pass | 13,946 | 2,227 | -84% | 1 | 1 | 0% | 1,846 | 1,536 | -17% | 0 | 0 | — |
case-08 | fail→pass | 8,976 | 1,617 | -82% | 1 | 1 | 0% | 1,370 | 1,497 | +9% | 0 | 0 | — |
case-14 | fail→pass | 13,520 | 2,163 | -84% | 1 | 1 | 0% | 2,493 | 1,434 | -42% | 0 | 0 | — |
case-09 | fail→pass | 9,060 | 2,362 | -74% | 1 | 1 | 0% | 568 | 1,583 | +179% | 0 | 0 | — |
case-10 | fail→pass | 4,404 | 2,845 | -35% | 1 | 1 | 0% | 522 | 1,499 | +187% | 0 | 0 | — |
case-11 | fail→pass | 7,094 | 1,650 | -77% | 1 | 1 | 0% | 1,282 | 1,529 | +19% | 0 | 0 | — |
case-12 | fail→pass | 12,786 | 4,475 | -65% | 1 | 1 | 0% | 449 | 1,615 | +260% | 0 | 0 | — |
case-13 | fail→pass | 6,313 | 4,082 | -35% | 1 | 1 | 0% | 878 | 1,815 | +107% | 0 | 0 | — |
case-15 | pass→pass | 2,593 | 3,468 | +34% | 1 | 1 | 0% | 441 | 1,681 | +281% | 0 | 0 | — |
case-16 | pass→pass | 7,576 | 2,004 | -74% | 1 | 1 | 0% | 1,096 | 1,567 | +43% | 0 | 0 | — |
case-17 | fail→pass | 15,434 | 1,572 | -90% | 1 | 1 | 0% | 2,689 | 1,502 | -44% | 0 | 0 | — |
case-18 | fail→pass | 18,609 | 2,703 | -85% | 1 | 1 | 0% | 2,136 | 1,556 | -27% | 0 | 0 | — |
case-19 | fail→fail | 3,207 | 5,939 | +85% | 1 | 1 | 0% | 562 | 1,593 | +183% | 0 | 0 | — |
case-20 | pass→pass | 12,852 | 10,341 | -20% | 1 | 1 | 0% | 2,219 | 2,772 | +25% | 0 | 0 | — |
case-21 | pass→pass | 11,699 | 10,004 | -14% | 1 | 1 | 0% | 1,797 | 2,555 | +42% | 0 | 0 | — |
case-22 | pass→pass | 11,456 | 11,169 | -3% | 1 | 1 | 0% | 2,007 | 2,829 | +41% | 0 | 0 | — |
case-23 | pass→pass | 8,926 | 2,490 | -72% | 1 | 1 | 0% | 1,210 | 1,555 | +29% | 0 | 0 | — |
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. 23 cases were attempted, and 19 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +52 percentage points is the difference between those two pass rates over the 19 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.