npx skills add ...
npx skills add idanbeck/claude-skills --skill gmail-skill
Read, search, send, and draft Gmail emails and Google contacts. Use when the user asks to check email, find emails, search messages, send emails, create drafts, look up contacts, or find someone's email/phone. Supports multiple accounts.
npx skills add idanbeck/claude-skills --skill gmail-skill
Read, search, and send Gmail emails. Access Google contacts.
Before sending ANY email, you MUST get explicit user confirmation.
When the user asks to send an email:
This applies even when:
Always confirm first. No exceptions.
On first run, the script will guide you through setup. You need to create a Google Cloud OAuth client once:
gmail.readonly, gmail.send, gmail.modify, contacts.readonly~/.claude/skills/gmail-skill/credentials.jsonThen just run any command - browser opens, you approve, done. Works for all your accounts.
Note: If you previously used gmail-reader, you'll need to re-authenticate to grant the new gmail.send scope.
Query examples:
from:john@example.com - from specific sendersubject:meeting after:2026/01/01 - subject + datehas:attachment filename:pdf - with PDF attachmentsis:unread - unread emails"exact phrase" - exact matchRequired arguments:
--to / -t - Recipient email address--subject / -s - Email subject line--body / -b - Email body textOptional arguments:
--cc - CC recipients (comma-separated)--bcc - BCC recipients (comma-separated)--account / -a - Send from specific accountExample:
Both mark-read and mark-unread support multiple IDs (comma-separated):
Archives email(s) by removing from inbox. Equivalent to Gmail's 'e' keyboard shortcut.
Moves email(s) back to inbox (undo archive).
All label commands support multiple IDs (comma-separated):
Creates a draft email. Use --reply-to-id when replying to an existing email to ensure proper threading in email clients like Superhuman.
Required arguments:
--to / -t - Recipient email address--subject / -s - Email subject line--body / -b - Email body textOptional arguments:
--reply-to-id / -r - Message ID to reply to (adds proper In-Reply-To and References headers for threading)--cc - CC recipients (comma-separated)--bcc - BCC recipients (comma-separated)--account / -a - Create draft in specific accountExample (new email):
Example (reply to existing email):
Add accounts by using --account with a new email - browser opens for that account:
Tokens are stored per-account in ~/.claude/skills/gmail-skill/tokens/
All commands output JSON for easy parsing.
pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client requests~/.claude/skills/gmail-skill/tokens/python3 ~/.claude/skills/gmail-skill/gmail_skill.py list [--max-results N] [--label LABEL] [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py send --to EMAIL --subject "Subject" --body "Body text" [--cc EMAIL] [--bcc EMAIL] [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py send \
--to "recipient@example.com" \
--subject "Meeting Tomorrow" \
--body "Hi, just confirming our meeting at 2pm tomorrow." \
--account work@company.compython3 ~/.claude/skills/gmail-skill/gmail_skill.py mark-read EMAIL_ID [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py mark-unread EMAIL_ID [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py mark-read "id1,id2,id3" --account user@gmail.compython3 ~/.claude/skills/gmail-skill/gmail_skill.py mark-done EMAIL_ID [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py unarchive EMAIL_ID [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py star EMAIL_ID [--account EMAIL]
python3 ~/.claude/skills/gmail-skill/gmail_skill.py unstar EMAIL_ID [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py star "id1,id2,id3" --account user@gmail.compython3 ~/.claude/skills/gmail-skill/gmail_skill.py draft --to EMAIL --subject "Subject" --body "Body text" [--reply-to-id EMAIL_ID] [--cc EMAIL] [--bcc EMAIL] [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py draft \
--to "recipient@example.com" \
--subject "Draft for Review" \
--body "Here's my draft message."python3 ~/.claude/skills/gmail-skill/gmail_skill.py draft \
--to "sender@example.com" \
--subject "Re: Original Subject" \
--body "Thanks for your email..." \
--reply-to-id 19b99b3127793843 \
--account work@company.compython3 ~/.claude/skills/gmail-skill/gmail_skill.py labels [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py contacts [--max-results N] [--account EMAIL]python3 ~/.claude/skills/gmail-skill/gmail_skill.py search-contacts "query" [--account EMAIL]# List all authenticated accounts
python3 ~/.claude/skills/gmail-skill/gmail_skill.py accounts
# Remove an account
python3 ~/.claude/skills/gmail-skill/gmail_skill.py logout --account user@gmail.com# First account (auto-authenticates)
python3 ~/.claude/skills/gmail-skill/gmail_skill.py list
# Add work account
python3 ~/.claude/skills/gmail-skill/gmail_skill.py list --account work@company.com
# Add personal account
python3 ~/.claude/skills/gmail-skill/gmail_skill.py list --account personal@gmail.com
# Use specific account
python3 ~/.claude/skills/gmail-skill/gmail_skill.py search "from:boss" --account work@company.compython3 ~/.claude/skills/gmail-skill/gmail_skill.py search "is:unread after:2026/01/01"python3 ~/.claude/skills/gmail-skill/gmail_skill.py read 18d5a3b2c1f4e5d6python3 ~/.claude/skills/gmail-skill/gmail_skill.py send \
--to "friend@example.com" \
--subject "Hello!" \
--body "Just wanted to say hi."python3 ~/.claude/skills/gmail-skill/gmail_skill.py search-contacts "John Smith"python3 ~/.claude/skills/gmail-skill/gmail_skill.py list --account work@company.com --max-results 5