[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-1ab3eb07-7bfd-48b8-b7aa-52a6b376cfde":3,"$fwJuE6aidygd5UH3MX27iYCbt5NoRhq5uH_ygz4dwnwc":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"1ab3eb07-7bfd-48b8-b7aa-52a6b376cfde","gmail-automation","轻量级Gmail集成，独立OAuth认证。无需MCP服务器。","cat_prod_automation","mod_productivity","sickn33,productivity","---\nname: gmail-automation\ndescription: \"Lightweight Gmail integration with standalone OAuth authentication. No MCP server required.\"\nlicense: Apache-2.0\nrisk: critical\nsource: community\nmetadata:\n  author: sanjay3290\n  version: \"1.0\"\n---\n\n# 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## When to Use\n- You need to search, read, or send Gmail messages from the command line without an MCP server.\n- You are automating inbox workflows for a Google Workspace account.\n- You want a lightweight Gmail integration backed by standalone OAuth scripts.\n\n## First-Time Setup\n\nAuthenticate with Google (opens browser):\n```bash\npython scripts\u002Fauth.py login\n```\n\nCheck authentication status:\n```bash\npython scripts\u002Fauth.py status\n```\n\nLogout when needed:\n```bash\npython scripts\u002Fauth.py logout\n```\n\n## Commands\n\nAll operations via `scripts\u002Fgmail.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\u002Fgmail.py search \"from:someone@example.com is:unread\"\n\n# Search recent emails (no query returns all)\npython scripts\u002Fgmail.py search --limit 20\n\n# Filter by label\npython scripts\u002Fgmail.py search --label INBOX --limit 10\n\n# Include spam and trash\npython scripts\u002Fgmail.py search \"subject:important\" --include-spam-trash\n```\n\n### Read Email Content\n\n```bash\n# Get full message content\npython scripts\u002Fgmail.py get MESSAGE_ID\n\n# Get just metadata (headers)\npython scripts\u002Fgmail.py get MESSAGE_ID --format metadata\n\n# Get minimal response (IDs only)\npython scripts\u002Fgmail.py get MESSAGE_ID --format minimal\n```\n\n### Send Emails\n\n```bash\n# Send a simple email\npython scripts\u002Fgmail.py send --to \"user@example.com\" --subject \"Hello\" --body \"Message body\"\n\n# Send with CC and BCC\npython scripts\u002Fgmail.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\u002Fgmail.py send --to \"user@example.com\" --subject \"Hello\" --body \"Message\" \\\n  --from \"Mile9 Accounts \u003Caccounts@mile9.io>\"\n\n# Send HTML email\npython scripts\u002Fgmail.py send --to \"user@example.com\" --subject \"HTML Email\" \\\n  --body \"\u003Ch1>Hello\u003C\u002Fh1>\u003Cp>HTML content\u003C\u002Fp>\" --html\n```\n\n### Draft Management\n\n```bash\n# Create a draft\npython scripts\u002Fgmail.py create-draft --to \"user@example.com\" --subject \"Draft Subject\" \\\n  --body \"Draft content\"\n\n# Send an existing draft\npython scripts\u002Fgmail.py send-draft DRAFT_ID\n```\n\n### Modify Messages (Labels)\n\n```bash\n# Mark as read (remove UNREAD label)\npython scripts\u002Fgmail.py modify MESSAGE_ID --remove-label UNREAD\n\n# Mark as unread\npython scripts\u002Fgmail.py modify MESSAGE_ID --add-label UNREAD\n\n# Archive (remove from INBOX)\npython scripts\u002Fgmail.py modify MESSAGE_ID --remove-label INBOX\n\n# Star a message\npython scripts\u002Fgmail.py modify MESSAGE_ID --add-label STARRED\n\n# Unstar a message\npython scripts\u002Fgmail.py modify MESSAGE_ID --remove-label STARRED\n\n# Mark as important\npython scripts\u002Fgmail.py modify MESSAGE_ID --add-label IMPORTANT\n\n# Multiple label changes at once\npython scripts\u002Fgmail.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\u002Fgmail.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\u002F01\u002F01` | Emails after a date |\n| `before:2024\u002F12\u002F31` | 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\u002Fgmail.py search \"from:boss@company.com is:unread newer_than:1d\"\npython scripts\u002Fgmail.py search \"subject:urgent OR subject:important\"\npython scripts\u002Fgmail.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.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,116,858,"2026-05-16 13:20:43",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"效率工具","productivity","mdi-lightning-bolt-outline","文档处理、数据分析、自动化工作流",4,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"自动化","automation","mdi-robot-outline","工作流自动化、批处理",3,101,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"146cd786-add0-4402-acea-82de4cbfed0f","1.0.0","gmail-automation.zip",2127,"uploads\u002Fskills\u002F1ab3eb07-7bfd-48b8-b7aa-52a6b376cfde\u002Fgmail-automation.zip","369b4b6131c8696929fbd400a383097e06feee66ee8b763e24f9ceef893b4744","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":5313}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]