360 Secure SkillHub
360 安全技能中心

Daily Email Summary

调用 python3 脚本通过 Gmail API 获取默认 10 封未读邮件(支持 --count/--all),解析脚本 JSON 输出,为每封邮件生成发件人、主题、2-3 句要点摘要与建议动作,并以列表呈现。使用前需设置 GMAIL_CREDENTIALS_PATH 指向 OAuth 凭据文件。

bbdyno
bbdyno
热度 72.00
最近更新 2026-05-11 15:53:07
分类:协作依赖:代码执行 / 读写文件 / 第三方 API / 内部调用大模型应用场景:摘要总结 / 邮件起草

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add email-summary
Metadata
name
email-summary
description
Fetches recent emails from Gmail and provides concise summaries. Use when the user wants to check emails, get email summaries, or review their inbox.
homepage
https://github.com/yourusername/email-summary-skill
user-invocable
true
metadata
{"openclaw":{"requires":{"bins":["python3"],"env":["GMAIL_CREDENTIALS_PATH"]},"os":["darwin","linux","win32"]}}

Email Summary Skill

This skill fetches recent emails from your Gmail account and provides AI-powered summaries.

How it works

When invoked, this skill will:

  1. Authenticate with Gmail API using credentials at $GMAIL_CREDENTIALS_PATH
  2. Fetch recent emails (default: last 10 unread emails)
  3. Summarize each email with:
    • Sender and subject
    • Key points from the email body
    • Recommended actions or responses
  4. Present results in an organized, easy-to-scan format

Instructions for the Agent

When this skill is invoked:

  1. First, verify that the Gmail API credentials exist at the path specified in $GMAIL_CREDENTIALS_PATH environment variable
  2. Run the helper script located at {baseDir}/scripts/fetch_emails.py with the appropriate arguments:
    • Default: python3 {baseDir}/scripts/fetch_emails.py --count 10
    • With arguments: python3 {baseDir}/scripts/fetch_emails.py $ARGUMENTS
  3. Parse the JSON output from the script
  4. For each email, provide a concise summary including:
    • From: Sender name and email
    • Subject: Email subject line
    • Summary: 2-3 sentence summary of key points
    • Action: Suggested action (reply, archive, flag for follow-up, etc.)
  5. Present all summaries in a well-formatted list

Usage Examples

/email-summary

Fetches and summarizes the last 10 unread emails.

/email-summary --count 20

Fetches and summarizes the last 20 unread emails.

/email-summary --all

Fetches and summarizes all unread emails.

Setup Requirements

Before using this skill, ensure:

  • Gmail API credentials are configured
  • Environment variable GMAIL_CREDENTIALS_PATH points to your credentials JSON file
  • Python 3 and required packages are installed (see setup guide in README.md)