anti-sleep
Keep a Mac awake for a set duration or while a process runs. Use only when the user explicitly invokes /anti-sleep.
Install / Use
npx skills add davidondrej/skills --skill anti-sleepInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of anti-sleep
anti-sleep scores 86/100 on our quality scale, 1785th of 2,780 Automation skills we index.
Its SKILL.md is 2.7 KB long, split into 5 sections with 7 code examples: a solid amount of guidance for an agent.
With 4,079 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so anti-sleep is actively maintained.
- Our last check on 2026-11-03 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit β read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-11-16. Automated pattern scan on 2026-11-16. It catches known dangerous patterns, not every risk β read a skill before letting an agent act on it.
anti-sleep compared with similar skills
All 4 of these similar skills score higher than anti-sleep; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| anti-sleep (this skill)by davidondrej | 86 | 4.1k | 53d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.7k | 7d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install anti-sleep?
- Run
npx skills add davidondrej/skills --skill anti-sleep. The install tabs above show the steps for each supported agent. - Which AI agents does anti-sleep work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is anti-sleep safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is anti-sleep still maintained?
- The repository was last updated about 2 months ago, so anti-sleep is actively maintained.
Skill content
View source on GitHubname: anti-sleep description: Keep a Mac awake for a set duration or while a process runs. Use only when the user explicitly invokes /anti-sleep. disable-model-invocation: true
Anti-Sleep (macOS caffeinate)
Use the bundled launcher from this skill directory. It creates a one-shot user LaunchAgent using only built-in macOS tools.
Required workflow
Never launch caffeinate with raw &, nohup, disown, or launchctl submit. Temporary execution shells can kill their descendants, and launchctl submit can restart a timed job.
Resolve scripts/anti-sleep.sh relative to this SKILL.md; never assume the user's current directory. Run:
- Inspect current state:
scripts/anti-sleep.sh status
- If
statusreports an active session and the user requested a new duration, automatically stop the old session. Never ask for confirmation.
scripts/anti-sleep.sh stop
- Start the new timer for the requested duration:
scripts/anti-sleep.sh start 10800 # 3 hours
For a specific process, use start-pid. Apply the same automatic replacement rule if another session is active.
scripts/anti-sleep.sh start-pid <PID>
- In a separate tool/shell call after the start command has returned, verify:
scripts/anti-sleep.sh verify
Only report success when verification returns STATUS=running and ASSERTIONS=active. Confirm the PID, flags, and wall-clock expiry. If verification fails, run stop and do not claim the Mac is protected.
Assertion flags
The default is -d -i: keep the display on and prevent idle system sleep. Pass explicit flags after the duration or PID when needed:
| Flags | Effect |
|---|---|
| -i | Prevent idle system sleep; display may dim |
| -d | Prevent display sleep |
| -d -i -s | Also prevent system sleep while on AC power |
None of these stop sleep when the lid closes. For agent runs that must survive a closed lid, see Keep Claude Code running when your laptop is closed.
Example:
scripts/anti-sleep.sh start 10800 -i
Status and stop
scripts/anti-sleep.sh status
scripts/anti-sleep.sh stop
The launcher tracks one exact LaunchAgent label, PID, start time, and expiry under ~/Library/Caches. It never uses broad pkill.
Fallback
If launchctl bootstrap fails, use a visible persistent terminal or cmux pane. Read the cmux skill before interacting with cmux. If no persistent surface is available, tell the user instead of starting an unreliable background job.
caffeinate cannot keep the keyboard backlight on. That setting is manual: System Settings β Keyboard β βTurn keyboard backlight off after inactivityβ β Never.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu β one CLI, zero API fees.
ruflo
81.9kπ The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Claude-Code-Game-Studios
39.7kTurn Claude Code into a full game dev studio β 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Scrapling
103.6kπ·οΈ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit β see the Safety scan above for what the skill file itself contains.
