with one click
gws-gmail
Gmail 邮件:搜索/阅读/发送/管理。不用于:其他邮箱、Telegram 消息
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Gmail 邮件:搜索/阅读/发送/管理。不用于:其他邮箱、Telegram 消息
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use when the user asks to create, edit, improve, redesign, beautify, inspect, or export PowerPoint decks, PPT files, slide decks, keynotes, or .pptx deliverables. Prefer this skill for presentation work that must produce a real PPTX file, especially when visual quality, editable text, brand assets, charts, or export verification matter. Do not use for Word documents or PDFs.
Markdown 转微信公众号排版并发布草稿。Use this whenever the user asks to convert Markdown to WeChat Official Account HTML, inspect publish readiness, preview local WeChat layout, or create a WeChat draft. 不用于:写文章内容、其他平台发布。
视频字幕提取、翻译、双语合并、烧录。不用于:纯音频转文字、翻译文本文件、视频剪辑
下载视频/音频(YouTube、B站、Twitter等)。不用于:网页抓取(用 web_fetch)、直播录制
AI图片生成(文生图、图生图、去背景、放大),需本地 ComfyUI。不用于:截图、网页抓图、非AI图片处理
创建自定义技能(SKILL.md)。不用于:执行已有技能、修改代码、一次性脚本
| name | gws-gmail |
| description | Gmail 邮件:搜索/阅读/发送/管理。不用于:其他邮箱、Telegram 消息 |
Requires: gws CLI installed and authenticated (gws auth login).
gws gmail <resource> <method> --params '{"key":"val"}' --json '{"key":"val"}'
userId is always "me" for the authenticated user.
{"command": "gws gmail users messages list --params '{\"userId\":\"me\",\"maxResults\":10}'", "timeout": 30000}
{"command": "gws gmail users messages list --params '{\"userId\":\"me\",\"q\":\"from:alice@example.com subject:report\",\"maxResults\":10}'", "timeout": 30000}
Gmail search syntax: from:, to:, subject:, after:2026/03/01, before:, is:unread, has:attachment, label:, in:sent.
{"command": "gws gmail users messages get --params '{\"userId\":\"me\",\"id\":\"MESSAGE_ID\",\"format\":\"full\"}'", "timeout": 30000}
Formats: full (headers + body), metadata (headers only), minimal (IDs only).
Build a base64url-encoded RFC 2822 message and use users.messages.send.
IMPORTANT: If the Subject contains non-ASCII characters (Chinese, Japanese, etc.), you MUST encode it using RFC 2047 MIME encoded-word syntax: =?UTF-8?B?<base64>?=. Use echo -n 'subject text' | base64 -w 0 to get the base64, then wrap it as =?UTF-8?B?...?=. ASCII-only subjects can be used as-is.
Example (ASCII subject):
{"command": "echo -e 'From: me\\nTo: alice@example.com\\nSubject: Hello\\nContent-Type: text/plain; charset=utf-8\\n\\nHello Alice!' | base64 -w 0 | tr '+/' '-_' | tr -d '=' | xargs -I {} gws gmail users messages send --params '{\"userId\":\"me\"}' --json '{\"raw\":\"{}\"}'", "timeout": 30000}
Example (non-ASCII subject):
{"command": "SUBJ=$(echo -n '报告标题' | base64 -w 0) && echo -e \"From: me\\nTo: alice@example.com\\nSubject: =?UTF-8?B?${SUBJ}?=\\nContent-Type: text/plain; charset=utf-8\\n\\nHello!\" | base64 -w 0 | tr '+/' '-_' | tr -d '=' | xargs -I {} gws gmail users messages send --params '{\"userId\":\"me\"}' --json '{\"raw\":\"{}\"}'", "timeout": 30000}
{"command": "gws gmail users labels list --params '{\"userId\":\"me\"}'", "timeout": 30000}
{"command": "gws gmail users messages modify --params '{\"userId\":\"me\",\"id\":\"MESSAGE_ID\"}' --json '{\"removeLabelIds\":[\"UNREAD\"]}'", "timeout": 30000}
Archive (remove INBOX label):
{"command": "gws gmail users messages modify --params '{\"userId\":\"me\",\"id\":\"MESSAGE_ID\"}' --json '{\"removeLabelIds\":[\"INBOX\"]}'", "timeout": 30000}
{"command": "gws gmail users messages trash --params '{\"userId\":\"me\",\"id\":\"MESSAGE_ID\"}'", "timeout": 30000}
{"command": "gws schema gmail.users.messages.list", "timeout": 15000}
"me".get with format: full to read content.raw field.q parameter for filtering.users messages attachments get after reading the message to get attachment metadata.