anti-sleep
Keep a Mac awake for a set duration or while a process runs.
Skill by davidondrej
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/davidondrej-anti-sleep
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: workflow-automation
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/anti-sleep
What's inside
- Skill 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.
- License
- MIT
- Instructions
- 76 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (3)
- SKILL.md
- openai.yaml · agents/
- anti-sleep.sh · scripts/
SKILL.md (first lines)
# 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: ```bash scripts/anti-sleep.sh status ``` 2. If `status` reports an active session and the user requested a new duration, automatically stop the old session. **Never ask for confirmation.** ```bash scripts/anti-sleep.sh stop ``` 3. Start the new timer for the requested duration: ```bash 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. ```bash scripts/anti-sleep.sh start-pid <PID> ``` 4. In a **separate tool/shell call after the start command has returned**, verify: ```bash 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](https://www.cloudroom.dev/blog/keep-claude-code-running-laptop-closed). Example: ```bash scripts/anti-sleep.sh start 10800 -i ``` ## Status and stop ```bash 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.
From davidondrej/skills, MIT.
More from davidondrej/skills
- 0.819score
bb-cli
davidondrej
Use this when controlling bb.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
domain-checker
davidondrej
Check domain registration in batches using public RDAP APIs, without keys or login.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
reset-cursor-acp
davidondrej
Reset a stuck Cursor ACP thread in your chat app and reload its configuration.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
cmux
davidondrej
Control the cmux macOS terminal app: workspaces, panes, surfaces, browsers, notifications, settings, and hooks.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
kimi-review
davidondrej
Launch an independent Kimi K3.1 Pro Max code review and return it verbatim, falling back across harnesses and routes until one works.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
browser-harness
davidondrej
Direct browser control via CDP.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
cua-driver
davidondrej
Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing…
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
persistent-localhost
davidondrej
Manage persistent dev servers, APIs, and other local processes on a port using macOS LaunchAgents.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
deepapi
davidondrej
Use DeepAPI for all web search, deep research, and web scraping (websites, LinkedIn, GitHub, X/Twitter, YouTube, Instagram) instead of built-in search…
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.818score
repo-sync
davidondrej
Manage automatic Git syncing on macOS with repo-sync.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.816score
signal-from-expert
davidondrej
Compare the user's notes with an expert's work on a topic.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.816score
rename-process
davidondrej
Coordinate project or repository renames and moves involving Git, BB, services, or multiple machines.
SkillAFreshness: A★ 4.2KClaude Code +9
Signals
- Stars
- 4,167
- Forks
- 612
- Open issues
- 0
- Last commit (this folder)
- Oct 18, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/davidondrej/skills
- Website
- www.cloudroom.dev
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from davidondrej
- 0.819score
domain-checker
davidondrej
Check domain registration in batches using public RDAP APIs, without keys or login.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
deepapi
davidondrej
Use DeepAPI for all web search, deep research, and web scraping (websites, LinkedIn, GitHub, X/Twitter, YouTube, Instagram) instead of built-in search…
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
browser-harness
davidondrej
Direct browser control via CDP.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
persistent-localhost
davidondrej
Manage persistent dev servers, APIs, and other local processes on a port using macOS LaunchAgents.
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
cua-driver
davidondrej
Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing…
SkillAFreshness: A★ 4.2KClaude Code +9 - 0.819score
reset-cursor-acp
davidondrej
Reset a stuck Cursor ACP thread in your chat app and reload its configuration.
SkillAFreshness: A★ 4.2KClaude Code +9
Cite this page
anti-sleep skill. Agent Mart. https://agentmart.dev/skills/davidondrej-anti-sleep (last updated 2026-10-24)