SkillAgentSearch skills...

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-sleep

Installs into whichever agent you are using.

About this skill
πŸ“„

SKILL.md

Installable skill definition

Quality Score

86/100

Category

Automation

Supported Platforms

Universal

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.

Substance
26/30
Structure
18/20
Description
12/15
Adoption
15/20
Freshness
15/15

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 found

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.

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.

SkillScoreStarsUpdatedFormat
anti-sleep (this skill)by davidondrej864.1k53d agoSKILL.md
Agent-Reachby Panniantong100112.3k8d agoCLAUDE.md
rufloby ruvnet10081.9ktodayCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.7k7d agoCLAUDE.md
Scraplingby D4Vinci100103.6k2d agoMCP 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.

name: 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:

  1. Inspect current state:
scripts/anti-sleep.sh status
  1. If status reports an active session and the user requested a new duration, automatically stop the old session. Never ask for confirmation.
scripts/anti-sleep.sh stop
  1. 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>
  1. 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

View on GitHub
GitHub Stars4.1k
CategoryAutomation
Updated1mo ago
Forks601

Languages

Shell

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit β€” see the Safety scan above for what the skill file itself contains.

No cautions
anti-sleep β€” Universal Skill: Install & Safety Check | SkillAgent