What problem does it solve?
This Skill prevents coding agents from blocking on long-running terminal commands and from leaving orphaned processes, ensuring smooth and resource-efficient operation.
Core Features & Use Cases
- Command Classification: Identifies finite, long-running, and interactive commands before execution.
- Finite Command Execution: Executes finite commands with timeouts to prevent blocking.
- Long-Running Command Management: Starts long-running commands as background processes with graceful shutdowns.
- Readiness Verification: Checks the readiness of processes using health URLs, ports, custom probes, or log patterns.
- Cleanup: Recursively stops managed processes and cleans up state files.
Quick Start
Run a long-running command like 'npm test' with process-guard:
"$PROCESS_GUARD_DIR/scripts/with-managed-process.sh" --name test --command "npm test" --port 3000 --timeout 60