anti-sleep
Pass
Audited by Gen Agent Trust Hub on Oct 19, 2026
Risk Level: SAFE
Full Analysis
- [SAFE]: The skill uses built-in macOS tools (caffeinate, launchctl, pmset) to manage system sleep settings according to user requests.
- [COMMAND_EXECUTION]: The script executes local commands to manage the system state. All inputs, including durations, PIDs, and flags, are strictly validated. Integers are checked for validity and flags are compared against a whitelist of allowed options (-d, -i, -m, -s, -u), effectively preventing command injection.
- [PERSISTENCE]: The skill creates a LaunchAgent to manage the caffeinate process. This is used as a transient mechanism for a one-shot task. The configuration explicitly sets KeepAlive to false, ensuring the process does not persist or restart once the duration expires or the target process terminates.
- [DYNAMIC_EXECUTION]: The script generates a .plist configuration file and a state file at runtime. This implementation follows security best practices by using mktemp for secure creation, applying restrictive file permissions (chmod 600), and only interpolating validated variables into the templates.
Audit Metadata