command-guard

Enforce .agentpolicy rules before executing commands.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 30, 2025⬇️1downloads

When & Why to Use This Skill

The command_guard skill serves as a critical security layer for AI agents, designed to enforce strict operational boundaries by validating commands against .agentpolicy rules. It proactively prevents the execution of destructive or unauthorized actions, ensuring that agentic workflows remain safe, compliant, and under control through automated blocking and human-in-the-loop confirmation mechanisms.

Use Cases

  • Preventing accidental system damage: Automatically blocking high-risk commands like recursive deletions or system-wide configuration changes in production environments.
  • Enforcing organizational compliance: Ensuring AI agents strictly adhere to security protocols defined in .agentpolicy and .agentignore files to maintain data integrity.
  • Risk mitigation with human-in-the-loop: Identifying sensitive operations and pausing execution to request explicit supervisor approval before proceeding with risky tasks.
  • Audit and accountability: Maintaining a detailed Action Log of all allowed, blocked, and confirmed commands to provide transparency in agentic operations.
namecommand_guard
descriptionEnforce .agentpolicy rules before executing commands.
short-descriptionCommand safety guard

Purpose

Prevent destructive or risky commands without explicit approval.

Steps

  1. Read .agentpolicy before running commands.
  2. Block denied commands and request confirmation for guarded ones.
  3. Record the decision in the Action Log.

Guardrails

  • Always respect .agentpolicy and .agentignore.