
from agentguard101
Realtime pattern-based detection and sanitization for prompt and command injection, designed to screen GitHub issues, sanitize inputs, and stop dangerous comman
Agent Guard is a real-time security framework that detects and sanitizes prompt and command injection attempts aimed at AI agents. It applies pattern-based detectors for command execution (npm, curl|bash, rm -rf), prompt-injection phrases (ignore previous instructions, developer mode), social engineering cues, and specialized GitHub issue screening for Clinejection-style attacks. The tool can replace dangerous segments with safe placeholders and produce threat reports.
Use Agent Guard wherever untrusted text could influence agent behavior: screening GitHub issue titles/bodies, sanitizing user-supplied prompts, or pre-filtering web-scraped content before model consumption. It is appropriate in CI pipelines, moderation layers, or any agent pipeline that executes commands or generates actions based on external text.
agent_guard.py, mcp_server.py, and cli.py for local testing and integration.Built primarily for OpenClaw/Claude MCP deployments but usable as a standalone Python library. It integrates easily with agent runtimes that can call a local sanitize/analyze endpoint or run a CLI check before executing actions.
Quality assessment: substantive, actionable, and security-focused — suitable to save.
Agent Guard provides pattern-based prompt injection detection and sanitization for AI agents, inspired by the Clinejection incident. The SKILL.md is detailed and well-structured with clear usage examples, API docs, and detection pattern lists. No scripts were bundled for execution testing. The skill claims zero dependencies for core engine (Python stdlib only), which is good for security but unverified without runnable scripts.
Security-focused skill — no dangerous commands, no exfiltration, no hardcoded credentials. Minor concern: the SKILL.md references pip install and curl patterns as detection targets, not as commands to execute. Well-documented with clear frontmatter. No bundled scripts so static analysis only.