summarize-unread-emails
Skill: summarize-unread-emails
Overview
This skill accesses your email inbox via AppleScript (macOS Mail) or email API to retrieve unread messages and generate a comprehensive summary organized by category, sender, and recency.
When to Use
Use this skill when the user asks to:
- Summarize unread emails
- Get an overview of unread messages
- Organize or review inbox emails
- See what emails are pending
- Categorize unread messages by type or sender
Procedure
- Execute AppleScript to retrieve all unread messages from the inbox:
osascript -e 'tell application "Mail" to set unreadMessages to (messages of inbox whose read status is false) | return count of unreadMessages' - Extract email metadata (sender, subject, date received) for each unread message using AppleScript
- Parse and organize emails into logical categories (Development, Bills, Family, Shopping, Appointments, Professional, Marketing, Government, Other)
- Sort emails within each category by date received (most recent first)
- Generate a formatted summary report with category headers, email counts, and timeline breakdown
- Present summary to user with key insights and action items highlighted
Output
A formatted text summary organized by category and date, including sender, subject, and date received for each unread email. Includes category totals, timeline breakdown, and visual formatting with emojis for easy scanning.
Reference Commands
Commands for executing this skill (adapt to actual inputs):
osascript -e 'tell application "Mail" to set unreadMessages to (messages of inbox whose read status is false) | return count of unreadMessages'
osascript << 'EOF'
tell application "Mail"
set unreadMessages to (messages of inbox whose read status is false)
repeat with msg in unreadMessages
set output to output & "From: " & (sender of msg) & return & "Subject: " & (subject of msg) & return & "Date: " & (date received of msg) & return & return
end repeat
end tell
EOF
Replace {{PLACEHOLDER}} values with actual credentials from the key store.
Example
Example requests that trigger this skill:
summarize my unread emails
Notes
- This skill uses AppleScript and requires Mail.app to be running on macOS
- Large numbers of unread emails (100+) may take several seconds to process
- Emails are categorized based on subject line keywords and sender domain analysis
- The summary is generated locally and not stored or transmitted externally
Keywords
unread, inbox, email summary, organize emails, pending messages, email overview
More from dalehurley/phpbot
desktop-control
Control the mouse, keyboard, and read screen content via accessibility. Use this skill when the user asks to click somewhere on screen, type text into an app, move the mouse, press keyboard shortcuts, read what's on screen, get the accessibility tree of the current window, automate desktop interactions, or control the computer.
39open-application
Open or launch applications on your computer by name. Use this skill when the user asks to open, launch, or start an application like Mail, Finder, Safari, Chrome, or any other installed macOS application. Works with both built-in and third-party applications.
10homebrew
Install, manage, and search for software packages on macOS using Homebrew. Use this skill when the user asks to install software, apps, CLI tools, developer utilities, programming languages, databases, or any package on a Mac. Supports formulae (CLI tools) and casks (GUI apps). Can also search, update, upgrade, uninstall, and diagnose Homebrew issues.
10csv-tools
Parse, query, filter, sort, transform, and summarize CSV and JSON data files. Use this skill when the user asks to view a CSV, filter data, get statistics from a data file, convert CSV to JSON or vice versa, sort data, or analyze tabular data.
9get-weather-forecast
Retrieve current weather conditions and multi-day forecasts for any location using the wttr.in API. Use this skill when the user asks for weather information, weather forecast, current conditions, temperature, or weather updates for a specific city or location. Provides detailed weather data including temperature, wind, precipitation, and visibility.
8self-correct-reasoning
Analyze and correct previous responses when questioned or when contradictions are detected. Use this skill when the user challenges your reasoning, points out inconsistencies, or asks 'what makes you think that?' to help you review your logic, identify errors in your previous statements, and provide accurate corrections. Useful for maintaining consistency, admitting mistakes, and rebuilding trust through transparent self-evaluation.
8