Agent skill · operations · sickn33
anti-sleep
Keep a Mac awake with caffeinate during long builds, downloads, or supervised automation runs.
Why this skill is useful
Codifies usage patterns and flags for the `caffeinate` command to prevent sleep during long tasks, which the AI could infer but now has explicit guidance.
What it needs
About 2k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
Anti-Sleep (macOS caffeinate) When to Use Use when the user wants the Mac to stay awake during a long supervised task. Use when a build, download, or automation run should not be interrupted by sleep. Keep the Mac awake using the built-in caffeinate command. No install needed. Quick start — the standard command Duration is -t <seconds>: 2h = 7200, 7h = 25200, overnight (9h) = 32400. Aggressiveness levels Flags Effect --- --- -i prevents idle system sleep only (screen may still dim/lock) -d prevents display sleep (screen stays on) -d -i default choice — screen on + system awake -d -i -s adds -s: prevents sleep even on AC power semantics; -s only works when plugged in -u -t 1 simulates user activity — wakes the display right now Default to -d -i -t <seconds> unless the user says otherwise. Tie to a process instead of a timer Run it in a visible terminal (cmux pane) Prefer running it in the user's own terminal pane so it's visible and easy to Ctrl+C. In cmux (read the cmux skill first if interacting with panes): Otherwise run it as a background Bash task. Never block your own foreground shell with it. Verify and monitor Gotcha: caffeinate prints nothing and holds the prompt — it looks "stuck" or like Enter wasn't pressed. It isn't stuck. Verify with pgrep, not by looking at the terminal. Expiry: with -t it exits silently when time runs out — no notification. If the user asks "is it still on?" after hours, check pgrep first; it may simply have expired. Keyboard backlight caffeinate cannot keep the keyboard backlight on — it has its own inactivity timer with no CLI/API on Apple Silicon (researched 2026-07). Fix is manual, one-time: System Settings > Keyboard > "Turn keyboard backlight off after inactivity" > Never. Stop early Record the PID of the process started for this task; verify its command before stopping it. Do not stop unrelated caffeinate sessions by a broad pattern. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/anti-sleep--ae39c7