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-Idexact match first, thenuidfallback. - Download full raw MIME via
BODY.PEEK[]. - Parse and return headers, full text body, html body, and attachment metadata.
- Save
.emland attachment files to disk with filename safety and idempotent indexing.
Standard Flow
- Input must include
message_id_normfrom stage-1 routing output (mail_ref.message_id_norm). - Use
fetch --message-id "<message_id_norm or raw Message-Id>"as the default path. - Use
fetch --uid "<uid>"only when no usable message-id is available. - Keep mailbox selection consistent with stage-1 (
--mailboxorIMAP_MAILBOX). - Read JSON output and continue downstream processing with returned
mail_ref.
Commands
Fetch by Message-Id (preferred):