用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/earlyaidopters/claudeclaw --skill gmail命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | gmail |
| description | Manage your Gmail inbox from Claude Code. List, read, triage, reply, send, and create filters. |
| allowed-tools | Bash(CLAUDECLAW_DIR=* ~/.venv/bin/python3 ~/.config/gmail/gmail.py *) |
Read, triage, reply, and send emails from your Gmail inbox via Claude Code.
The Gmail CLI reads credential paths from environment variables, loaded from ClaudeClaw's .env via CLAUDECLAW_DIR. Every command MUST use this prefix:
CLAUDECLAW_DIR=/path/to/claudeclaw
Your .env should contain:
GOOGLE_CREDS_PATH=~/.config/gmail/credentials.json
GMAIL_TOKEN_PATH=~/.config/gmail/token.json
If these aren't set, the script falls back to ~/.config/gmail/credentials.json and ~/.config/gmail/token.json.
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py list --all
Returns JSON array grouped by thread. Each entry has: id, threadId, from, subject, date, snippet, unread, thread_count. If thread_count > 1, also includes all_ids.
This is the default command. Always use --all unless the user specifically asks for a time-filtered view.
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py list --hours 48
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py read <msg_id>
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py move <msg_id> "Label Name"
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py labels
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py reply <msg_id> "Your reply body here"
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py reply <msg_id> "Your reply body here" --attachments "/path/to/file1.pdf,/path/to/file2.png"
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py send "to@example.com" "Subject here" "Body here"
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py send "to@example.com" "Subject" "Body" --attachments "/path/to/file.pdf,/path/to/other.xlsx"
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py filter --from "sender@example.com" --label "LabelName" --archive --read
--from / --to / --subject / --query for criteria--label to apply a label, --archive to skip inbox, --read to mark as read, --trash to trashCLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py filters
CLAUDECLAW_DIR=/path/to/claudeclaw ~/.venv/bin/python3 ~/.config/gmail/gmail.py auth
list --all to show all inbox emailsmove for each, confirm resultsUse a proper markdown table for the inbox:
| # | Unread | From | Subject | Replies | Time |
|---|---|---|---|---|---|
| 1 | * | someone@example.com | Re: Project update | 3 | 2h ago |
| 2 | newsletter@co.com | Your weekly digest | 1 | 5h ago |
thread_count (1 = single message, 2+ = thread)If credentials.json is missing:
GOOGLE_CREDS_PATH (default: ~/.config/gmail/credentials.json)auth command (see above)credentials.json missing, show setup instructions abovetoken.json missing, run auth automatically