← Back to Skills Marketplace
ivangdavila

IMAP

by Iván · GitHub ↗ · v1.0.0 · MIT-0
linuxdarwinwin32 ✓ Security Clean
466
Downloads
1
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install imap
Description
Read, search, and sync IMAP mailboxes with UID-safe fetches, precise filters, and attachment-aware workflows.
README (SKILL.md)

When to Use

Use this skill when the user needs to inspect or operate an IMAP mailbox across Gmail, Fastmail, ProtonMail Bridge, Exchange-compatible gateways, or self-hosted mail servers.

Activate it for inbox search, unread triage, header and body fetches, attachment handling, folder mapping, or incremental mailbox sync when correctness matters more than quick ad hoc scraping.

Architecture

Memory lives in ~/imap/. If ~/imap/ does not exist, run setup.md. See memory-template.md for the default structure and file templates.

~/imap/
├── memory.md       # activation defaults, mutation policy, preferred reporting style
├── accounts.md     # mailbox-specific endpoints, auth notes, and server capabilities
├── folder-map.md   # canonical folder mapping and provider quirks
├── sync-state.md   # UIDVALIDITY, last UID, MODSEQ, and sync checkpoints
└── playbooks.md    # saved mailbox workflows and reusable search recipes

Quick Reference

Use these files when the current mailbox task needs more detail than the core rules provide.

Topic File
Setup and activation defaults setup.md
Memory and file templates memory-template.md
Session planning and discovery session-strategy.md
Search and fetch patterns search-and-fetch.md
State, flags, and sync rules state-and-flags.md
Attachment and MIME handling attachments.md
Failure diagnosis and provider quirks troubleshooting.md

Core Rules

1. Discover mailbox capabilities before making assumptions

  • Identify server capabilities, namespace layout, delimiter behavior, and special-use folders before building commands or interpreting results.
  • Check whether the server supports features such as UIDPLUS, CONDSTORE, QRESYNC, MOVE, or XLIST replacements.
  • Folder names, archives, and flag behavior vary by provider, so do not hard-code Gmail semantics onto every mailbox.

2. Default to read-safe operations unless the user clearly wants mutation

  • Start with safe inspection patterns such as capability discovery, folder listing, EXAMINE, header fetches, and targeted body retrieval.
  • Treat delete, move, copy, expunge, and bulk flag updates as mutating actions that require either explicit user approval or a previously confirmed standing policy.
  • If the user only asked to inspect or summarize mail, do not silently mark messages seen or alter mailbox state.

3. Use UIDs and durable sync markers, not volatile sequence numbers

  • Sequence numbers shift as mail arrives or is removed, so they are unsafe for persistent tracking.
  • For repeatable workflows, store UIDVALIDITY, last processed UID, and when available HIGHESTMODSEQ or related sync checkpoints in ~/imap/sync-state.md.
  • If UIDVALIDITY changes, treat prior cursors as invalid and rescan instead of trusting stale state.

4. Fetch the minimum data that answers the question

  • Start with folder listing, counts, flags, and envelope or header data before downloading full bodies or attachments.
  • Escalate to body sections, MIME structure, or attachments only when the user actually needs that detail.
  • Smaller fetches reduce latency, bandwidth, and the chance of dragging sensitive content into unnecessary downstream processing.

5. Search with explicit server-side filters and report what they mean

  • Prefer precise IMAP search constraints such as date ranges, sender, subject fragments, flags, size limits, or UID windows over broad mailbox scans.
  • Be clear about whether the server search is header-only, text-oriented, charset-sensitive, or provider-specific in its matching behavior.
  • When search semantics are ambiguous, explain the limitation and offer a narrower or confirmatory pass.

6. Treat MIME and attachments as structured data, not opaque blobs

  • Read BODYSTRUCTURE or equivalent metadata before assuming where text lives or which parts are attachments.
  • Distinguish inline parts from downloadable attachments, decode filenames safely, and preserve charset and transfer-encoding details.
  • Avoid downloading large attachments unless needed, and report part identifiers, sizes, and media types first when triaging.

7. Keep credentials out of skill memory and scope network use tightly

  • Store only non-secret connection notes, capabilities, and workflow preferences under ~/imap/.
  • Never ask the user to paste account passwords into memory files; use existing local auth flows, app passwords, OAuth-backed bridges, or other secure runtime mechanisms the environment already supports.
  • Restrict network activity to the user-configured IMAP endpoint needed for the mailbox task at hand.

IMAP Traps

  • Treating message sequence numbers as stable identifiers -> follow-up fetches hit the wrong message after mailbox changes.
  • Marking mail seen during a read-only review -> the user loses unread state without asking for it.
  • Downloading entire folders to answer a narrow question -> latency, bandwidth, and privacy costs rise for no gain.
  • Ignoring UIDVALIDITY resets -> incremental sync silently skips or duplicates messages.
  • Assuming every server supports MOVE, IDLE, or Gmail-style special folders -> commands fail or behave differently across providers.
  • Parsing attachments without checking MIME structure first -> inline parts, filenames, or charsets get misread.

External Endpoints

Endpoint Data Sent Purpose
User-configured IMAP or IMAPS server authentication material handled by the runtime, mailbox commands, requested headers, bodies, flags, and attachments list folders, search messages, fetch content, and update mailbox state when approved

No other data is sent externally.

Security & Privacy

Data that stays local:

  • Activation defaults, provider quirks, sync checkpoints, and reusable playbooks stored under ~/imap/
  • Mailbox notes the user explicitly wants remembered for future sessions

Data that leaves your machine:

  • Only the IMAP requests needed to talk to the configured mailbox server
  • Message metadata, bodies, or attachments fetched from that mailbox when the current task requires them

This skill does NOT:

  • store mailbox passwords or OAuth tokens in ~/imap/
  • assume mutating mailbox access is allowed by default
  • send mailbox content to undeclared third parties
  • treat sequence numbers as durable sync state

Trust

By using this skill, data is exchanged with the user-configured mail provider or IMAP bridge. Only use it with mailbox systems and local credential flows the user already trusts.

Related Skills

Install with clawhub install \x3Cslug> if user confirms:

  • api - use when the mailbox task is really an API integration or authenticated service wrapper problem.
  • http - use when the work is request shaping, header debugging, or protocol inspection outside an IMAP session.
  • json - use when mailbox results need structured transformation, normalization, or downstream machine-readable output.
  • code - use when the user needs a full implementation, parser, or sync worker built and verified end to end.
  • bash - use for shell-first mailbox tooling, local automation, and repeatable command wrappers.

Feedback

  • If useful: clawhub star imap
  • Stay updated: clawhub sync
Usage Guidance
This skill appears coherent and focused on IMAP tasks. It is low-risk because it is instruction-only and asks for no global credentials or installs. Before using: (1) decide whether you want persistent ~/imap/ state — disable memory if you prefer no disk traces; (2) never paste passwords or tokens into memory files; use OS/password-manager/OAuth/app-password flows as recommended; (3) keep the mutation policy set to read-only by default unless you explicitly need write actions (move/delete/expunge); and (4) be mindful that the skill will connect to whatever IMAP endpoint you provide, so only give it credentials for mailboxes you trust and on machines you control.
Capability Analysis
Type: OpenClaw Skill Name: imap Version: 1.0.0 The IMAP skill bundle provides a structured and security-focused framework for managing mailboxes. It includes explicit safeguards against credential theft by instructing the agent never to store passwords or tokens in local memory (SKILL.md, setup.md), defaults to read-only operations to prevent accidental data loss, and provides clear guidance on safe attachment handling (attachments.md). No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description match the instructions: everything in the SKILL.md and supporting docs is focused on IMAP discovery, safe fetches, MIME/attachment handling, and incremental sync. No unrelated services, binaries, or credentials are requested.
Instruction Scope
Runtime instructions are limited to IMAP operations and local bookkeeping under ~/imap/. The docs explicitly require capability discovery, UID-safe fetches, and conservative mutation gates. They also explicitly warn not to store passwords or secrets. The only filesystem access suggested is creation and use of ~/imap/ and its files.
Install Mechanism
No install spec and no bundled code — instruction-only. That minimizes on-disk code execution risk because nothing is downloaded or installed by the skill itself.
Credentials
The skill declares no required environment variables, no primary credential, and no config paths beyond ~/imap/. It expects the user to supply IMAP credentials at runtime via existing local auth flows (bridges, OAuth, app passwords) rather than embedding secrets in skill memory.
Persistence & Privilege
The skill persists operational context under ~/imap/ (account metadata, folder maps, sync checkpoints, playbooks). This is appropriate for an IMAP sync helper but means durable state (which may include message identifiers and sync cursors) will be written to the user's home directory if memory is enabled. The docs explicitly forbid storing passwords or OAuth tokens in memory files. The skill is not always-enabled and allows autonomous invocation (the platform default); autonomous invocation alone is not flagged but you should be aware the skill can run when permitted by the agent.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install imap
  3. After installation, invoke the skill by name or use /imap
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Built a deeper IMAP workflow for reliable mailbox review, incremental sync, safer flag handling, and attachment triage.
Metadata
Slug imap
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is IMAP?

Read, search, and sync IMAP mailboxes with UID-safe fetches, precise filters, and attachment-aware workflows. It is an AI Agent Skill for Claude Code / OpenClaw, with 466 downloads so far.

How do I install IMAP?

Run "/install imap" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is IMAP free?

Yes, IMAP is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does IMAP support?

IMAP is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux, darwin, win32).

Who created IMAP?

It is built and maintained by Iván (@ivangdavila); the current version is v1.0.0.

💬 Comments