Mail for Openclaw

A high-performance email management skill utilizing the himalaya CLI and macOS SQLite for secure, platform-optimized mail operations.

ivangdavila
v1.2.0
Feb 16, 2026
4
4.7k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install mail

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install mail using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Mail?

The Mail skill is a sophisticated integration for AI agents designed to handle email workflows with a focus on speed, security, and cross-platform compatibility. It provides a dual-engine approach: on macOS, it leverages direct SQLite queries against the Apple Mail database for 100x faster read performance, while offering universal IMAP/SMTP support through the himalaya CLI. This skill is a core part of the Openclaw Skills library, enabling developers to build intelligent assistants that can summarize threads, draft replies, and organize folders.

Security is at the heart of the Mail skill. It utilizes system-level credential management, such as the macOS Keychain, and strictly adheres to a draft-review-send protocol. This ensures that no emails are ever sent or deleted without explicit user confirmation, making it a reliable choice for professional environments where data integrity and privacy are paramount.

Mail Use Cases

  • Rapidly retrieve and summarize recent communications by querying the local Apple Mail SQLite index.
  • Compose professional replies with full thread intelligence using proper In-Reply-To and References headers.
  • Automate the search and filtering of large mailboxes using JSON-structured data for precise information extraction.
  • Monitor specific IMAP folders in real-time for incoming triggers or notifications using the himalaya watch command.
  • Securely manage multiple email accounts across macOS and Linux using a unified CLI-driven workflow.

How Mail Works

  1. The skill detects the host operating system to determine whether to use the Apple Mail SQLite optimization or the himalaya CLI interface.
  2. For read operations on macOS, the skill triggers a background sync via osascript to ensure the SQLite data reflects the current state of the inbox.
  3. It executes structured queries or CLI commands with the --output json flag to retrieve email envelopes and metadata.
  4. When a user requests to send an email, the skill generates a draft and presents the full content for human review.
  5. Once confirmed, the message is dispatched via the configured SMTP server, ensuring the From header aligns with authenticated credentials.

Mail Setup

To utilize this skill within the Openclaw Skills framework, you must first install the necessary binaries. On macOS, you can use Homebrew, while Linux users can use Cargo:

# Install himalaya CLI
brew install himalaya

# Or via Cargo
cargo install himalaya

For secure credential handling on macOS, store your App Password in the Keychain:

security add-internet-password -s imap.gmail.com -a [email protected] -w 'your-app-password'

Ensure your configuration is defined in ~/.config/himalaya/config.toml to enable seamless IMAP and SMTP access.

Mail Data Schema & Taxonomy

The Mail skill interacts with local databases and CLI outputs to manage email data efficiently. Below is the primary data structure layout:

Component Path / Command Data Type
Mail Index ~/Library/Mail/V*/MailData/Envelope Index SQLite Database
Message Content himalaya message read [id] Text/HTML/MIME
Metadata List himalaya envelope list -o json JSON Array
Attachments ~/Library/Mail/V*/MAILBOX/Messages/ Binary Files

The system utilizes a strict mapping of message_id to addresses to ensure sender lookup accuracy and thread consistency.

Mail Advanced Features

  • Advanced platform detection that switches between high-speed SQLite queries and cross-platform CLI tools.
  • Robust draft-review-send workflow preventing unintended automated outgoing communications.
  • Support for XOAUTH2 via the token_cmd configuration for modern, secure authentication.
  • Thread intelligence that maintains conversation chains through header analysis rather than fragile subject matching.
  • Real-time folder monitoring capabilities via the himalaya envelope watch feature for proactive agent responses.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*