ai-agent-security

ai-agent-security is a skill for Claude Code from iradoweck/antigravity-awesome-skills. It costs 25 tokens per session (3,325 once invoked), scanned B, a copy of ai-agent-security, MIT.

A security guide for AI agents that can read information or use tools on a user's behalf. It covers threats such as prompt injection, unsafe actions, data leaks, and excessive permissions.

In plain words
What is it for?
Use it to define tool permissions, validate inputs and tool responses, run tools in sandboxes, filter outputs, and record agent actions for review.
Why use it?
It helps prevent an agent from being tricked into taking destructive actions, revealing private information, or running uncontrolled tool loops. Layered permissions, isolation, validation, and audit logs make its actions easier to restrict and investigate.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python /tools/execute.py --tool="$TOOL_NAME" --args="$TOOL_ARGS".

Part of the agentic-awesome-skills plugin — 255 skills shipped together

Good fit Use it to define tool permissions, validate inputs and tool responses, run tools in sandboxes, filter outputs, and record agent actions for review.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/iradoweck/antigravity-awesome-skills
agentmods
npx agentmods add skills/iradoweck/antigravity-awesome-skills/ai-agent-security

Made for: Claude Code.

Or install agentic-awesome-skills, the plugin that ships this one along with the rest of its 255 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-agent-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/iradoweck/antigravity-awesome-skills/ai-agent-security/github.svg)](https://agentmods.dev/skills/iradoweck/antigravity-awesome-skills/ai-agent-security)
Your own site
<a href="https://agentmods.dev/skills/iradoweck/antigravity-awesome-skills/ai-agent-security"><img src="https://agentmods.dev/badge/skills/iradoweck/antigravity-awesome-skills/ai-agent-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-agent-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/iradoweck/antigravity-awesome-skills/ai-agent-security"><img src="https://agentmods.dev/badge/skills/iradoweck/antigravity-awesome-skills/ai-agent-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,325 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.03325
Opus 5.5 $0.00010 $0.01330
Sonnet 5.5 $0.00005 $0.00665
Haiku 4.5 $0.00003 $0.00332

Measured 1mo ago against content hash 66776bd8ae18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

ai-agent-security scanned grade B with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variablesmediumData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

**Privilege Escalation** — The agent chains low-privilege tool calls to achieve high-privilege outcomes (e.g., read config -> extract credentials -> call admin API).

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

curl -fsSL https://gvisor.dev/archive.key | sudo gpg --dearmor -o /usr/share/keyrings/gvisor-archive-keyring.gpg

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

(r"(?:curl|wget|nc|ncat)\s+", "network_command_inject"),
Origin

This is a copy

100% identical to ai-agent-security — 39 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/agentic-awesome-skills-claude/skills/ai-agent-security/SKILL.md · 394 lines

How it starts

The opening of the file, as written. The whole thing — 394 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AI Agent Security

Protect agentic AI systems from adversarial input, unsafe tool execution, data leakage, and privilege abuse with layered security controls.

Prerequisites

  • Python 3.10+ for guardrail code examples
  • Docker or Podman for sandbox execution
  • OpenTelemetry collector for audit logging
  • Familiarity with your agent framework (LangChain, CrewAI, Autogen, custom)
  • Access to policy engine (OPA/Cedar) for permission boundaries

Threat Model — STRIDE for AI Agents

AI agents introduce a unique threat surface. Apply STRIDE specifically to agentic components:

Threat Agent-Specific Example Control
Spoofing Attacker crafts input that mimics a trusted internal tool response Signed tool responses, HMAC verification
Tampering Prompt injection modifies agent reasoning mid-chain Input validation, prompt armoring
Repudiation Agent takes destructive action with no audit trail Immutable structured logging
Information Disclosure Agent leaks PII, secrets, or internal architecture in responses Output filtering, content classifiers
Denial of Service Adversarial prompt causes infinite tool loops or token exhaustion Rate limits, token budgets, circuit breakers
Elevation of Privilege Agent escalates from read-only to write via chained tool calls RBAC per tool, least-privilege scoping

Key Threat Categories

Prompt Injection — Untrusted content (user input, web scrapes, document contents) manipulates the agent's system prompt or reasoning chain to execute unintended actions.

Tool Abuse — The agent calls tools in sequences or with parameters the designer did not anticipate, achieving effects beyond its intended scope.

Data Exfiltration — The agent encodes sensitive data (credentials, PII, internal IPs) into its responses, tool calls, or outbound HTTP requests.

Cross-Tenant Leakage — In multi-tenant deployments, context from one tenant's session bleeds into another through shared memory, vector stores, or cache.

Read the full file on GitHub · 394 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 394 lines · 25 tokens per session scan B 66776bd8ae18

Subscribe to this mod's changes

ai-agent-security is a skill published in the GitHub repository iradoweck/antigravity-awesome-skills (30 stars, last pushed 5d ago), licensed MIT. It adds 25 tokens to every session and 3,325 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 3 findings (harvests environment variables, asks for root, makes network calls). It is 100% identical to ai-agent-security, differing in 39 lines, and is treated as a copy.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards…

vercel/next.js · 123 tokens