Use when composing, sending, searching, or managing Warren's emails via gmail CLI. Covers drafting with styles, finding similar emails for context, managing groups, discovering contacts online, and email workflows. Always test to fuchengwarrenzhu@gmail.com before real sends.
Manages email through the gmail CLI tool. Claude will use it when composing, searching, or managing emails, always testing drafts to fuchengwarrenzhu@gmail.com first and searching past emails to match recipient style.
/plugin marketplace add WarrenZhu050413/Warren-Claude-Code-Plugin-Marketplace/plugin install claude-context-orchestrator@warren-claude-code-plugin-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdassets/style-template.mdreferences/api-reference.mdreferences/email-styles.mdreferences/gmail-search-syntax.mdreferences/quick-reference.mdUse this skill when working with email through the gmail CLI tool.
/gmail - Quick reference for common gmail CLI commands/gmail::setup - Set up Gmail CLI authenticationALWAYS before composing:
Progressive disclosure:
gmail list, gmail search)--full)gmail thread)gmail search "to:person@example.com" --max 10 # Emails to someone
gmail search "from:person@example.com" --max 10 # Emails from someone
gmail search "subject:keyword after:2024/10/01" # By subject + date
gmail search "has:attachment filename:pdf" # With attachments
gmail list --folder INBOX --max 10 # List inbox
gmail folders # List all folders/labels
gmail read <message_id> # Summary view
gmail read <message_id> --full # Full content
gmail read <message_id> --full-thread # Full content with thread context
gmail thread <message_id> # View entire thread
gmail thread <message_id> --strip-quotes # View thread without quoted content
# Send from file (preferred for composed emails)
gmail send --to user@example.com --subject "X" --body "$(cat /tmp/email/draft.txt)"
gmail send --to user@example.com --subject "X" --body "$(cat /tmp/email/draft.txt)" --attachment file.pdf
# Send inline (for quick replies only)
gmail send --to user@example.com --subject "X" --body "Y"
gmail reply <message_id> --body "Reply text"
gmail reply <message_id> --body "Reply" --reply-all
gmail styles list # List all styles
gmail styles show professional-formal # View specific style
gmail styles validate style-name # Validate format
Common styles: professional-formal, professional-friendly, casual-friend, brief-reply
gmail groups list # List all groups
gmail groups show team # Show group members
gmail groups add team person@example.com # Add member
gmail send --to @team --subject "X" --body "Y" # Use group
gmail workflows list # List workflows
gmail workflows run clear # Run interactively
gmail workflows start clear # Start programmatic (JSON)
gmail workflows continue <token> archive # Continue with action
gmail styles list)/tmp/email/{descriptive_name}.txtopen command on macOS)gmail send --to fuchengwarrenzhu@gmail.com --subject "..." --body "$(cat /tmp/email/{name}.txt)" --yologmail search "to:@harvard.edu" --folder SENT --max 10gmail read <message_id> --fullgmail read <id> --full)gmail thread <id>)gmail search "from:[name]"gmail search "to:[name]"gmail groups listRecommended approach:
# Use gmail thread to view entire conversation
gmail thread <message_id> # Show full thread
gmail thread <message_id> --strip-quotes # Remove quoted content for clarity
gmail thread <message_id> --output-format json # Get JSON format
Alternative (manual assembly):
# 1. Find thread
gmail list --folder ALL --query "keyword"
# 2. Get all message IDs in thread
# Note thread_id from results
# 3. Read each message with full body
gmail read <id> --full
# 4. Piece together conversation manually
If gmail read output doesn't show CC/BCC recipients (current limitation), use Python workaround:
from gmaillm.gmail_client import GmailClient
client = GmailClient()
msg = client.service.users().messages().get(
userId='me',
id='<message_id>',
format='full'
).execute()
headers = msg['payload']['headers']
# Extract CC recipients
cc = [h['value'] for h in headers if h['name'].lower() == 'cc']
to = [h['value'] for h in headers if h['name'].lower() == 'to']
from_ = [h['value'] for h in headers if h['name'].lower() == 'from']
print(f"From: {from_}")
print(f"To: {to}")
print(f"CC: {cc}")
Complete workflow:
gmail list --folder ALL --query "subject:keywords"gmail read <id> (or --full for body)--yolo to skip confirmationExample:
# Find thread
gmail list --folder ALL --query "MLD courses" --output-format json
# Read messages
gmail read 19a5a90f97be8df8
# Extract CC (if needed)
# Use Python script above
# Send reply with CC
gmail send --to "mksmith@hks.harvard.edu" --cc "Greg_Dorchak@hks.harvard.edu" --subject "Reply" --body "..." --yolo
People: from:, to:, cc:, bcc:
Date: after:YYYY/MM/DD, before:YYYY/MM/DD, newer_than:7d, older_than:30d
Status: is:unread, is:starred, is:important, is:read
Content: subject:keyword, has:attachment, has:drive, filename:pdf
Size: larger:10M, smaller:5M
Boolean: OR, - (NOT), () (grouping)
Examples:
to:person@example.com OR from:person@example.comsubject:project after:2024/10/01is:unread is:importanthas:attachment filename:pdfEmail Styles:
~/.gmaillm/email-styles/professional-formal, professional-friendly, casual-friend, brief-replygmail styles show <name>Configuration:
~/.gmaillm/gmail setup-authgmail verifyBest Practices:
Common Mistakes to Avoid:
For detailed information when needed:
references/email-styles.md - Complete styles guidereferences/gmail-search-syntax.md - Full search syntaxreferences/api-reference.md - Complete API docs