mailExecute email operations with platform-specific optimizations and secure credential handling.
Install via ClawdBot CLI:
clawdbot install ivangdavila/mailmacOS: Use Apple Mail SQLite queries (100x faster than AppleScript).
Cross-platform: Use himalaya CLI for full IMAP/SMTP operations.
Never mix approaches in same task. Commit to one to avoid state conflicts.
Query path: ~/Library/Mail/V*/MailData/Envelope\ Index
Key tables: messages (subject, sender, date_received), addresses, mailboxes.
Force sync first: osascript -e 'tell app "Mail" to check for new mail'. SQLite reads stale data otherwise.
Recent mail filter: WHERE date_received > strftime('%s','now','-7 days')
Join pattern: messagesโaddresses on message_id for sender lookup.
Attachments: Check messages.attachment_count > 0, files in ~/Library/Mail/V*/MAILBOX/Messages/.
Install: cargo install himalaya or brew install himalaya.
Always use: --output json flag for programmatic parsing.
List emails: himalaya envelope list -o json (NOT message list).
Folder operations: himalaya message move - folder names are case-sensitive.
Cache refresh: Run himalaya folder list after server-side folder changes.
Draft-review-send workflow: Compose โ show user full content โ send after explicit OK.
Reply threading: Include In-Reply-To and References headers or thread breaks.
himalaya send: himalaya message send reads RFC 2822 from stdin.
SMTP rejection: Some servers reject if From header doesn't match authenticated user.
macOS Keychain: security add-internet-password -s imap.gmail.com -a user@gmail.com -w 'app-password'
Gmail/Google Workspace: Requires App Password with 2FA enabled, NOT regular password.
OAuth tokens: himalaya supports XOAUTH2 via token_cmd in config.toml.
Thread by In-Reply-To chain, not subject matching. "Re:" prefix is unreliable.
Polling intervals: 15-30 min max. Use himalaya envelope watch for real-time when available.
Generated Mar 1, 2026
Automate sorting and prioritizing incoming customer support emails by platform, using Apple Mail SQLite for fast macOS queries or himalaya for cross-platform IMAP. Filter recent emails from the past 7 days, check for attachments, and route them to appropriate folders based on sender or content, ensuring timely responses and reducing manual workload.
Manage bulk email campaigns for sales teams by leveraging himalaya CLI to send personalized emails with proper threading via In-Reply-To headers. Use draft-review-send workflow to ensure content accuracy, handle SMTP authentication with app passwords or OAuth, and track responses in real-time with polling intervals to optimize follow-ups.
Securely archive and retrieve legal correspondence by querying Apple Mail SQLite on macOS for fast access to messages, sender details, and attachments stored in local mailboxes. Force sync before queries to avoid stale data, and use joins to link messages with addresses for audit trails, ensuring compliance and efficient document management.
Facilitate cross-platform email coordination for distributed teams using himalaya for IMAP operations with JSON output for programmatic parsing. Automate folder operations to organize project emails, refresh cache after server changes, and implement thread intelligence based on In-Reply-To chains to maintain coherent discussions across different email clients.
Execute targeted email marketing campaigns by sending newsletters via himalaya's RFC 2822-compliant send protocol, ensuring proper headers to avoid SMTP rejection. Use credential management with OAuth tokens or app passwords for secure authentication, and monitor delivery with envelope watch for real-time feedback to optimize engagement rates.
Offer a SaaS platform that integrates this skill for automated email handling, charging monthly fees based on usage tiers. Provide features like cross-platform support, advanced threading, and secure credential storage, targeting small businesses needing efficient email management without IT overhead.
Develop a premium service leveraging the skill's security protocols and SQLite optimizations for large organizations. Focus on audit trails, attachment management, and compliance with data regulations, selling annual contracts with customization and support for industries like finance or healthcare.
Create a desktop or mobile app using this skill for personal and professional email optimization. Offer basic features for free, such as fast macOS queries or simple himalaya operations, and monetize through in-app purchases for advanced capabilities like real-time polling, OAuth integration, or bulk sending tools.
๐ฌ Integration Tip
Always force sync Apple Mail before SQLite queries to avoid stale data, and use himalaya's JSON output flag for seamless parsing in automated workflows.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
Perform a comprehensive read-only security audit of Clawdbot's own configuration. This is a knowledge-based skill that teaches Clawdbot to identify hardening opportunities across the system. Use when user asks to "run security check", "audit clawdbot", "check security hardening", or "what vulnerabilities does my Clawdbot have". This skill uses Clawdbot's internal capabilities and file system access to inspect configuration, detect misconfigurations, and recommend remediations. It is designed to be extensible - new checks can be added by updating this skill's knowledge.
Use when reviewing code for security vulnerabilities, implementing authentication flows, auditing OWASP Top 10, configuring CORS/CSP headers, handling secrets, input validation, SQL injection prevention, XSS protection, or any security-related code review.
Security check for ClawHub skills powered by Koi. Query the Clawdex API before installing any skill to verify it's safe.
Scan Clawdbot and MCP skills for malware, spyware, crypto-miners, and malicious code patterns before you install them. Security audit tool that detects data exfiltration, system modification attempts, backdoors, and obfuscation techniques.