process-runner

Execute shell commands with blocklist validation, timeouts, and structured output capture.

4|2|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/Arete-Consortium/ai-skills --skill process-runner-arete-consortium
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: process-runner
Source: https://github.com/Arete-Consortium/ai-skills/tree/main/agents/system/process-runner
Command: npx skills add https://github.com/Arete-Consortium/ai-skills --skill process-runner-arete-consortium

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running shell commands from an AI agent is risky without guardrails: commands can hang indefinitely, destructive operations can wipe filesystems, and unstructured output makes failures hard to diagnose. This Skill provides a controlled subprocess execution layer that validates every command against a blocklist, enforces timeouts, and returns structured results with exit codes, stdout, stderr, and timing. ## Core Features & Use Cases - Safe Synchronous Execution: Run commands with a default 60-second timeout, separate stdout/stderr capture, and exit code reporting. - Background Process Management: Start long-running servers or watchers with PID tracking, then terminate them gracefully via SIGTERM with SIGKILL fallback. - Command Blocklisting: Pre-validate commands against dangerous patterns (rm -rf /, fork bombs, firewall flushes, disk formatting) before execution. - Use Case: An orchestrator agent needs to run a test suite, capture failures, and start a local dev server in the background. The Skill runs the tests with a timeout, reports the non-zero exit code with stderr details, starts the server with a tracked PID, and kills it cleanly when the task completes. ## Quick Start Ask the agent to run a shell command such as a build or test script with a timeout and return the exit code, stdout, and stderr as a structured result.

Frequently Asked Questions about process-runner

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

FAQPage Schema
How do I run shell commands safely from an AI agent?▼

Validate each command against a blocklist of dangerous patterns before execution, enforce a timeout on every subprocess, and capture stdout and stderr separately. Return structured results with exit codes so failures are diagnosable.

How do I run a background process and kill it later in Python?▼

Start the process with subprocess.Popen using start_new_session=True and record the returned PID. To terminate, send SIGTERM first, wait a grace period, then escalate to SIGKILL if the process is still running.

What commands should be blocked in a subprocess runner?▼

Block recursive root deletion (rm -rf /), disk formatting (mkfs, dd to /dev/sd*), fork bombs, shutdown and reboot commands, and security-disabling operations like flushing iptables or disabling firewalld.

Why does my subprocess hang and how do I prevent it?▼

Subprocesses hang when no timeout is set and the command waits on input or runs indefinitely. Always pass a timeout to subprocess.run and handle TimeoutExpired, or use background execution with PID tracking for long-running processes.

When should I not use a subprocess execution skill?▼

Avoid it for file read/write operations, HTTP API requests, and git workflows, which need dedicated handling like backups, auth, and branch protection. Simple safe one-step commands can use the shell directly without skill overhead.