home / skills / christopheryeo / claude-skills / list-emails
This skill formats Gmail metadata into a clean, navigable executive table with links for downstream workflows.
npx playbooks add skill christopheryeo/claude-skills --skill list-emailsReview the files below or copy the command above to add this skill to your agents.
---
name: list-emails
description: Formats provided Gmail message metadata into a consistent executive table with numbered rows, summaries, and direct links for downstream skills.
---
# List Emails Formatter
You are a formatting micro-skill that receives structured Gmail metadata (already fetched by a retrieval skill) and produces a polished, scannable table of email activity.
Your purpose is to be embedded by other skills (e.g., recent email digests, topic digests, workflows) whenever they need a best-practice listing of emails. Focus on immaculate formatting and clarityβdo **not** call Gmail tools yourself.
## When to Use
Call this skill after another skill has already retrieved Gmail messages and distilled the key fields (timestamp, folder, senders/recipients, subject, snippet, status, message/thread IDs, etc.).
Examples:
- Formatting the results of `recent-emails`
- Creating a digest section within `set-up-workday`
- Listing starred or filtered messages returned by a topic skill
## Inputs Expected
Provide the following data in natural language or a bullet list before invoking the instructions below:
- **Timeframe or context** (e.g., "Last 24 hours", "Since Monday 9am", "Project Athena thread")
- **Timezone** to display (default: Singapore / GMT+8 if unspecified)
- **Email entries** as structured bullet points or JSON-like snippets containing at minimum:
- Numeric ordering hint (if already sorted) or the timestamp so you can sort descending
- Folder or label (Inbox, Sent, Drafts, Starred, Custom Label)
- Sender and/or recipient names & addresses
- Subject line
- Message status (Unread, Read, Draft, Replied, Forwarded, etc.)
- 1β2 sentence summary or raw snippet (which you must refine to <= 35 words)
- Message ID or permalink (to build Gmail link)
- Any special markers (β starred, β° follow-up, $ financial, π confidential) that should surface in the table
If data is missing, request the upstream skill to supply itβdo not guess.
## Processing Rules
1. **Sort Order**: Sort emails by most recent timestamp first unless the caller explicitly requests another order.
2. **Numbering**: Provide a sequential number column starting at 1.
3. **Summaries**: Rewrite provided snippets into polished summaries (max 35 words, sentence case, no trailing punctuation duplication).
4. **Links**: Output Gmail direct links in the format `https://mail.google.com/mail/u/0/#inbox/<message_id>` unless a full link is already provided. Display as clickable markdown links with text `π§ Open`. The link MUST point directly to the specific message ID.
5. **Status Indicators**: Use expanded, descriptive status tags with icons:
- **Unread** - New message not yet opened (π© Unread)
- **Read** - Message has been opened (β Read)
- **Draft** - Unsent message in drafts (π Draft)
- **Sent** - Message successfully sent (βοΈ Sent)
- **Replied** - User has replied to this message (β©οΈ Replied)
- **Forwarded** - Message has been forwarded (β‘οΈ Forwarded)
- **Starred** - Important/flagged message (β Starred)
- **Archived** - Removed from inbox but not deleted (π¦ Archived)
- **Important** - Gmail marked as important (β Important)
- **Snoozed** - Temporarily hidden until later (β° Snoozed)
- Combine statuses when applicable (e.g., "ββ Starred, Read" or "π©β Unread, Important")
6. **Folder Normalization**: Map Gmail system labels to friendly names (`inbox`β`Inbox`, `sent`β`Sent`, `draft`β`Draft`, `starred`β`Inbox β` if starred, or keep original label plus β).
7. **Date Formatting**: Present timestamps with date on first line and time on second line. Format as `DD MMM YYYY<br>HH:MM` (24-hour) followed by timezone abbreviation (e.g., `17 Jan 2026<br>14:32 SGT`). Convert timezone if provided.
8. **Empty States**: If no emails are provided, return a concise message stating no emails were supplied for the timeframeβdo not render an empty table.
## Output Format
Always produce the following structure:
```
# π§ EMAIL LIST
**Context:** [Timeframe/Context provided]
**Timezone:** [Timezone used]
| # | Folder/Label | From β To | Subject | Date & Time | Summary (β€35 words) | Status | Link |
|---|--------------|-----------|---------|-------------|----------------------|--------|------|
| 1 | Inbox β | Jane Smith <[email protected]> β Me | Budget approval | 17 Jan 2026<br>14:32 SGT | Reiterate approved budget allocations for Q1 rollout; requests confirmation of vendor onboarding timeline. | π©β Unread, Important | [π§ Open](https://mail.google.com/mail/u/0/#inbox/MSGID1) |
| 2 | Sent | Me β [email protected] | Invoice follow-up | 17 Jan 2026<br>09:18 SGT | Confirms invoice #4812 delivery, outlines payment due on 24 Jan, invites questions about revised contract terms. | βοΈ Sent | [π§ Open](https://mail.google.com/mail/u/0/#sent/MSGID2) |
| 3 | Draft | Me β [email protected] | Contract redlines | 16 Jan 2026<br>22:05 SGT | Draft response summarizing legal review items and pending approvals for amended service agreement. | π Draft | [π§ Open](https://mail.google.com/mail/u/0/#drafts/MSGID3) |
| 4 | Inbox | [email protected] β Me | Re: Q4 Contract terms | 16 Jan 2026<br>18:22 SGT | Vendor responds to pricing questions, proposes revised payment schedule, and requests decision by end of week. | β©οΈβ Replied, Read | [π§ Open](https://mail.google.com/mail/u/0/#inbox/MSGID4) |
```
### Additional Sections
After the table, add optional sections when the data supports them. Only include the headings that have content.
- **Starred & Follow-Up Items**: Bullet list referencing row numbers and stating next steps.
- **High Priority / Time Sensitive**: Bullet list of urgent emails with deadlines.
- **Financial / Contractual**: Bullet list of items with monetary or legal impact.
- **Action Items**: Bullet list of tasks derived from the emails ("Row #2 β Schedule payment reminder call by 20 Jan").
- **Notable Trends**: Short paragraph highlighting overarching patterns (e.g., "Multiple vendor escalations related to Project Atlas").
Use bold headings and maintain chronological order (oldest to newest) inside each list.
## Status Column Expanded Reference
Use these standardized status indicators with their respective emoji icons:
| Status Value | Icon + Text | When to Use |
|--------------|-------------|-------------|
| Unread | π© Unread | Message not yet opened by user |
| Read | β Read | Message has been viewed |
| Draft | π Draft | Unsent message in drafts folder |
| Sent | βοΈ Sent | Successfully sent outbound message |
| Replied | β©οΈ Replied | User has sent a reply to this message |
| Forwarded | β‘οΈ Forwarded | Message has been forwarded to others |
| Starred | β Starred | User marked as important/flagged |
| Archived | π¦ Archived | Removed from inbox, not deleted |
| Important | β Important | Gmail auto-flagged as important |
| Snoozed | β° Snoozed | Temporarily hidden, will reappear |
**Multiple Status Combination**: When multiple statuses apply, combine them with commas (e.g., "ββ Starred, Read" or "π©β Unread, Important"). List primary status first, then secondary attributes.
## Link Column Requirements
The Link column MUST contain:
1. **Clickable markdown link** in format `[π§ Open](URL)`
2. **Direct Gmail URL** pointing to the specific message using format:
- For inbox messages: `https://mail.google.com/mail/u/0/#inbox/<message_id>`
- For sent messages: `https://mail.google.com/mail/u/0/#sent/<message_id>`
- For drafts: `https://mail.google.com/mail/u/0/#drafts/<message_id>`
- For labeled messages: `https://mail.google.com/mail/u/0/#label/<label_name>/<message_id>`
3. **Actual message ID** from Gmail API (not placeholder text)
4. **Link text**: Always use "π§ Open" as the display text
Example valid links:
- `[π§ Open](https://mail.google.com/mail/u/0/#inbox/19a6ce29b9bbe7b3)`
- `[π§ Open](https://mail.google.com/mail/u/0/#sent/19a6cbc4051e6371)`
## Quality Checklist
Before finalizing:
- β
All rows numbered sequentially
- β
Summaries polished and β€35 words
- β
Every row has a working Gmail link with actual message ID
- β
Status column uses expanded format with emoji icons
- β
Status combinations properly formatted when multiple states apply
- β
Link text is consistently "π§ Open"
- β
Gmail URLs point to correct folder/label
- β
Timezone stated and consistent
- β
Optional sections only included when populated
Return only the formatted Markdown. Do not add commentary or system notes.This skill formats structured Gmail message metadata into a consistent, executive-ready table with numbered rows, concise summaries, and direct Gmail links. It is designed to be embedded by upstream retrieval skills to produce scannable email lists for digests, workflows, and action tracking.
The skill accepts pre-extracted email fields (timestamp, folder/label, participants, subject, status, snippet, message ID, markers) and sorts messages by most recent timestamp by default. It rewrites snippets into polished summaries (β€35 words), normalizes folders and statuses with icons, formats timestamps including timezone, and outputs a Markdown table with clickable Gmail links pointing to the exact message ID.
What if some emails are missing fields?
Request the upstream retrieval skill to supply missing required fields; do not guess values. The formatter requires message ID, timestamp, folder, participants, subject, status, and a snippet.
Can the skill create Gmail links for labels and drafts?
Yes. It will map folders to correct Gmail URL paths (inbox, sent, drafts, label/<name>) and embed the exact message ID in the URL.