Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计提醒

email-imap-fetch电子邮件 imap 获取

Agent Skill

email-imap-fetch 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,406

周安装

180

GitHub Stars

5

下载量

1,411
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tiangong-ai/skills --skill email-imap-fetch

简介

email-imap-fetch 监听新邮件并使用 IDLE 模式实时拉取未读消息。

  • 适用于监控多个邮箱账户的新邮件并及时转发至 OpenClaw Webhook。
  • 严格限制仅发送摘要与结构化引用,不传输完整正文或附件二进制内容。
  • 需配置 webhook URL 及账户认证信息,建议在隔离环境中运行以防数据泄露。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Email IMAP Fetch

Core Goal

  • Wait for new mail with IMAP IDLE.
  • Fetch unread messages after each wake-up.
  • Support multiple mailbox accounts configured with env.
  • Control IDLE support strictly with env mode (idle or poll) without runtime probing.
  • Forward each fetched email to OpenClaw webhooks.
  • Emit machine-readable JSON lines for downstream steps.
  • Keep this skill strictly in stage-1 routing mode: send snippet + structured refs only, never send full raw message body, and never send attachment binary/content.

Workflow

  1. Configure account env variables and OpenClaw webhook env variables (see references/env.md and assets/config.example.env).
  2. Validate configuration:
python3 scripts/imap_idle_fetch.py check-config
  1. Run one IDLE cycle per account (smoke test):
python3 scripts/imap_idle_fetch.py listen --cycles 1 --idle-seconds 120 --max-messages 10
  1. Run continuously (default resident mode):
python3 scripts/imap_idle_fetch.py listen

Runtime Model

  • Skill files are installed locally, but the listener is not auto-started.
  • In idle mode, IMAP IDLE receives push events only while listener process and IMAP connection are alive.
  • In poll mode, listener sleeps for poll interval and then fetches unread messages.
  • If the process exits, push events are missed; next run can still fetch existing unread emails with UNSEEN.
  • Default runtime is resident mode (IMAP_CYCLES=0 by default).
  • Default IDLE mode is poll (safe for servers without IDLE support).
  • In production, always-on deployment must run under systemd, launchd, supervisor, or an equivalent daemon manager.
  • Do not run the listener as a foreground process bound to an interactive exec session; once that session exits, the listener will stop.

Output Contract

  • Output format is JSONL (one JSON object per line).
  • type=status for lifecycle events.
  • type=message for fetched emails with:

- account, mailbox, seq, uid - subject, from, to, date - message_id_raw, message_id_norm (and compatibility field message_id) - snippet (plain-text preview only) - attachment_count, attachment_manifest (summary only, no attachment content) - mail_ref machine-readable object (account, mailbox, uid, message_id_raw, message_id_norm, date)

  • Webhook message includes two fixed machine-readable blocks for deterministic dispatch extraction:

- <<<MAIL_REF_JSON>>>... <<<END_MAIL_REF_JSON>>> - <<<ATTACHMENT_MANIFEST_JSON>>>... <<<END_ATTACHMENT_MANIFEST_JSON>>>

  • wait_mode is idle or poll in cycle status output.
  • wait_events records the active wait strategy details.
  • event=webhook_delivered status events when OpenClaw webhook POST succeeds.
  • type=error for account-level failures.
  • event=webhook_failed error events when OpenClaw webhook POST fails.

Parameters

  • --cycles: IDLE cycles per account (0 means forever).
  • --idle-seconds: max wait time for each IDLE call.
  • --poll-seconds: interval used when polling mode is active.
  • --idle-mode: idle or poll.
  • --max-messages: max unread emails fetched each cycle.
  • --mark-seen / --no-mark-seen: control unread state updates.
  • --snippet-chars: preview length limit.
  • --connect-timeout: connection timeout seconds.
  • --retry-seconds: retry delay after failure.

Environment defaults:

  • IMAP_CYCLES
  • IMAP_IDLE_MODE
  • IMAP_IDLE_SECONDS
  • IMAP_POLL_SECONDS
  • IMAP_MAX_MESSAGES
  • IMAP_MARK_SEEN
  • IMAP_SNIPPET_CHARS
  • IMAP_CONNECT_TIMEOUT
  • IMAP_RETRY_SECONDS

OpenClaw webhooks forwarding:

  • OPENCLAW_WEBHOOKS_ENABLED
  • OPENCLAW_WEBHOOKS_TOKEN
  • OPENCLAW_WEBHOOKS_BASE_URL
  • OPENCLAW_WEBHOOKS_MODE (agent or wake)
  • OPENCLAW_WEBHOOKS_ENDPOINT (optional endpoint override)
  • OPENCLAW_WEBHOOKS_PATH
  • OPENCLAW_WEBHOOKS_WAKE_MODE
  • OPENCLAW_WEBHOOKS_DELIVER
  • OPENCLAW_WEBHOOKS_TIMEOUT
  • OPENCLAW_WEBHOOKS_NAME
  • OPENCLAW_WEBHOOKS_AGENT_ID
  • OPENCLAW_WEBHOOKS_CHANNEL
  • OPENCLAW_WEBHOOKS_TO
  • OPENCLAW_WEBHOOKS_MODEL
  • OPENCLAW_WEBHOOKS_THINKING
  • OPENCLAW_WEBHOOKS_AGENT_TIMEOUT_SECONDS
  • OPENCLAW_WEBHOOKS_SESSION_KEY_PREFIX

Error Handling

  • Invalid env configuration exits with code 2.
  • In idle mode, unsupported IDLE returns explicit error and suggests IMAP_IDLE_MODE=poll.
  • Runtime failures are emitted as type=error.
  • Command exits non-zero when account processing errors occur.

References

  • references/env.md

Assets

  • assets/config.example.env

Scripts

  • scripts/imap_idle_fetch.py

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.67%
按下载量换算461

Claude

31.72%
按下载量换算448

Cursor

16.98%
按下载量换算240

Gemini CLI

9.65%
按下载量换算136

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills