Guide · Agent skill
How to use the AI Agent Security agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The ai-agent-security skill is a documentation-and-examples guide that helps an AI agent work with you on securing agentic AI systems, meaning AI that calls tools, reads documents and takes actions. It covers a STRIDE threat model for agents, Python patterns for screening inputs for prompt-injection signs, sandboxing guidance and a permissions example. After this guide you will know how to install the skill, ask for the help you need and understand what it can and cannot protect.
Quick start
- 1Download and unzip the skill. Download the ZIP from this page and unzip it. Confirm you have SKILL.md and references/details.md.
- 2Place it where your agent looks. Copy the folder to ~/.claude/skills/ for personal use or to .claude/skills/ in your project. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Confirm prerequisites. Make sure Python 3.10+ is available for the guardrail examples. Decide whether you will use Docker or Podman, an OpenTelemetry collector and OPA or Cedar.
- 4Ask for a threat model. Describe your agent, its tools, the data it reads and whether it is multi-tenant. Ask for a STRIDE threat model.
- 5Request input screening and logging. Ask for the prompt-injection screening and audit logging examples, then adapt them to your framework.
- 6Move enforcement to the server. Implement tenant checks, tool permissions and approvals in your tool services using server-side identity, as the skill recommends.
- 7Test failure paths. Test blocked input, tool errors and concurrent requests before relying on any control in production.
What does the AI Agent Security skill make the agent do?
When you load this skill, the agent can help you design and review security controls for an agent you are building. The skill is organised around a STRIDE threat model applied to agent components, with a table pairing each threat (spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege) with an agent-specific example and a control.
It also explains five threat categories: prompt injection, tool abuse, data exfiltration, cross-tenant leakage and privilege escalation. For implementation, it provides example Python code that screens input for prompt-injection patterns, blocks unsafe input before it reaches the model and logs security events.
- Threat modelling for agent components using STRIDE
- Example regex-based input validation and a guard decorator
- Guidance on Docker or Podman sandboxing for tool execution
- An OPA Rego example for per-role tool access (in references/details.md)
Install the skill: ZIP download or Claude apps upload
Download the ZIP for this skill from this page and unzip it. For a personal install, place the skill folder in ~/.claude/skills/. For a single project, place it in the project's .claude/skills/ folder.
If you use the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.
The package contains two files: SKILL.md, which is the entry point, and references/details.md, which holds the extended permissions content.
- Personal: ~/.claude/skills/
- Project: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills
Check what you need before you start
The example guardrail code requires Python 3.10 or later. The guide recommends Docker or Podman for sandbox execution, an OpenTelemetry collector for audit logging and a policy engine such as OPA or Cedar for permission boundaries. It also assumes familiarity with your agent framework, such as LangChain, CrewAI, Autogen or custom code.
For any active security assessment, the compatibility note says you need the relevant tooling (scanners or vault CLIs) and an authorised scope. The skill bundles no scanners, scripts or templates.
- Python 3.10+ for guardrail examples
- Docker or Podman for sandboxing (recommended)
- OpenTelemetry collector for audit logging (recommended)
- OPA or Cedar policy engine (recommended)
- Authorised scope and your own scanners for any active assessment
How to trigger the skill with natural requests
You do not need a special command. Describe the task in plain language and mention agents, tools or security so the agent picks up the skill. Good requests name your system and the outcome you want, for example a review of a specific design or a list of threats for a specific tool.
Keep the scope clear. Say which tools the agent can call, what data it can read, and whether it runs in a multi-tenant setup. The skill's advice depends on those details.
- "Build a STRIDE threat model for my support agent that can read tickets and call a refund API."
- "Review this LangChain agent for tool abuse and privilege escalation risks."
- "Show me an input screening function for prompt injection I can add to my agent's entry point."
- "Draft the approval and audit logging section of our design doc for an agent that writes to our database."
Use the example code safely
The skill states that its regex and classifier code is a partial sketch, not a working security boundary. Regexes have false positives and false negatives, and prompt text cannot grant permissions. Enforcement belongs in the tool service, using authenticated server-side context for tenant identity, resource scope and approved actions.
Approvals should be bound to the exact operation and arguments, and rechecked immediately before execution. Test failure paths and concurrency before production use. Containers share the host kernel, so do not mount the Docker socket or host credentials; run as a non-root user and restrict mounts and egress.
- Treat is_safe as a heuristic result, never as authorisation
- Put RBAC and tenant checks in your tool services, not in the prompt
- Do not mount the Docker socket or host credentials into sandboxes
- Test failure paths before production
@input_guard()
async def handle_user_message(message: str, session_id: str, **kwargs):
return await agent.run(message, session_id)Review permissions with the OPA Rego example
The references/details.md file contains an RBAC policy written in OPA Rego. It defines reader, writer, operator and admin roles, each with a set of tool names such as read_file, run_query, write_file and manage_secrets. The policy starts with allow set to false by default.
The file notes that identity and the current hour must come from trusted server context, not from the request. Use the example as a starting point for your own role design.
- Default-deny: allow is false unless a rule grants access
- Roles map to explicit tool sets, from reader up to admin
- Identity must come from trusted server context
default allow = falseWhat people use it for
- Drafting a STRIDE threat model for a customer-support agent that calls internal APIs
- Reviewing a LangChain or CrewAI agent for tool abuse and privilege escalation paths
- Writing the approvals and audit logging section of a design document
- Sketching an input-screening step for agent entry points as a starting point for testing
- Defining role-based tool access with an OPA Rego policy for reader, writer and admin agents
Frequently asked questions
How do I install the AI Agent Security skill?
Download the ZIP from this page and unzip it. Put the folder in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
What do I need to use this skill?
The example code needs Python 3.10 or later. The guide recommends Docker or Podman for sandboxing, an OpenTelemetry collector for audit logging and a policy engine such as OPA or Cedar. Active security assessments also need your own scanners or vault CLIs and an authorised scope.
Is the AI Agent Security skill free?
The skill is listed under the MIT licence. The source does not mention pricing, so check the licence file in the source repository for the terms.
Does installing this skill protect my AI agent?
No. The skill provides guidance and example code only. Its own text says the regex and classifier code is a partial sketch, and enforcement must live in server-side policy and tool services.
Does the skill run scripts or use the network?
The skill does not run scripts and does not use the network. It bundles no scanners or helper scripts; the code in its text is for you to copy and adapt.
How does this compare with other agent security tools?
This skill is a design guide with threat models and examples, not a scanner or runtime protection product. If you need turnkey enforcement or active testing, use a dedicated policy engine, monitoring product or authorised security tool alongside it.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you are a developer or security reviewer who needs a structured threat model and starting code for screening agent inputs and designing approvals. Pick a different tool if you want turnkey production protection, active scanning, or a no-code solution, since the skill itself protects nothing once installed.
Download the skill