Agent skill

list-emails

Formats provided Gmail message metadata into a consistent executive table with numbered rows, summaries, and direct links for downstream skills.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/list-emails

SKILL.md

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.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results