用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/luokai0/ai-agent-skills-by-luo-kai --skill gmail-summarize命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | gmail-summarize |
| description | Fetch recent unread Gmail (yesterday + today) and send a digest to the user. |
| metadata | {"skill":{"emoji":"📬","requires":{"runtime":"python3","env_vars":{"required":["IMAP_USERNAME","IMAP_PASSWORD"],"optional":["IMAP_HOST","IMAP_PORT","IMAP_MAX_BODY_CHARS","EMAIL_CONFIG_PATH"]},"credentials":["IMAP_USERNAME (env, required) — IMAP login username","IMAP_PASSWORD (env, required) — IMAP login password / app-password","IMAP_HOST (env, optional, default: imap.gmail.com)","IMAP_PORT (env, optional, default: 993)"],"config":"$EMAIL_CONFIG_PATH or ~/.config/gmail-summarize/config.json (used only when IMAP_USERNAME/IMAP_PASSWORD env vars are absent)","config_fields":["email.imapHost","email.imapPort","email.imapUsername","email.imapPassword"],"external_connections":["IMAP server specified in IMAP_HOST or email.imapHost"]}}} |
python command).| Variable | Description | Default |
|---|---|---|
IMAP_HOST | IMAP server hostname | imap.gmail.com |
IMAP_PORT | IMAP server port | 993 |
IMAP_USERNAME | IMAP login username | (required) |
IMAP_PASSWORD | IMAP login password / app-password | (required) |
IMAP_MAX_BODY_CHARS | Max body characters per email | 2000 |
Set EMAIL_CONFIG_PATH to point to a JSON file, or place the file at ~/.config/gmail-summarize/config.json.
The file must contain only the fields below (no other sensitive data should be stored in this file):
{
"email": {
"imapHost": "imap.gmail.com",
"imapPort": 993,
"imapUsername": "your@gmail.com",
"imapPassword": "your-app-password",
"maxBodyChars": 2000
}
}
IMAP_HOST, IMAP_PORT, IMAP_USERNAME, IMAP_PASSWORD) so no file on disk is read at all.email fields listed above. The script reads only those four fields and nothing else from the file.IMAP_HOST / email.imapHost. No other endpoints are contacted.Run the fetch script via exec tool:
python {workspace}/skills/gmail-summarize/scripts/fetch_unseen.py
(replace {workspace} with your actual workspace root)
Parse the JSON array. Each item has: sender, subject, date, body
For each email compose one line:
[date] sender | subject — one-sentence body summary
Send the full digest via MessageTool in this format:
📬 邮件摘要 (N封,覆盖 MM/DD–MM/DD)
• [日期] 发件人 | 主题 — 一句话摘要 • [日期] 发件人 | 主题 — 一句话摘要 ...
If result is empty, send: 📭 近两日暂无未读邮件