Block Calendar Time
Parse the time window from the user's request.
Determine:
- Start datetime (if "until X", start is now)
- End datetime
- Whether it's all-day or specific hours
Check Connection Profiles for user's timezone.
Convert to YYYY-MM-DD or ISO8601 format for the calendar fetch.
Analyze the affected events and classify each one:
Skip (no action needed):
- Focus time, personal blocks, OOO markers
- All-day reminders (birthdays, holidays)
- Events where you're already marked as declined
Needs action:
- 1:1s with colleagues → notify + reschedule
- External/client meetings → notify + reschedule (professional tone)
- Meetings you organized → notify attendees
- Team meetings where you're optional → just decline
Present findings succinctly - skip the verbose categories, get to the point:
"Ignoring [X] and [Y] (personal blocks, not relevant).
A couple things to handle:
- 1:1 with Sarah - suggest moving to Friday 2pm
- Client call - need to notify them and reschedule
Want me to do this, or any changes?"
Only ask clarifying questions if genuinely ambiguous (e.g., team ritual where
their role is unclear). Don't ask about every meeting - propose a sensible
default and let user correct if needed.
Wait for user confirmation before proceeding.
Based on user's input, prepare ONE consolidated action preview showing
ALL emails and calendar changes together.
Write a single preview with _action frontmatter:
_action:
label: "Send notifications & update calendar"
prompt: "Execute all actions below: send emails via Gmail, decline/update calendar events, create blocking event"
isComplete: false
Emails to send
To: sarah@company.com
Subject: Rescheduling our 1:1
Hey Sarah, need to push our 1:1 - does Friday 2pm work?
To: client@external.com
Subject: Rescheduling Thursday call
Hi - I need to reschedule our Thursday call. Would Friday 10am or 2pm work?
Calendar updates
- Decline: Team standup (Wed 9am)
- Decline: Client call (Thu 3pm) - pending reschedule
New blocking event
- Title: Unavailable
- When: [Start] → [End]
- Show as: Busy
User can review and edit the entire batch, then click to execute all actions.
After user approves, summarize what was done:
- [N] notifications sent
- [N] meetings declined
- Calendar blocked from [start] to [end]
Clean up: delete Affected Calendar Events
To run this task you must have the following required information:
> Time window to block (e.g., 'Saturday', 'until Thursday 6pm', 'tomorrow 2-6pm'). Optional: reason for blocking, notification preferences.
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
---
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 Calendar Blocking Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/calendar.block.guide.md` (Notification tone and rescheduling strategies)
2. [Read Time Expressions Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/world.time.expressions.md` (How to interpret flexible time expressions)
3. Parse the time window from the user's request.
Determine:
- Start datetime (if "until X", start is now)
- End datetime
- Whether it's all-day or specific hours
Check `./documents/connections/[service-name].md` for user's timezone.
Convert to YYYY-MM-DD or ISO8601 format for the calendar fetch.
4. [Gather Arguments: Fetch Calendar Events] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `startDate`: Start date in YYYY-MM-DD format
- `endDate`: End date in YYYY-MM-DD format
- `outputPath`: ./documents/tmp/calendar-affected-events.json
5. [Run Code: Fetch Calendar Events]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/calendar.google.events/preview,
"args": [
"startDate",
"endDate",
"outputPath"
]
},
"packages": null
}
```
6. [Read Affected Calendar Events]: Read the file at `./documents/tmp/calendar-affected-events.json` and analyze its contents (Events in the blocked time window)
7. Analyze the affected events and classify each one:
**Skip (no action needed):**
- Focus time, personal blocks, OOO markers
- All-day reminders (birthdays, holidays)
- Events where you're already marked as declined
**Needs action:**
- 1:1s with colleagues → notify + reschedule
- External/client meetings → notify + reschedule (professional tone)
- Meetings you organized → notify attendees
- Team meetings where you're optional → just decline
Present findings succinctly - skip the verbose categories, get to the point:
"Ignoring [X] and [Y] (personal blocks, not relevant).
A couple things to handle:
- **1:1 with Sarah** - suggest moving to Friday 2pm
- **Client call** - need to notify them and reschedule
Want me to do this, or any changes?"
Only ask clarifying questions if genuinely ambiguous (e.g., team ritual where
their role is unclear). Don't ask about every meeting - propose a sensible
default and let user correct if needed.
Wait for user confirmation before proceeding.
8. [Read External Actions Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/sauna.actions.external.md` (Preview pattern for external actions - loaded just before use)
9. Based on user's input, prepare ONE consolidated action preview showing
ALL emails and calendar changes together.
Write a single preview with _action frontmatter:
---
_action:
label: "Send notifications & update calendar"
prompt: "Execute all actions below: send emails via Gmail, decline/update calendar events, create blocking event"
isComplete: false
---
## Emails to send
**To:** sarah@company.com
**Subject:** Rescheduling our 1:1
Hey Sarah, need to push our 1:1 - does Friday 2pm work?
---
**To:** client@external.com
**Subject:** Rescheduling Thursday call
Hi - I need to reschedule our Thursday call. Would Friday 10am or 2pm work?
---
## Calendar updates
- **Decline:** Team standup (Wed 9am)
- **Decline:** Client call (Thu 3pm) - pending reschedule
## New blocking event
- **Title:** Unavailable
- **When:** [Start] → [End]
- **Show as:** Busy
---
User can review and edit the entire batch, then click to execute all actions.
10. After user approves, summarize what was done:
- [N] notifications sent
- [N] meetings declined
- Calendar blocked from [start] to [end]
Clean up: delete `./documents/tmp/calendar-affected-events.json`