| name | description |
|---|---|
gmail |
Access Gmail, Google Docs, Drive, and Calendar. Use when asked about emails, documents, meeting notes, calendar, files, or schedule. Supports multiple accounts. |
Access multiple Gmail/Google accounts via the command line.
| Alias | Use For | Gmail | Docs/Drive/Cal | |
|---|---|---|---|---|
personal |
you@gmail.com | Personal email | ✓ | ✓ |
work |
you@company.com | Work email | ✓ | ✓ |
business |
you@business.io | Business/consulting | ✓ | ✓ |
Configure your own accounts in the ACCOUNTS dict at the top of each script.
All commands use this pattern:
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py --account ACCOUNT [--json] COMMAND [OPTIONS]# Personal inbox (default)
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py list --limit 10
# Specific account
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py --account work list --limit 10
# Only unread
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py --account business list --unread
# JSON output (for processing)
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py --json --account personal list --limit 5Uses Gmail search syntax:
# Search by sender
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py --account work search "from:colleague@company.com"
# Search by subject
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py search "subject:invoice"
# Recent emails with attachments
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py search "has:attachment newer_than:7d"
# Unread from specific person
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py search "is:unread from:someone@example.com"python3 ~/.claude/skills/gmail/scripts/gmail_cli.py read MESSAGE_ID
# With JSON output
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py --json read MESSAGE_ID# Simple send
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py --account work send \
--to "recipient@example.com" \
--subject "Subject line" \
--body "Email body here"
# With body from stdin (useful for longer messages)
echo "Long email body..." | python3 ~/.claude/skills/gmail/scripts/gmail_cli.py send \
--to "recipient@example.com" \
--subject "Subject" \
--body -
# With CC and attachments
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py send \
--to "main@example.com" \
--cc "copy@example.com" \
--subject "Report attached" \
--body "Please find attached." \
--attachments /path/to/file.pdfecho "Reply body..." | python3 ~/.claude/skills/gmail/scripts/gmail_cli.py reply MESSAGE_ID --body -# Mark as read
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py mark-read MESSAGE_ID
# Mark as unread
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py mark-unread MESSAGE_ID
# List labels
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py labelspython3 ~/.claude/skills/gmail/scripts/gmail_cli.py accounts| Query | Description |
|---|---|
from:name |
From specific sender |
to:name |
To specific recipient |
subject:word |
In subject line |
is:unread |
Unread messages |
is:starred |
Starred messages |
has:attachment |
Has attachments |
newer_than:7d |
Last 7 days |
older_than:1m |
Older than 1 month |
after:2024/01/01 |
After specific date |
label:LABEL |
With specific label |
in:inbox |
In inbox |
in:sent |
In sent |
Combine with AND (space) or OR: from:alice OR from:bob
Customize this section to tell Claude which account to use based on context. For example:
- Work mentions (colleagues, projects) -> use
work - Business/consulting -> use
business - Personal/default -> use
personal
These use a separate script with its own authentication.
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account ACCOUNT [--json] COMMAND [OPTIONS]Fetch meeting notes or any Google Doc by URL or ID:
# By URL
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account work doc "https://docs.google.com/document/d/DOC_ID/edit"
# By ID only
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account work doc DOC_ID# List recent files
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account work drive-list --limit 10
# List only docs
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account work drive-list --type docs
# Search files
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account work drive-search "project proposal"# Today's events
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account work today
# Upcoming events (next 7 days)
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account work calendar --days 7
# Next 5 events
python3 ~/.claude/skills/gmail/scripts/google_cli.py --account work calendar --limit 5python3 ~/.claude/skills/gmail/scripts/google_cli.py accountspython3 ~/.claude/skills/gmail/scripts/gmail_cli.py accountspython3 ~/.claude/skills/gmail/scripts/google_cli.py accountsIf an account shows "NOT SET UP", run:
python3 ~/.claude/skills/gmail/scripts/gmail_cli.py setupIf auth fails or tokens expire:
# Gmail tokens
rm ~/.claude/skills/gmail/config/token_*.json
# Google services tokens (Docs/Drive/Calendar)
rm ~/.claude/skills/gmail/config/google_token_*.json
# Then re-run any command to re-authenticateToken location: ~/.claude/skills/gmail/config/
Revoke access: https://myaccount.google.com/permissions
Important: Publish the OAuth app (move out of "Testing" mode) or refresh tokens expire after 7 days!