Skip to content
Back to skills

Agent Safety Guards

ASecurity

Use when hardening AI agents against over-action, unintended side effects, and prompt injection — layering input validation, output filtering, tool allowlists, scope enforcement, and human approval gates. Triggers on \"agent guardrails\", \"agent safety guards\", \"prevenir over-action agente\", \"segurança agente LLM\".

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsshellrailsapi

Works with

  • api

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add majinmagros/magros.ai-skills --skill agent-safety-guards --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Safety Guards?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Safety Guards
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majinmagros-agent-safety-guards/badge)](https://www.skillsdirectory.com/skills/majinmagros-agent-safety-guards)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-safety-guards
description: "Use when hardening AI agents against over-action, unintended side effects, and prompt injection — layering input validation, output filtering, tool allowlists, scope enforcement, and human approval gates. Triggers on \"agent guardrails\", \"agent safety guards\", \"prevenir over-action agente\", \"segurança agente LLM\"."
metadata:
  origin: ECC
---

# Agent Safety & Guardrails

Layered defense patterns to prevent AI agents from taking unintended or harmful actions, covering input intent-checking, output filtering, tool allowlists, scope enforcement, and human approval gates.

## When to Activate

- Deploying agents with tool access (file ops, API calls, shell commands)
- Adding authentication, payment, or data-modification capabilities
- Hardening agent loops against prompt injection and jailbreak attempts
- Setting up human-in-the-loop gates for sensitive operations

## Core Layers

1. **Input Validation**: Intent classification before execution — reject ambiguous or out-of-scope requests.
2. **Tool Allowlist & Scope**: Enforce least-privilege tool sets per agent; limit file paths, API endpoints, and command arguments.
3. **Output Filtering**: Scan model outputs for unintended actions, secrets leakage, or instruction override attempts.
4. **Human Approval Gates**: Require explicit confirmation for destructive, costly, or irreversible operations.
5. **Kill Switch & Read-Only-First**: Default to dry-run mode; enable write/execute only after validation pass.

## Best Practices

- Implement read-only-first rollout with progressive autonomy.
- Log all tool invocations with full context for auditability.
- Use deterministic hooks (PreToolUse/PostToolUse) for enforcement rather than prompt-only rules.
- Test against adversarial inputs and edge-case scenarios regularly.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.