agent-security-audit — Claude Code skill: audit AI agent security
agent-security-audit is a Claude Code skill that checks AI agent configurations for vulnerabilities. Run it when reviewing CLAUDE.md files, MCP configs, and agent orchestration code.
CC-BY-4.0 302 installs ★ 230 updated 2026-10-15
npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a claude-codeWhat agent-security-audit does
The skill walks through a complete audit procedure from OWASP. First, enumerate every tool, MCP server, file system path, network access, and credential your agent has—then flag capabilities that exceed its stated purpose. Next, examine each input path: user messages, tool outputs, MCP resources, RAG documents. For each, assess whether carefully crafted input could force the agent to call unintended tools, override its instructions, or leak sensitive data.
The skill flags chains of tool calls that are individually safe but combine into harm. It maps data exfiltration routes—how secrets flow into external tool parameters, file contents into web requests, data forwarded between MCP servers, sensitive information captured in logs. For every tool, check whether user-controlled input can reach its parameters without validation, identifying command injection, path traversal, SSRF, and SQL injection risks. Finally, evaluate defenses: safety instructions in the system prompt, confirmation before tool execution, output filtering, rate limiting, audit logging, sandboxing.
Output includes a permission inventory table, prioritized risk findings, an injection surface map, and recommendations aligned with OWASP standards for LLM security.
What it helps with
- discover excessive permissions and tools outside the agent's intended role
- locate where user input reaches tool parameters without sanitization
- flag tool-call chains that are individually safe but collectively dangerous
- map pathways where sensitive data leaves the agent boundary
- verify presence of guardrails: system prompts, confirmations, filters, logging
Example prompts for the agent
- Audit the MCP config in
.claude/mcp.jsonfor overly broad permissions - Identify prompt injection surfaces in
CLAUDE.mdand agent orchestration code - Check whether a sequence of tool calls could lead to data exfiltration
How to install agent-security-audit
1Skills CLI (Vercel)
npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a claude-code2Manually: put the files in place
~/.claude/skills/agent-security-audit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agent-security-audit/
1Skills CLI (Vercel)
npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a codex2Manually: put the files in place
.agents/skills/agent-security-audit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a cursor2Manually: put the files in place
.cursor/skills/agent-security-audit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install OWASP/secure-agent-playbook plugins/ai-security-skills/skills/agent-security-audit2Manually: put the files in place
.github/skills/agent-security-audit/SKILL.md1Skills CLI (Vercel)
npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a gemini-cli2Platform CLI
gemini skills install https://github.com/OWASP/secure-agent-playbook --path plugins/ai-security-skills/skills/agent-security-auditManually: put the files in place
.devin/skills/agent-security-audit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agent-security-audit
How do I install agent-security-audit in Claude Code?
Run npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a claude-code, then open ~/.claude/skills/agent-security-audit/SKILL.md.
What does agent-security-audit check?
It reviews agent permissions, prompt injection surfaces, tool-call sequences, data exfiltration paths, and presence of guardrails—following OWASP standards for AI security.
How do I use it with other AI platforms?
For Codex: npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a codex. For Cursor: npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a cursor. For GitHub Copilot: gh skill install OWASP/secure-agent-playbook agent-security-audit.
Source text
SKILL.md · CC-BY-4.0
--- name: agent-security-audit description: Audit AI agent configurations for security risks — excessive permissions, prompt injection surfaces, data exfiltration paths, and missing guardrails. Use when reviewing CLAUDE.md files, MCP configs, agent orchestration code, or any AI agent setup. license: CC-BY-4.0 --- # Agent Security Audit Evaluate an AI agent's security posture by following the full procedure in `plays/agent-security-audit.md`. ## Steps 1. **Permission Inventory** — Enumerate every tool, MCP server, file system path, network access, and credential the agent has. Flag capabilities beyond what its stated purpose requires. 2. **Prompt Injection Surface Analysis** — For each input path (user messages, tool outputs, MCP resources, RAG documents), assess whether crafted input could cause the agent to invoke unintended tools, override instructions, or exfiltrate data. 3. **Excessive Agency Assessment (OWASP LLM06)** — Check whether destructive/irreversible actions require confirmation, whether access exceeds need, whether the agent can escalate its own privileges, and whether individually-safe tool calls can chain into harmful outcomes. 4. **Data Exfiltration Path Analysis** — Map how sensitive data could leave the agent boundary: secrets passed to external tools, file contents in web requests, cross-MCP-server data forwarding, sensitive data in logs. 5. **Tool-Call Injection Assessment** — For each tool: can user-controlled input reach tool parameters unsanitized? Check for command injection, path traversal, SSRF, and SQL injection through agent-constructed calls. 6. **Guardrail Evaluation** — Check for system prompt safety instructions, tool call confirmations, output filtering, rate limiting, audit logging, and sandboxing. ## Output Use the finding format from `templates/finding.md`. Produce a Permission Summary table, Risk Findings, Injection Surface Map, and prioritized Recommendations. ## OWASP References - LLM01: Prompt Injection - LLM02: Sensitive Information Disclosure - LLM05: Improper Output Handling - LLM06: Excessive Agency - LLM07: System Prompt Leakage - LLM08: Vector and Embedding Weaknesses
© OWASP · CC-BY-4.0 · OWASP/secure-agent-playbook