Anti Sleep

Keep a Mac awake with caffeinate during long builds, downloads, or supervised automation runs.

9 stars 4 forksProductivity & Notes

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add huytran1120/vietnam-agentic-skills --skill anti-sleep
Manual install
git clone --depth 1 https://github.com/huytran1120/vietnam-agentic-skills.git /tmp/vietnam-agentic-skills
mkdir -p ~/.claude/skills
cp -r /tmp/vietnam-agentic-skills/skills/anti-sleep ~/.claude/skills/anti-sleep

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# 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

```bash
caffeinate -i -t 7200       # prevent idle system sleep for 2 hours
```

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` | screen on + system awake, when the task needs a visible display |
| `-d -i -s` | adds `-s`: prevents system sleep while on AC power; valid only when plugged in |
| `-u -t 1` | simulates user activity — wakes the display right now |

Default to `-i -t <seconds>`; add `-d` only when the task needs the display awake. These assertions do not guarantee continued execution through lid closure, shutdown or loss of power, and do not replace the lock-screen policy.

## Tie to a process instead of a timer

```bash
caffeinate -d -i -w <PID>          # stays awake until that process exits (great for builds)
caffeinate -i npm run build       # wraps a command; exits when the command finishes
```

## Run it in a visible terminal (cmux pane)
Read the full skill on GitHub

Details

Skill name
anti-sleep
Path
skills/anti-sleep/SKILL.md
License
MIT
Repo updated
29 October 2026
Copies
Found in 2 GitHub repos

FAQ

What does the Anti Sleep skill do?

Keep a Mac awake with caffeinate during long builds, downloads, or supervised automation runs.

How do I install the Anti Sleep skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add huytran1120/vietnam-agentic-skills --skill anti-sleep. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Anti Sleep popular?

It lives in huytran1120/vietnam-agentic-skills, which has 9 GitHub stars and 4 forks.

Related skills

Browse the most popular Claude skills, all productivity & notes skills, or write your own with the skills generator.