mail-thread
>-
mail-newsletter
Identify newsletters and mailing lists in email, show volume per sender, and help clean up subscriptions. Use when user wants to see what newsletters they're subscribed to, audit mailing lists, or identify email noise. Arguments: optional time range or "unsubscribe" to surface opt-out links.
Full skill instructions
Analysis: $ARGUMENTS (default: last 90 days)
DB="$HOME/Library/Mail/V10/MailData/Envelope Index"
SINCE=$(($(date +%s) - 7776000)) # 90 days
sqlite3 "$DB" "
SELECT a.address, a.comment as name,
m.unsubscribe_type,
COUNT(*) as count,
SUM(CASE WHEN m.read=1 THEN 1 ELSE 0 END) as read_count,
ROUND(100.0 * SUM(m.read) / COUNT(*), 0) as read_pct,
MAX(datetime(m.date_received,'unixepoch','localtime')) as latest
FROM messages m
JOIN addresses a ON m.sender = a.ROWID
JOIN mailboxes mb ON m.mailbox = mb.ROWID
WHERE m.date_received >= ${SINCE}
AND m.deleted = 0
AND mb.url NOT LIKE '%Spam%' AND mb.url NOT LIKE '%Trash%'
AND mb.url NOT LIKE '%Sent%'
AND m.unsubscribe_type > 0
GROUP BY a.address
ORDER BY count DESC;" 2>/dev/null
sqlite3 "$DB" "
SELECT a.address, a.comment, COUNT(*) as cnt,
ROUND(100.0 * SUM(m.read) / COUNT(*), 0) as read_pct
FROM messages m
JOIN addresses a ON m.sender = a.ROWID
JOIN mailboxes mb ON m.mailbox = mb.ROWID
WHERE m.date_received >= ${SINCE}
AND m.deleted=0
AND m.automated_conversation = 2
AND m.unsubscribe_type = 0
AND mb.url NOT LIKE '%Spam%' AND mb.url NOT LIKE '%Sent%'
GROUP BY a.address
HAVING cnt >= 10
ORDER BY cnt DESC LIMIT 20;" 2>/dev/null
To see distinct mailing lists (e.g. a company using multiple sender addresses):
sqlite3 "$DB" "
SELECT m.list_id_hash, COUNT(*) as cnt, COUNT(DISTINCT a.address) as sender_variants,
MAX(a.comment) as name_sample
FROM messages m
JOIN addresses a ON m.sender = a.ROWID
WHERE m.date_received >= ${SINCE}
AND m.deleted=0
AND m.list_id_hash IS NOT NULL AND m.list_id_hash != 0
GROUP BY m.list_id_hash
ORDER BY cnt DESC LIMIT 20;" 2>/dev/null
For senders with low read rates (< 30%), find unsubscribe links in body:
python3 ~/.claude/skills/_mail-shared/parser.py <ROWID>
Look for unsubscribe URLs in the body text.
Total emails from newsletter/automated senders vs. total inbox volume = % noise.
Newsletter/Mailing List Audit — [PERIOD]
| Sender | Emails | Read Rate | Verdict |
|---|---|---|---|
| [email protected] | 45 | 12% | Rarely read |
| [email protected] | 28 | 89% | Engaged |
Unsubscribe Candidates (high volume + low read rate): [list with unsubscribe links if available]
Total newsletter volume: X emails = Y% of inbox Estimated time saved if unsubscribed from low-engagement ones: [estimate]
>-
>-
>-
Background technical knowledge for reading Apple Mail data locally on macOS. Auto-loaded when any mail-* skill executes. Contains architecture, query patterns, and parsing techniques for ~/Library/Mail/V10/.
>-
Get full details of a specific event including attendees, description, video link, location, and recurrence. Use when user asks about a specific meeting or event details.
>-
>-
Find free time slots in a day or week. Use when user asks when they're free, wants to schedule something, or needs to find an open time window.
Find meetings with a specific person, or list attendees of a specific event. Use when user asks who is in a meeting, whether someone is invited, or what meetings they share with a person.
>-
List all Apple Mail synced accounts with email addresses, message counts, folder structure, and account types. Use when user asks what email accounts are synced, how many emails they have, or wants an overview of their mail setup.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience