mail-read
Skill7 starsChanged 9 months agoMITView on GitHub
Read the full content of a specific email by ROWID, subject search, or description. Shows headers, body, and any attachment names. Use when user wants to read a specific email, see the full text of a message, or asks "what does that email say". Arguments: ROWID number, subject keywords, or a description of the email to find.
In this repository32 other files it gives its agents.
- calendar-accountsSkill
- calendar-attendeesSkill
- calendar-conflictsSkill
- calendar-coreSkill
- calendar-eventSkill
- calendar-freeSkill
- calendar-recurringSkill
- calendar-searchSkill
- calendar-statsSkill
- calendar-todaySkill
- calendar-upcomingSkill
- mail-accountsSkill
- mail-action-itemsSkill
- mail-attachmentsSkill
- mail-bankingSkill
- mail-contactsSkill
- mail-coreSkill
- mail-digestSkill
- mail-expensesSkill
- mail-fromSkill
- mail-meetingsSkill
- mail-needs-replySkill
- mail-newsletterSkill
- mail-searchSkill
- mail-securitySkill
- mail-statsSkill
- mail-subscriptionsSkill
- mail-threadSkill
- mail-top-sendersSkill
- mail-travelSkill
- mail-triageSkill
- mail-workSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
If multiple matches, show options and ask which one.
- Distinctive: line 73
If no summary, parse the emlx:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Mail Read — Read a Specific Email
Looking for: $ARGUMENTS
Step 1: Find the email
If $ARGUMENTS is a number → treat as ROWID directly
ROWID="$ARGUMENTS"
DB="$HOME/Library/Mail/V10/MailData/Envelope Index"
sqlite3 "$DB" "
SELECT datetime(m.date_received,'unixepoch','localtime') as dt,
s.subject, a.address as sender, a.comment as name,
mb.url as mailbox, m.ROWID, m.read, m.flagged
FROM messages m
JOIN subjects s ON m.subject = s.ROWID
JOIN addresses a ON m.sender = a.ROWID
JOIN mailboxes mb ON m.mailbox = mb.ROWID
WHERE m.ROWID = ${ROWID};" 2>/dev/nullIf $ARGUMENTS is text → search by subject + sender
sqlite3 "$DB" "
SELECT datetime(m.date_received,'unixepoch','localtime') as dt,
s.subject, a.address as sender, mb.url, m.ROWID
FROM messages m
JOIN subjects s ON m.subject=s.ROWID
JOIN addresses a ON m.sender=a.ROWID
JOIN mailboxes mb ON m.mailbox=mb.ROWID
WHERE (s.subject LIKE '%QUERY%' OR a.address LIKE '%QUERY%' OR a.comment LIKE '%QUERY%')
AND m.deleted=0
AND mb.url NOT LIKE '%Spam%'
ORDER BY m.date_received DESC LIMIT 5;" 2>/dev/nullIf multiple matches, show options and ask which one.
Step 2: Get recipient list
sqlite3 "$DB" "
SELECT a.address, a.comment, r.type
FROM recipients r
JOIN addresses a ON r.address = a.ROWID
WHERE r.message = <ROWID>
ORDER BY r.type, r.position;" 2>/dev/nullStep 3: Get attachment list
sqlite3 "$DB" "
SELECT att.name FROM attachments att
WHERE att.message = <ROWID>;" 2>/dev/nullStep 4: Read the full body
First check summaries table for fast-path (no file I/O, available for ~5% of recent emails):
sqlite3 "$DB" "SELECT su.summary FROM messages m JOIN summaries su ON m.summary = su.ROWID WHERE m.ROWID = <ROWID>;" 2>/dev/nullIf no summary, parse the emlx:
python3 ~/.claude/skills/_mail-shared/parser.py <ROWID>Step 5: Find the raw file if needed
find ~/Library/Mail/V10/ -name "<ROWID>.emlx" 2>/dev/null | head -1
# If not found, try partial (IMAP lazy-load — body is still readable):
find ~/Library/Mail/V10/ -name "<ROWID>.partial.emlx" 2>/dev/null | head -1The parser handles partial fallback automatically. Use raw find only for debugging.
Output Format
Email Details
From: [name] <address>
To: [recipients]
CC: [if any]
Date: [datetime]
Subject: [subject]
Account: [derived from mailbox URL]
Attachments: [filenames if any][Full body text, formatted naturally]
Offer:
- "Want me to summarize this?" if long
- "Want me to find related emails in this thread?"
- "Should I help you draft a reply?"
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.

