agentsclimarketplace

Mac keepawake

Skill cskwork/mac-keepawake-codex-skill/mac-keepawake

Codex skill for keeping macOS awake while locked Terminal agent sessions keep running

Install
npx -y skills add cskwork/mac-keepawake-codex-skill --skill mac-keepawake

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Keep macOS awake so locked-screen Terminal work keeps running. Use when a user wants Claude Code, Codex, shell jobs, dev servers, tmux/screen sessions, or other local agent processes to survive Mac screen lock, display sleep, or idle periods by using caffeinate, pmset checks, and a LaunchAgent.

SKILL.md

2.8 KB, 601 tokens by cl100k_base, as published. Nobody here has run it

Mac Keepawake

Outcome

Keep the Mac awake while allowing the screen to lock or turn off. The process target is Terminal work such as Claude Code, Codex, dev servers, or long-running shell jobs.

Mental Model

Screen lock is fine. System sleep is the problem: it pauses local processes, network I/O, and Terminal jobs. Prevent idle system sleep; do not disable security lock unless the user explicitly asks.

Workflow

  1. Restate the goal: keep processes running after lock, not bypass lock.
  2. Inspect current state before changing anything:
pmset -g custom
pmset -g assertions
launchctl print "gui/$(id -u)/com.codex.mac-keepawake" 2>/dev/null || true
  1. Prefer the bundled script for persistent setup:
python3 path/to/mac-keepawake/scripts/mac_keepawake.py install
python3 path/to/mac-keepawake/scripts/mac_keepawake.py status
  1. Report exact evidence from launchctl print and pmset -g assertions.

Choosing a Mode

  • Persistent login session: install the LaunchAgent. This survives new Terminal windows and restarts at login.
  • Temporary command session: run caffeinate -i -s <command> when the user wants only one command protected.
  • Battery-sensitive work: warn that -s only asserts full system sleep prevention on AC power; battery behavior may depend on macOS power policy.

Persistent Setup

The script creates this user LaunchAgent:

  • Label: com.codex.mac-keepawake
  • Plist: ~/Library/LaunchAgents/com.codex.mac-keepawake.plist
  • Command: /usr/bin/caffeinate -i -s

Use install to write and bootstrap the agent, status to inspect assertions, and uninstall only when the user asks to remove it.

Validation

Claim success only when these checks are true:

  • launchctl print gui/$(id -u)/com.codex.mac-keepawake shows state = running or job state = running.
  • pmset -g assertions lists caffeinate with PreventUserIdleSystemSleep.
  • If on AC power, pmset -g assertions should also list PreventSystemSleep.

Safety Notes

  • Do not change lock-screen, password, FileVault, firewall, or remote-login settings for this task.
  • Do not kill unrelated caffeinate or Amphetamine processes.
  • Do not use destructive cleanup commands. The only removal path should be the script's own uninstall command for the matching label and plist.
  • Explain that logout, reboot, shutdown, or a kernel panic will still stop ordinary Terminal processes. Recommend tmux or screen for session reattachment when relevant.

What ships with it: 2 files

2.8 KB alongside SKILL.md, 1 of them executable

agents/

scripts/

Keep looking

Skills are one crate of 326,984. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.