process-guard

Monitor terminal processes with timeouts and managed background execution.

21|4|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/yanowo/agent-process-guard --skill process-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: process-guard
Source: https://github.com/yanowo/agent-process-guard/tree/main
Command: npx skills add https://github.com/yanowo/agent-process-guard --skill process-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

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

Frequently Asked Questions about process-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent terminal commands from blocking my coding agent?

To prevent terminal commands from blocking your coding agent, you can use a process management skill that classifies commands and wraps finite executions with timeouts. This ensures commands automatically terminate if they exceed a specified duration.

How do I manage long-running background processes without leaving orphans?

Managing long-running background processes without leaving orphans involves starting them as managed background tasks with graceful shutdowns. The process monitor recursively stops managed processes and cleans up state files upon completion.

How can I verify the readiness of a background process before running tests?

Verifying the readiness of a background process is done by checking health URLs, ports, custom probes, or log patterns. The process monitor uses these methods to confirm the process is fully operational before proceeding.

Do I need system access to terminate terminal processes with a process monitor?

Yes, you need system access to terminate terminal processes and write state to a run directory. This level of access is required to enforce timeout wrappers and execute recursive cleanup of managed background tasks.

What is the best way to run a long-running command like npm test with a timeout?

The best way to run a long-running command like npm test with a timeout is to execute it via a managed process script. You pass the command, port, and timeout duration as arguments to ensure it runs in the background with enforced limits.