Token导航 LogoToken导航

Agent Skill · 研究检索

gmail-integration(Gmail 集成)

gmail-integration 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gmail-integration 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 45,663。

总安装 832周安装 34GitHub Stars 93下载 269核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gmail-integration(Gmail 集成)
来源仓库:https://github.com/letta-ai/skills
仓库路径:skills/gmail-integration
安装命令:
npx skills add https://github.com/letta-ai/skills --skill gmail-integration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill gmail-integration

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

gmail-integration 用于查找、检索和筛选相关信息,支持关键词匹配。适用于 Codex、Claude、Cursor、Gemini CLI 中的信息定位需求。结合来源仓库和原始 README 可进一步核验具体用法。

安装命令:npx skills add https://github.com/letta-ai/skills --skill gmail-integration。建议确认权限范围和维护状态,避免触发联网或文件操作。

来源仓库内路径:skills/gmail-integration

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/letta-ai/skills --skill gmail-integration;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gmail-integration 怎么安装?

在终端执行 npx skills add https://github.com/letta-ai/skills --skill gmail-integration。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gmail-integration 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gmail-integration 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

gmail-integration 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

gmail-integration 用的人多吗?

公开数据是累计安装 832 次,近一周安装 34 次,下载 269 次,GitHub 93 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gmail-integration 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
gmail-integration

Gmail 集成 · 本页

83293接触敏感数据MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Gmail Integration

This skill enables Gmail integration via the Google Gmail API with OAuth 2.0 authentication. It provides scripts for searching emails, reading content, creating drafts, finding emails needing replies, and archiving messages.

Prerequisites

Before using this skill, ensure:

  1. Python 3.10+ is available
  2. A Google Cloud project with Gmail API enabled
  3. OAuth 2.0 credentials (credentials.json) downloaded
  4. Required packages installed: google-api-python-client, google-auth-httplib2, google-auth-oauthlib

OAuth Setup Walkthrough

If the user hasn't set up Gmail API access yet, guide them through these steps:

Step 1: Create Google Cloud Project

  1. Go to https://console.cloud.google.com/
  2. Create a new project or select existing one
  3. Navigate to APIs & Services → Library
  4. Search for "Gmail API" and click Enable

Step 2: Configure OAuth Consent Screen

  1. Go to APIs & Services → OAuth consent screen
  2. Select External user type
  3. Fill in app name and support email
  4. Add scopes:

- https://www.googleapis.com/auth/gmail.readonly - https://www.googleapis.com/auth/gmail.compose - https://www.googleapis.com/auth/gmail.modify (for archiving/labeling)

  1. Add user's email as a test user
  2. Save and continue

Step 3: Create OAuth Credentials

  1. Go to APIs & Services → Credentials
  2. Click Create Credentials → OAuth client ID
  3. Select Desktop app as application type
  4. Download JSON and rename to credentials.json
  5. Place in project directory

Step 4: Install Dependencies

uv add google-api-python-client google-auth-httplib2 google-auth-oauthlib
# or
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib

Step 5: First Authentication

Run any script (e.g., search_emails.py) - it will open a browser for OAuth consent. After authorization, a token.json is saved for future use.

Email Operations

All scripts are in the scripts/ directory. They share authentication logic and expect credentials.json in the same directory (or path specified via --credentials).

Search Emails

python scripts/search_emails.py "from:someone@example.com" --max-results 10
python scripts/search_emails.py "subject:meeting after:2024/01/01"
python scripts/search_emails.py "is:unread"
python scripts/search_emails.py "in:inbox" --json  # Output as JSON

Read Email

python scripts/read_email.py <message_id>
python scripts/read_email.py <message_id> --format full  # includes attachments info

Create Draft

# New email
python scripts/create_draft.py --to "recipient@example.com" --subject "Hello" --body "Message content"
python scripts/create_draft.py --to "a@example.com" --cc "b@example.com" --subject "Update" --body-file message.txt

# HTML email with links
python scripts/create_draft.py --to "recipient@example.com" --subject "Hello" --body "<a href='https://example.com'>link</a>" --html

# IMPORTANT: Reply in same thread (required for proper threading!)
python scripts/create_draft.py --to "person@email.com" --subject "Re: Original Subject" \
  --reply-to "<message-id-header@mail.gmail.com>" \
  --thread-id "thread_id_here" \
  --body "Your reply"

⚠️ Threading replies: To reply in the same email thread (not create a new conversation), you MUST include:

  • --reply-to: The Message-ID header from the email you're replying to
  • --thread-id: The Gmail thread ID

To get these values, read the email with read_email.py and check the message metadata, or use this Python snippet:

msg_data = service.users().messages().get(userId="me", id=msg_id, format="metadata", metadataHeaders=["Message-ID"]).execute()
thread_id = msg_data.get("threadId")
message_id_header = next(h["value"] for h in msg_data["payload"]["headers"] if h["name"] == "Message-ID")

Find Emails Needing Reply

Identifies emails where you haven't replied, or your only reply is an unsent draft:

python scripts/needs_reply.py                          # Check inbox for emails needing reply
python scripts/needs_reply.py --max-results 30         # Check more emails
python scripts/needs_reply.py --query "is:important"   # Filter to important emails
python scripts/needs_reply.py --json                   # Output as JSON
python scripts/needs_reply.py --include-automated      # Include newsletters/notifications

Important: By default, needs_reply.py automatically filters out automated/notification emails:

  • Emails from noreply@, notifications@, alerts@, etc.
  • Emails with List-Unsubscribe headers (newsletters)
  • Common SaaS notification patterns (monitoring, dev tools, finance, calendar, etc.)

Use --include-automated to see all emails including these.

Status indicators:

  • 🔴 UNREAD - New email you haven't read
  • 📝 DRAFT UNSENT - You started a reply but never sent it
  • ⏳ NEEDS REPLY - Read but not replied to

Archive Emails

Archive emails by removing the INBOX label (requires gmail.modify scope):

service.users().messages().modify(
    userId="me",
    id=msg_id,
    body={"removeLabelIds": ["INBOX"]}
).execute()

For bulk archiving, use batch requests (max 100 per batch):

batch = service.new_batch_http_request()
for msg in messages[:50]:  # Keep under 100 limit
    batch.add(service.users().messages().modify(
        userId="me", id=msg["id"], body={"removeLabelIds": ["INBOX"]}
    ))
batch.execute()

Common Workflows

Find and reply to an email (properly threaded)

  1. Search for the email: search_emails.py "from:person subject:topic" --json
  2. Get the message ID from results, then read it: read_email.py <message_id>
  3. Get threading info (thread_id and Message-ID header) from the email metadata
  4. Create a threaded draft reply: create_draft.py --to "person@email.com" --subject "Re: topic" \ --reply-to "<Message-ID-header>" --thread-id "<thread_id>" \ --body "Your reply"

Find emails needing reply

  1. Run: needs_reply.py --max-results 30
  2. Review emails marked as 🔴 UNREAD, 📝 DRAFT UNSENT, or ⏳ NEEDS REPLY
  3. For each email needing reply, get its thread_id and Message-ID, then draft a threaded response

Inbox triage (complete workflow)

  1. Run needs_reply.py --max-results 50 to get all emails needing attention
  2. Filter out noise - Identify and archive:

- Newsletters (from: noreply, notifications, news@, etc.) - Receipts and invoices (from: receipts@, invoice@) - Automated alerts (from: alerts@, alert@) - Marketing emails (promotions, etc.) - Transaction notifications (banking, expense tools)

  1. Categorize real emails:

- 📝 DRAFT UNSENT - You started but didn't send (finish or delete draft) - 🔴 UNREAD from real people - Read and respond - ⏳ NEEDS REPLY - Prioritize by importance

  1. Draft threaded responses (always use --reply-to and --thread-id)
  2. Archive remaining notifications in bulk

Identifying newsletters vs real emails

Common newsletter/notification patterns to archive:

  • from:noreply or from:no-reply
  • from:notifications@ or from:alerts@
  • from:news@ or from:newsletter@
  • from:*@substack.com (newsletters)
  • from:receipts@ or from:invoice@
  • from:*@stripe.com (payment receipts)
  • Monitoring: Datadog, PlanetScale, Better Stack, etc.

Drafting Emails Best Practices

When drafting emails:

  • Always use HTML format (--html) when including links
  • Hyperlink text like "here" rather than showing raw URLs
  • Include proper threading with --reply-to and --thread-id for replies
  • Consider creating a memory block to store the user's email style preferences (greeting, signature, tone)

Search Query Syntax

For complex searches, see reference/search_operators.md for Gmail search operators.

Common operators:

  • from: / to: - Filter by sender/recipient
  • subject: - Search in subject line
  • is:unread / is:read - Filter by read status
  • in:inbox / in:sent / in:drafts - Filter by location
  • after: / before: - Date filters (YYYY/MM/DD format)
  • has:attachment - Emails with attachments
  • larger: / smaller: - Filter by size

API Limits & Gotchas

  • Batch request limit: Max 100 requests per batch (use 50 to be safe)
  • Rate limits: Gmail API has daily quotas; batch operations help stay under limits
  • Threading gotcha: Drafts without --reply-to and --thread-id create NEW threads, not replies
  • Draft detection: Unsent drafts don't count as replies - needs_reply.py handles this correctly
  • Token expiry: Tokens auto-refresh, but if authentication fails, delete token.json and re-auth

Security Notes

  • credentials.json contains OAuth client secrets - do not commit to version control
  • token.json contains access tokens - do not share or commit
  • Add both to .gitignore
  • Tokens can be revoked at https://myaccount.google.com/permissions

平台分布

Claude Code

26.46%
按下载量换算71

OpenCode

24.77%
按下载量换算67

Gemini CLI

16.08%
按下载量换算43

windsurf

13.02%
按下载量换算35

Cursor

8.56%
按下载量换算23

Antigravity

3.42%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills