{"id":"2015220e-68dd-42ce-aa1c-d36ead4c0fb3","shortId":"Ep3huf","kind":"skill","title":"gmail","tagline":"Interact with Gmail - search emails, read messages, send emails, create drafts, and manage labels.\nUse when user asks to: search email, read email, send email, create email draft, mark as read,\narchive email, star email, or manage Gmail labels. Lightweight alternative to full Goo","description":"# Gmail\n\nLightweight Gmail integration with standalone OAuth authentication. No MCP server required.\n\n> **⚠️ Requires Google Workspace account.** Personal Gmail accounts are not supported.\n\n## First-Time Setup\n\nAuthenticate with Google (opens browser):\n```bash\npython scripts/auth.py login\n```\n\nCheck authentication status:\n```bash\npython scripts/auth.py status\n```\n\nLogout when needed:\n```bash\npython scripts/auth.py logout\n```\n\n## Commands\n\nAll operations via `scripts/gmail.py`. Auto-authenticates on first use if not logged in.\n\n### Search Emails\n\n```bash\n# Search with Gmail query syntax\npython scripts/gmail.py search \"from:someone@example.com is:unread\"\n\n# Search recent emails (no query returns all)\npython scripts/gmail.py search --limit 20\n\n# Filter by label\npython scripts/gmail.py search --label INBOX --limit 10\n\n# Include spam and trash\npython scripts/gmail.py search \"subject:important\" --include-spam-trash\n```\n\n### Read Email Content\n\n```bash\n# Get full message content\npython scripts/gmail.py get MESSAGE_ID\n\n# Get just metadata (headers)\npython scripts/gmail.py get MESSAGE_ID --format metadata\n\n# Get minimal response (IDs only)\npython scripts/gmail.py get MESSAGE_ID --format minimal\n```\n\n### Send Emails\n\n```bash\n# Send a simple email\npython scripts/gmail.py send --to \"user@example.com\" --subject \"Hello\" --body \"Message body\"\n\n# Send with CC and BCC\npython scripts/gmail.py send --to \"user@example.com\" --cc \"cc@example.com\" --bcc \"bcc@example.com\" \\\n  --subject \"Team Update\" --body \"Update message\"\n\n# Send from an alias (must be configured in Gmail settings)\npython scripts/gmail.py send --to \"user@example.com\" --subject \"Hello\" --body \"Message\" \\\n  --from \"Mile9 Accounts <accounts@mile9.io>\"\n\n# Send HTML email\npython scripts/gmail.py send --to \"user@example.com\" --subject \"HTML Email\" \\\n  --body \"<h1>Hello</h1><p>HTML content</p>\" --html\n```\n\n### Draft Management\n\n```bash\n# Create a draft\npython scripts/gmail.py create-draft --to \"user@example.com\" --subject \"Draft Subject\" \\\n  --body \"Draft content\"\n\n# Send an existing draft\npython scripts/gmail.py send-draft DRAFT_ID\n```\n\n### Modify Messages (Labels)\n\n```bash\n# Mark as read (remove UNREAD label)\npython scripts/gmail.py modify MESSAGE_ID --remove-label UNREAD\n\n# Mark as unread\npython scripts/gmail.py modify MESSAGE_ID --add-label UNREAD\n\n# Archive (remove from INBOX)\npython scripts/gmail.py modify MESSAGE_ID --remove-label INBOX\n\n# Star a message\npython scripts/gmail.py modify MESSAGE_ID --add-label STARRED\n\n# Unstar a message\npython scripts/gmail.py modify MESSAGE_ID --remove-label STARRED\n\n# Mark as important\npython scripts/gmail.py modify MESSAGE_ID --add-label IMPORTANT\n\n# Multiple label changes at once\npython scripts/gmail.py modify MESSAGE_ID --remove-label UNREAD --add-label STARRED\n```\n\n### List Labels\n\n```bash\n# List all Gmail labels (system and user-created)\npython scripts/gmail.py list-labels\n```\n\n## Gmail Query Syntax\n\nGmail supports powerful search operators:\n\n| Query | Description |\n|-------|-------------|\n| `from:user@example.com` | Emails from a specific sender |\n| `to:user@example.com` | Emails to a specific recipient |\n| `subject:meeting` | Emails with \"meeting\" in subject |\n| `is:unread` | Unread emails |\n| `is:starred` | Starred emails |\n| `is:important` | Important emails |\n| `has:attachment` | Emails with attachments |\n| `after:2024/01/01` | Emails after a date |\n| `before:2024/12/31` | Emails before a date |\n| `newer_than:7d` | Emails from last 7 days |\n| `older_than:1m` | Emails older than 1 month |\n| `label:work` | Emails with a specific label |\n| `in:inbox` | Emails in inbox |\n| `in:sent` | Sent emails |\n| `in:trash` | Trashed emails |\n\nCombine with AND (space), OR, or - (NOT):\n```bash\npython scripts/gmail.py search \"from:boss@company.com is:unread newer_than:1d\"\npython scripts/gmail.py search \"subject:urgent OR subject:important\"\npython scripts/gmail.py search \"from:newsletter@example.com -is:starred\"\n```\n\n## Common Label IDs\n\n| Label | ID |\n|-------|-----|\n| Inbox | `INBOX` |\n| Sent | `SENT` |\n| Drafts | `DRAFT` |\n| Spam | `SPAM` |\n| Trash | `TRASH` |\n| Starred | `STARRED` |\n| Important | `IMPORTANT` |\n| Unread | `UNREAD` |\n\n## Token Management\n\nTokens stored securely using the system keyring:\n- **macOS**: Keychain\n- **Windows**: Windows Credential Locker\n- **Linux**: Secret Service API (GNOME Keyring, KDE Wallet, etc.)\n\nService name: `gmail-skill-oauth`\n\nTokens automatically refresh when expired using Google's cloud function.","tags":["gmail","skills","sanjay3290","agent-skills","ai-skills","atlassian","azure-devops","claude-code","claude-skills","confluence","deep-research","elevenlabs"],"capabilities":["skill","source-sanjay3290","skill-gmail","topic-agent-skills","topic-ai-skills","topic-atlassian","topic-azure-devops","topic-claude-code","topic-claude-skills","topic-confluence","topic-deep-research","topic-elevenlabs","topic-gmail","topic-google-calendar","topic-google-drive"],"categories":["ai-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sanjay3290/ai-skills/gmail","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sanjay3290/ai-skills","source_repo":"https://github.com/sanjay3290/ai-skills","install_from":"skills.sh"}},"qualityScore":"0.574","qualityRationale":"deterministic score 0.57 from registry signals: · indexed on github topic:agent-skills · 248 github stars · SKILL.md body (4,489 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T18:54:10.377Z","embedding":null,"createdAt":"2026-04-18T22:05:12.498Z","updatedAt":"2026-05-02T18:54:10.377Z","lastSeenAt":"2026-05-02T18:54:10.377Z","tsv":"'1':491 '10':146 '1d':530 '1m':487 '20':136 '2024/01/01':466 '2024/12/31':472 '7':483 '7d':479 'account':61,64,254 'accounts@mile9.io':255 'add':330,355,379,397 'add-label':329,354,378,396 'alia':236 'altern':42 'api':585 'archiv':33,333 'ask':19 'attach':461,464 'authent':53,72,82,102 'auto':101 'auto-authent':100 'automat':598 'bash':77,84,91,112,163,198,274,305,402,520 'bcc':217,225 'bcc@example.com':226 'bodi':210,212,230,250,267,288 'boss@company.com':525 'browser':76 'cc':215,223 'cc@example.com':224 'chang':384 'check':81 'cloud':605 'combin':513 'command':95 'common':546 'configur':239 'content':162,167,270,290 'creat':11,27,275,281,411 'create-draft':280 'credenti':580 'date':470,476 'day':484 'descript':426 'draft':12,29,272,277,282,286,289,294,299,300,555,556 'email':6,10,22,24,26,28,34,36,111,127,161,197,202,258,266,429,436,443,451,455,459,462,467,473,480,488,495,502,508,512 'etc':590 'exist':293 'expir':601 'filter':137 'first':69,104 'first-tim':68 'format':182,194 'full':44,165 'function':606 'get':164,170,173,179,184,191 'gmail':1,4,39,46,48,63,115,241,405,417,420,594 'gmail-skill-oauth':593 'gnome':586 'goo':45 'googl':59,74,603 'header':176 'hello':209,249,268 'html':257,265,269,271 'id':172,181,187,193,301,316,328,341,353,365,377,391,548,550 'import':155,372,381,457,458,538,563,564 'inbox':144,336,345,501,504,551,552 'includ':147,157 'include-spam-trash':156 'integr':49 'interact':2 'kde':588 'keychain':577 'keyr':575,587 'label':15,40,139,143,304,311,319,331,344,356,368,380,383,394,398,401,406,416,493,499,547,549 'last':482 'lightweight':41,47 'limit':135,145 'linux':582 'list':400,403,415 'list-label':414 'locker':581 'log':108 'login':80 'logout':88,94 'maco':576 'manag':14,38,273,568 'mark':30,306,321,370 'mcp':55 'meet':442,445 'messag':8,166,171,180,192,211,232,251,303,315,327,340,348,352,360,364,376,390 'metadata':175,183 'mile9':253 'minim':185,195 'modifi':302,314,326,339,351,363,375,389 'month':492 'multipl':382 'must':237 'name':592 'need':90 'newer':477,528 'newsletter@example.com':543 'oauth':52,596 'older':485,489 'open':75 'oper':97,424 'person':62 'power':422 'python':78,85,92,118,132,140,151,168,177,189,203,218,243,259,278,295,312,324,337,349,361,373,387,412,521,531,539 'queri':116,129,418,425 'read':7,23,32,160,308 'recent':126 'recipi':440 'refresh':599 'remov':309,318,334,343,367,393 'remove-label':317,342,366,392 'requir':57,58 'respons':186 'return':130 'scripts/auth.py':79,86,93 'scripts/gmail.py':99,119,133,141,152,169,178,190,204,219,244,260,279,296,313,325,338,350,362,374,388,413,522,532,540 'search':5,21,110,113,120,125,134,142,153,423,523,533,541 'secret':583 'secur':571 'send':9,25,196,199,205,213,220,233,245,256,261,291,298 'send-draft':297 'sender':433 'sent':506,507,553,554 'server':56 'servic':584,591 'set':242 'setup':71 'simpl':201 'skill':595 'skill-gmail' 'someone@example.com':122 'source-sanjay3290' 'space':516 'spam':148,158,557,558 'specif':432,439,498 'standalon':51 'star':35,346,357,369,399,453,454,545,561,562 'status':83,87 'store':570 'subject':154,208,227,248,264,285,287,441,447,534,537 'support':67,421 'syntax':117,419 'system':407,574 'team':228 'time':70 'token':567,569,597 'topic-agent-skills' 'topic-ai-skills' 'topic-atlassian' 'topic-azure-devops' 'topic-claude-code' 'topic-claude-skills' 'topic-confluence' 'topic-deep-research' 'topic-elevenlabs' 'topic-gmail' 'topic-google-calendar' 'topic-google-drive' 'trash':150,159,510,511,559,560 'unread':124,310,320,323,332,395,449,450,527,565,566 'unstar':358 'updat':229,231 'urgent':535 'use':16,105,572,602 'user':18,410 'user-cr':409 'user@example.com':207,222,247,263,284,428,435 'via':98 'wallet':589 'window':578,579 'work':494 'workspac':60","prices":[{"id":"34ce93d9-5c98-458f-be3e-c1d813e5be59","listingId":"2015220e-68dd-42ce-aa1c-d36ead4c0fb3","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sanjay3290","category":"ai-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:05:12.498Z"}],"sources":[{"listingId":"2015220e-68dd-42ce-aa1c-d36ead4c0fb3","source":"github","sourceId":"sanjay3290/ai-skills/gmail","sourceUrl":"https://github.com/sanjay3290/ai-skills/tree/main/skills/gmail","isPrimary":false,"firstSeenAt":"2026-04-18T22:05:12.498Z","lastSeenAt":"2026-05-02T18:54:10.377Z"}],"details":{"listingId":"2015220e-68dd-42ce-aa1c-d36ead4c0fb3","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sanjay3290","slug":"gmail","github":{"repo":"sanjay3290/ai-skills","stars":248,"topics":["agent-skills","ai-skills","atlassian","azure-devops","claude-code","claude-skills","confluence","deep-research","elevenlabs","gmail","google-calendar","google-drive","google-workspace","imagen","jira","mcp","mysql","notebooklm","postgresql","text-to-speech"],"license":"apache-2.0","html_url":"https://github.com/sanjay3290/ai-skills","pushed_at":"2026-04-13T14:16:19Z","description":"Collection of agent skills for AI coding assistants","skill_md_sha":"30c7ac37355300294eff09fa8ebf8fb5dca9afd0","skill_md_path":"skills/gmail/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sanjay3290/ai-skills/tree/main/skills/gmail"},"layout":"multi","source":"github","category":"ai-skills","frontmatter":{"name":"gmail","license":"Apache-2.0","description":"Interact with Gmail - search emails, read messages, send emails, create drafts, and manage labels.\nUse when user asks to: search email, read email, send email, create email draft, mark as read,\narchive email, star email, or manage Gmail labels. Lightweight alternative to full Google\nWorkspace MCP server with standalone OAuth authentication."},"skills_sh_url":"https://skills.sh/sanjay3290/ai-skills/gmail"},"updatedAt":"2026-05-02T18:54:10.377Z"}}