Gmail Catch-Up Summary
If count is 0: "Your inbox is all caught up—no unread emails!" End here.
If totalEstimate > count: "Showing 100 most recent of ~[totalEstimate] unread."
Synthesize per Catch-Up Prioritization Guide:
- Lead with Tier 1 (matches from
Catch-Up Preferences)
- Highlight emails needing response (questions, action items)
- Group by theme/sender for clusters
- Note lower-priority items briefly
For 100+ emails: focus Tier 1-2 only, summarize rest as counts.
Present conversationally—don't list every email.
Ask if the user wants to mark all these as read.
If yes, collect all message IDs from the unread results (comma-separated) and proceed to the next step.
If no, skip the next step—they'll stay unread for later.
Note any signals that suggest user interests:
- Did they ask follow-up questions about specific senders or topics?
- Did they express interest ("what did Sarah say exactly?")?
- Did they dismiss something ("I don't need the newsletter stuff")?
If you observed any signals, update Catch-Up Preferences with new entries. Include a "reason" explaining why this was added.
Don't add preferences after every catch-up—only when there's a clear signal of interest.
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. [Read Catch-Up Prioritization Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/catchup.prioritization.guide.md` (Load prioritization framework before analysis)
2. [Read Catch-Up Preferences]: Read the file at `./documents/catchup-preferences.yaml` and analyze its contents (Load user's known interests for prioritization)
3. [Gather Arguments: Fetch Gmail Messages] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `query`: is:unread
- `maxResults` (default: "50"): 100
- `outputPath` (default: "session/emails.json"): ./documents/tmp/gmail-unread.json
4. [Run Code: Fetch Gmail Messages]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/gmail.inbox.fetch/preview,
"args": [
"query",
"maxResults",
"outputPath"
]
},
"packages": null
}
```
5. [Read Gmail Unread Data]: Read the file at `./documents/tmp/gmail-unread.json` and analyze its contents (Load the fetched unread emails)
6. If count is 0: "Your inbox is all caught up—no unread emails!" End here.
If totalEstimate > count: "Showing 100 most recent of ~[totalEstimate] unread."
Synthesize per `./skills/sauna/[skill_id]/references/catchup.prioritization.guide.md`:
- Lead with Tier 1 (matches from `./documents/catchup-preferences.yaml`)
- Highlight emails needing response (questions, action items)
- Group by theme/sender for clusters
- Note lower-priority items briefly
For 100+ emails: focus Tier 1-2 only, summarize rest as counts.
Present conversationally—don't list every email.
7. Ask if the user wants to mark all these as read.
If yes, collect all message IDs from the unread results (comma-separated) and proceed to the next step.
If no, skip the next step—they'll stay unread for later.
8. [Gather Arguments: Mark Gmail Messages Read] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `messageIds`: Comma-separated message IDs from the unread results
- `outputPath` (default: "session/gmail-mark-results.json") - Path to write results JSON
9. [Run Code: Mark Gmail Messages Read]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/catchup.gmail.mark/preview,
"args": [
"messageIds",
"outputPath"
]
},
"packages": null
}
```
10. Note any signals that suggest user interests:
- Did they ask follow-up questions about specific senders or topics?
- Did they express interest ("what did Sarah say exactly?")?
- Did they dismiss something ("I don't need the newsletter stuff")?
If you observed any signals, update `./documents/catchup-preferences.yaml` with new entries. Include a "reason" explaining why this was added.
Don't add preferences after every catch-up—only when there's a clear signal of interest.