exec-guard

Safe command execution for AI agents with timeout control, 8KB ring buffer memory protection, background process management, and multi-agent sharing via HTTP service. Use when executing system commands, running long tasks, starting services, or managing background processes. Supports CLI and HTTP server modes.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "exec-guard" with this command: npx skills add cypress927/exec-guard

exec-guard - AI Agent Command Execution Module

Safe and reliable system command execution for AI agents.

Quick Start

CLI Mode

echo '{"command": "ls -la"}' | node scripts/dist/index.js

HTTP Service Mode

node scripts/dist/index.js --server --port 8080
curl -X POST http://localhost:8080/exec -H "Content-Type: application/json" -d '{"command": "ls -la"}'

Core Capabilities

CapabilityDescription
Sync ExecutionExecute command with timeout, wait for result
Background ExecutionStart long tasks, get PID, query later
Watch WindowConfirm service startup before returning
8KB Ring BufferHead-Tail dual buffer prevents OOM
Process ManagementQuery status, get logs, terminate processes
Multi-Agent SharingHTTP service allows multiple agents to share state

API Reference

POST /exec

Execute a command:

{
  "command": "required - system command",
  "workingDir": "optional - working directory",
  "timeoutSeconds": "optional - default 30",
  "runInBackground": "optional - default false",
  "watchDurationSeconds": "optional - for service startup",
  "env": "optional - custom environment variables"
}

GET /process/:pid

Query process status.

GET /process/:pid/logs

Get process output logs.

DELETE /process/:pid

Terminate a process.

GET /processes

List all background processes.

Response Status

StatusMeaning
successCommand completed, exit code 0
failedCommand failed, non-zero exit
timeoutCommand killed after timeout
killedProcess manually terminated
runningBackground process active

Best Practices

  1. Set reasonable timeout - Prevent stuck commands
  2. Use watch window for services - Confirm startup success
  3. Use background mode for long tasks - Training, data processing
  4. Clean up processes - Terminate when done

Full Documentation

See references/AGENT_GUIDE.md for detailed usage guide and examples.

License

MIT

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Context Cleaner (.md cleanup)

Optimize OpenClaw agent context files by reducing token usage 30-50% with backups, preview, rollback, and preserving core functionality on request.

Registry SourceRecently Updated
Automation

AI Newsletter Toolkit

The complete orchestration suite for 2026 AI-driven newsletters. Automates data harvesting, trend distillation, and multi-channel distribution (Threads/Email...

Registry SourceRecently Updated
Automation

Elevenlabs Conversational

Full ElevenLabs platform integration — text-to-speech, voice cloning, and Conversational AI agent creation. Not just TTS — build interactive voice agents wit...

Registry SourceRecently Updated
Automation

Pipedrive

Pipedrive integration. Manage crm and sales data, records, and workflows. Use when the user wants to interact with Pipedrive data.

Registry SourceRecently Updated