What problem does it solve? Keeping a Mac awake during long-running tasks on AC power normally requires manual pmset tweaks or ad-hoc caffeinate sessions that do not survive restarts. This Skill converges a single persistent per-user LaunchAgent that holds a PreventSystemSleep assertion only while the Mac is connected to AC power, without touching display sleep, battery behavior, or system power settings. ## Core Features & Use Cases - Idempotent convergence: One no-argument helper creates missing state, repairs stopped or drifted state, and leaves a healthy service byte-for-byte unchanged (no plist rewrite, no PID change). - Safe failure handling: Atomic plist replacement, kernel-held file locking against concurrent runs, and automatic rollback that restores the prior file and loaded state if verification fails. - Strict guardrails: No sudo, no pmset writes, no LaunchDaemons, no pkill; rejects symlinks, root execution, non-macOS systems, and unsafe file permissions. - Use Case: A developer running an overnight model training job on a plugged-in MacBook invokes the skill once; the LaunchAgent keeps the system awake on AC across restarts while still allowing normal sleep on battery. ## Quick Start Ask the agent to run $nosleep4mac so your logged-in Mac stays awake whenever it is connected to AC power.