jmap-email
Skill5 starsChanged 10 months agoMITView on GitHub
Enables JMAP email operations using Node.js and jmap-jam library. Use when working with JMAP email servers, FastMail, Cyrus IMAP, Stalwart Mail Server, or when user mentions email search, reading, sending, or mailbox management.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
All scripts support --help for detailed usage.
- Very specific: line 57
Search for candidates: search-keywords.ts "keyword1" "keyword2"
- Very specific: line 66
Use list-emails.ts --limit 20 to get batch (optionally add --unread or --mailbox "Inbox")
- Distinctive: line 70
Use AskUserQuestion with multiSelect for each email
- Very specific: line 76
Use move-by-ids.ts --mailbox <name> <id1> <id2> ...
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
JMAP Email Access
Access JMAP email servers (FastMail, Cyrus IMAP, Stalwart) using pre-built scripts.
Prerequisites
Environment variables must be set before launching Claude Code:
JMAP_SESSION_URL- JMAP server session URLJMAP_BEARER_TOKEN- Authentication bearer tokenJMAP_ACCOUNT_ID- Account ID (optional, auto-detected)
Available Scripts
Choose the right script:
- Browse recent emails? → Use
list-emails.ts(supports --unread, --flagged, --mailbox, --from, --limit filters) - Search by sender? → Use
list-emails.ts --from "sender@example.com" - Search for multiple keywords? → Use
search-keywords.ts keyword1 keyword2 ... - Get full email content? → Use
get-email.tswith email ID - View folder structure? → Use
list-mailboxes.ts - Move emails by ID? → Use
move-by-ids.ts --mailbox <name> <id1> <id2> ... - Delete emails? → Use
delete-emails.ts <id1> <id2> ...
All scripts support --help for detailed usage.
Common Tasks
Browse unread emails
node scripts/list-emails.ts --unread
node scripts/list-emails.ts --unread --limit 50Find emails from specific sender
node scripts/list-emails.ts --from "sender@example.com"
node scripts/list-emails.ts --from "sender@example.com" --unreadSearch for receipts or specific content
node scripts/search-keywords.ts "invoice" "receipt" "order confirmation"
node scripts/search-keywords.ts --mailbox "Archive" --limit 10 "meeting" "agenda"Note: Search shows previews only. For full email content, use get-email.ts with the email ID.
Get full email content
node scripts/get-email.ts <email-id>Organize emails (classification workflow)
- Search for candidates:
search-keywords.ts "keyword1" "keyword2" - Review previews and identify relevant email IDs
- (Optional) View full content:
get-email.ts <email-id> - Move to target mailbox:
move-by-ids.ts --mailbox @MailboxName id1 id2 id3
Interactive email triage
Workflow for processing new emails with learning:
- Fetch recent emails:
- Use
list-emails.ts --limit 20to get batch (optionally add--unreador--mailbox "Inbox") - Review subject, sender, and preview
- Use
- Present classification options:
- Use AskUserQuestion with multiSelect for each email
- Options should be target mailboxes (Inbox, Archive, @Reference, etc.)
- Allow user to select destination for each email
- Execute moves:
- Group emails by target mailbox
- Use
move-by-ids.ts --mailbox <name> <id1> <id2> ...for each group
- Save routing patterns to memory:
- Note sender domains and subjects that map to specific mailboxes
- Record user's classification decisions (e.g., "newsletters from X → Archive")
- Reference these patterns in future triage sessions
- Suggest automatic routing rules based on observed patterns
Benefits:
- Process inbox in batches with interactive guidance
- Build up routing knowledge over time
- Suggest classifications based on past decisions
- Gradually automate common routing patterns
View mailbox structure
node scripts/list-mailboxes.tsOutput Format
Scripts output compact, human-readable results:
Found 5 email(s) (unread)
================================================================================
⭐ [UNREAD] Meeting tomorrow
From: John Doe <john@example.com>
Date: 1/15/2024, 10:30:45 AM
ID: StrgucNsyw-3
Preview: Hi Jane, let's meet at 2pm to discuss the project...
--------------------------------------------------------------------------------Advanced Usage
For writing custom JMAP operations or understanding the API, see:
- Code Examples: examples.md
- API Reference: reference.md
- Development Guide: DEVELOPMENT.md
In this repository3 other files it gives its agents.
- calendarSkill
- knowledge-baseSkill
- safari-tabsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

