ai-agent-security
Skill by sickn33
Provides design guidance and code sketches for securing AI agents against prompt injection, tool abuse, and data exfiltration. It is aimed at developers building agentic AI systems who want defense-in-depth controls.
Install ai-agent-security
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/ai-agent-security ~/.claude/skills/ai-agent-securityRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agentic-awesome-skills/skills/ai-agent-security ~/.gemini/antigravity-cli/skills/ai-agent-securityAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
AI Agent Security is a SKILL.md guide for protecting agentic AI systems from adversarial input, unsafe tool execution, data leakage, and privilege abuse. It applies STRIDE to agent components and covers prompt injection, tool abuse, data exfiltration, cross-tenant leakage, and privilege escalation.
The skill includes Python input validation sketches with regex injection patterns, a guard decorator, Docker and gVisor sandbox configurations, and a tool allowlist example. The source calls these partial design sketches, not a working security boundary, and says authorization must be enforced server-side. It is intended for developers building agents with frameworks such as LangChain, CrewAI, Autogen, or custom code.
Written from the project's SKILL.md and checked against it.
What it can do
- STRIDE threat modelMaps spoofing, tampering, repudiation, disclosure, denial of service, and privilege escalation to agent-specific controls.
- Prompt injection detectionProvides regex patterns and a validation function that flag instruction overrides and control tokens.
- Input guard decoratorBlocks unsafe input at agent entry points and logs a hashed security event.
- Docker sandbox configurationSets a read-only container with dropped capabilities, memory and CPU limits, and an internal network.
- gVisor runtime setupShows how to install the runsc runtime and run tool execution with network disabled.
- Tool allowlist sketchDefines per-tool argument types, session call limits, path and SQL patterns, and approval flags.
What you need
- Python 3.10+
- Docker or Podman
- OpenTelemetry collector
- Policy engine such as OPA or Cedar
- Security scanners and vault CLIs for active assessments
Try asking
- Review my agent's input handling for prompt injection risks.
- Help me set up a Docker sandbox for my agent's tool execution.
- Design a tool allowlist with call limits for my agent's file and database tools.
Good to know
- Partial design sketches, not a working security boundary.
- Regex and classifier checks have false positives and false negatives.
- Docs-only; helper scripts and templates are not bundled.
- The allowlist counters are not concurrent-safe or tenant-isolated as written.
Security check
C- Asks for administrator rights (sudo)In
skills/ai-agent-security/SKILL.md:sudo
Checked automatically: skills/ai-agent-security/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md15 KB -
references/details.md32 KB
Alternatives to ai-agent-security
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
ai-agent-security: common questions
Is this a complete security solution for AI agents?
No. The source says these are partial design sketches, not a working security boundary, and that tenant identity and approved actions must be enforced in the tool service.
What kinds of threats does it cover?
It applies STRIDE to agentic components and covers prompt injection, tool abuse, data exfiltration, cross-tenant leakage, and privilege escalation.
What do I need to use the examples?
The source lists Python 3.10+ for guardrail code, Docker or Podman for sandbox execution, an OpenTelemetry collector for audit logs, and a policy engine such as OPA or Cedar.
How do I install ai-agent-security?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is ai-agent-security free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is ai-agent-security safe to use?
It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (asks for administrator rights (sudo)). Review the code before you install. How grades work.
What are alternatives to ai-agent-security?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
