email-imap-full-fetch

Installation
SKILL.md

Email IMAP Full Fetch

Core Goal

  • Fetch one target email by stable message reference from IMAP.
  • Enforce lookup order: HEADER Message-Id exact match first, then uid fallback.
  • Download full raw MIME via BODY.PEEK[].
  • Parse and return headers, full text body, html body, and attachment metadata.
  • Save .eml and attachment files to disk with filename safety and idempotent indexing.

Standard Flow

  1. Input must include message_id_norm from stage-1 routing output (mail_ref.message_id_norm).
  2. Use fetch --message-id "<message_id_norm or raw Message-Id>" as the default path.
  3. Use fetch --uid "<uid>" only when no usable message-id is available.
  4. Keep mailbox selection consistent with stage-1 (--mailbox or IMAP_MAILBOX).
  5. Read JSON output and continue downstream processing with returned mail_ref.

Commands

Fetch by Message-Id (preferred):

Related skills

More from tiangong-ai/skills

Installs
56
GitHub Stars
6
First Seen
Feb 25, 2026