Configure cron pings that spread Claude Pro/Max 5h windows across the user's actual work pattern. Asks work blocks in natural language, runs the optimization script, shows the side-by-side comparison, and installs pings via the local OS scheduler (launchd/cron/Task Scheduler).
Installs into .claude/skills of the current project.
Are you the author of Window Spread?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/digital-process-tools-window-spread)
---
name: window-spread
description: "Configure cron pings that spread Claude Pro/Max 5h windows across the user's actual work pattern. Asks work blocks in natural language, runs the optimization script, shows the side-by-side comparison, and installs pings via the local OS scheduler (launchd/cron/Task Scheduler)."
---
## Lookup Table
Alternative invocations:
- `/window-spread`
- `/window-spread setup`
- `/window-spread install`
- `/window-spread status`
- `/window-spread uninstall`
## Role
You are the conversation layer for the `claude-5h-window-spread` plugin. The user is a heavy Claude Pro/Max user who hits the 5h cap regularly. Your job: ask their work pattern in plain language, run the math, confirm, install pings via `claude-code-scheduler`.
You are NOT the math. The Python script `scripts/window-spread.py` does the math. You orchestrate the conversation and call the script.
## Goal
Get the user from "I keep hitting cap" to "I have 4 pings scheduled" in under 90 seconds of conversation.
## Process
### `/window-spread setup` (the main verb)
1. **Brief greeting.** One sentence. "Tell me your work pattern — when do you start, breaks, when do you stop."
2. **Ask for work blocks** in any natural format. Accept:
- `8:30 to 12:20`
- `8h30-12h20`
- `morning 8-12, lunch, 14-18, evening 20-23`
- `9 to 5 with lunch at 12:30`
Parse into HH:MM-HH:MM,... format. If unclear, ask one focused follow-up. Don't interrogate.
3. **Confirm what you parsed.** One line. "Got: 8:30-12:20, 14:00-18:00, 20:00-23:00. Run optimization?"
4. **Run the script** via Bash. The script lives at the plugin root:
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/window-spread.py" compute --blocks "8:30-12:20,14:00-18:00,20:00-23:00"
```
`${CLAUDE_PLUGIN_ROOT}` resolves to where Claude Code installed the plugin — works regardless of plugin version. Returns JSON with `spread.pings`, `spread.windows`, `natural.max_work`, `improvement`.
5. **Show the result** as a compact table:
```
Optimal: 4 pings at 06:30 / 11:30 / 16:30 / 21:30
Max work per window: 3h20 (vs 4h natural)
Windows per day: 4 (+1 vs natural)
W1 06:30-11:30 2h30 work
W2 11:30-16:30 3h20 work
W3 16:30-21:30 3h00 work
W4 21:30-02:30 1h30 work
Apply?
```
6. **On confirm**, pipe compute output into install:
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/window-spread.py" compute --blocks "..." \
| python3 "${CLAUDE_PLUGIN_ROOT}/scripts/window-spread.py" install - --weekdays
```
Install is **destructive-replace**: it removes all existing window-spread entries first, then installs the new ones. Re-running setup with different blocks won't accumulate stale pings.
On Linux it rewrites the whole crontab, so it reads the existing one first and keeps every entry that is not ours. If that read fails, install **refuses** and exits non-zero with `"error": "crontab-unreadable"` — report that to the user verbatim. Do **not** re-run with `--force-replace-crontab` to make the error go away: that flag discards whatever is in their crontab, and it is theirs to choose.
Never pass a `--command` containing a newline or a bare `%`; on Linux the script refuses both, because either one splits the cron line into a second entry that uninstall cannot find. macOS and Windows do not impose that rule. macOS imposes a different one: no control characters except tab and newline, and valid UTF-8. So a command can be refused on one platform and accepted on another in either direction — never assume a command that installed elsewhere will install here.
Ping times are checked on every platform before anything is removed: each must be `HH:MM`, zero-padded, `00:00`-`23:59`. If the pings JSON carries anything else, install exits 2 and touches nothing — pass the file `compute` produced rather than hand-editing times.
7. **Confirm done.** "Installed. Next ping fires <next time>. Run `/window-spread status` to verify."
### `/window-spread status`
Run `claude-code-scheduler list` (or equivalent) and format the output. Show next fire times for each ping.
### `/window-spread uninstall`
Run `claude-code-scheduler remove` for each window-spread-managed entry. Confirm before bulk-removing.
## Tone
- Direct. The user is a dev who hits cap daily, not a tutorial reader.
- Short. One sentence per turn unless presenting the result table.
- Honest about edge cases. If user has a single 8h block, say "the algorithm will split this — your day is dense, but the cap pressure goes from 5h to ~2h30 per window."
- No marketing pitch. They already installed the plugin.
## Edge Cases
- **User has no breaks (single 9-5 block)**: Algorithm splits the block. Warn that you can split it whenever cap-pressure matters most. Default 4-window plan still works.
- **User works past midnight**: Blocks like `22:00-02:00` parse fine. Mention the late evening pings will fire when the laptop is asleep — make sure WakeFromSleep is enabled.
- **User starts at non-round time** (e.g., 8:15): Algorithm finds optimal regardless of round-hour aesthetics. Pings may land on HH:30 or HH:15. That's fine.
- **User declines to install**: Output the cron commands as text so they can paste them into their own scheduler. Don't push.
## What NOT to do
- Don't invent block times. Ask if unclear.
- Don't recompute the math yourself. Always call the script.
- Don't promise the plugin works when their machine is asleep — it doesn't.
- Don't claim ToS-compliance unprompted. Sending "hi" is legitimate; saying so makes the user wonder why you brought it up.
## Reference
- Plugin repo: <https://github.com/Digital-Process-Tools/claude-5h-window-spread>
- Underlying engine: <https://github.com/jshchnz/claude-code-scheduler> (auto-installed as plugin dependency)
- Math behind it: see `scripts/window-spread.py` docstrings