
Agent security hardening
Gives agents a hardening checklist and enforceable controls for untrusted input, tools
Agent security hardening is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 66
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Agent security hardening
This skill guides the review and hardening of AI agent runtimes, tool gateways, memory services and multi-tenant deployments. It asks the agent to map each trust boundary from source through parser and validator to side effect, recording the authorizing identity, the validator that runs just before the action, size limits and recovery paths for every write, command, network mutation or credential use.
The guidance comes with concrete Python patterns: an agent identifier allowlist with a 64-character ceiling, environment value checks, URL and redirect rules that resist DNS rebinding and credential leakage, and a workspace path resolver that blocks traversal, Windows-reserved names and alternate data stream syntax. It also covers owner-only temp files, secret redaction before logging, and byte-limited tool output handling.
The skill expects the agent to write tests that run through the real entry point and to report commands, exit codes and confirmed absence of side effects. It states that mock-only tests do not verify OS permissions, symlink handling or egress controls, and it points to separate skills for ordinary application security review and repository scanning.
When your agent uses it
Security hardening guidance for AI agent frameworks that process untrusted content, invoke tools, write workspace files, manage runtime identifiers, or handle credentials. Use when building or reviewing an agent runtime, autonomous worker, tool gateway, memory service, or multi-tenant agent deployment. Do not use for general web application security or offensive testing.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (11 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the rea-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafathOr copy only this skill to ~/.claude/skills/agent-security-hardening:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/agent-security-hardening &&
cp -R "$tmp/.agents/skills/agent-security-hardening" ~/.claude/skills/agent-security-hardening &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/agent-security-hardening inside it instead.
Copy the skill folder to ~/.agents/skills/agent-security-hardening to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/agent-security-hardening &&
cp -R "$tmp/.agents/skills/agent-security-hardening" ~/.agents/skills/agent-security-hardening &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/agent-security-hardening inside it instead.
Copy the skill folder to ~/.cursor/skills/agent-security-hardening to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/agent-security-hardening &&
cp -R "$tmp/.agents/skills/agent-security-hardening" ~/.cursor/skills/agent-security-hardening &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/agent-security-hardening inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/agent-security-hardeningOr copy the folder to ~/.gemini/skills/agent-security-hardening yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/agent-security-hardening:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/agent-security-hardening &&
cp -R "$tmp/.agents/skills/agent-security-hardening" ~/.copilot/skills/agent-security-hardening &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/agent-security-hardening inside it instead.
Get the folder:
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.gitThen copy REA_Skill/.agents/skills/agent-security-hardening into your agent's skills folder as agent-security-hardening. Agents that support SKILL.md read one folder per skill.
What it does
- Trust boundary mapping
- Traces each input from source through validator to side effect and names the authorization for every write or command.
- Identifier and URL validation
- Allowlists agent IDs, checks environment values and restricts schemes, hosts and redirects for outbound calls.
- Filesystem containment
- Resolves workspace paths and rejects traversal, symlink escapes, reserved device names and alternate data streams.
- Secret and temp file protection
- Sets owner-only permissions, cleans up in finally blocks and keeps credentials out of logs and arguments.
- Bounded tool output
- Caps tool output size, strips control characters and returns typed failures instead of silent empty results.
- Verification gate
- Lists behaviors to prove through the real entry point before calling a framework hardened.
Good for
- Review an agent runtime for unsafe file writes from model output
- Add path containment checks to a tool gateway that writes workspace files
- Validate agent IDs and tenant identifiers in a multi-tenant agent service
- Audit how an agent handles credentials, logs and temporary files
- Check outbound URL handling for SSRF and credential forwarding on redirects
Agent security hardening FAQ
When should Agent security hardening trigger?
It applies when building or reviewing an agent runtime, autonomous worker, tool gateway, memory service or multi-tenant agent deployment. It is not meant for general web application security or offensive testing.
Does Agent security hardening include runnable scripts?
No scripts are included. It provides Python code snippets for identifier validation, environment checks and workspace path containment inside the SKILL.md.
What does Agent security hardening expect from the developer?
It expects the framework under review to be available so tests can run through its real entry points. It asks for command output, exit status and evidence that side effects did not occur.
Does Agent security hardening replace general security review?
No. The skill says ordinary application security such as SQL injection or XSS belongs to a separate security-review skill, and repository-wide scanning to security-scan.
How do I install Agent security hardening in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/agent-security-hardening to use it in all your projects, or to .claude/skills/agent-security-hardening in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.
Does Agent security hardening run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Agent security hardening?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Agent security hardening?
The closest alternatives to Agent security hardening are Agent action safety, Security, Security review, Security reasoning and Skill scanner.
Where this comes from
- Description: from the skill's own SKILL.md.
More from smartworldarafath/REA_Skill

Guides building and auditing UI to WCAG 2.2 AA across web, iOS and Android
- Open source
- 66 GitHub stars
- Developer tools

Diagnoses agent and LLM stacks for hidden failures and ranks the fixes by severity
- Open source
- 66 GitHub stars
- Developer tools

Compare coding agents head-to-head on your own tasks by pass rate, cost and time
- Open source
- 66 GitHub stars
- Developer tools

Guides an agent to design tool sets, observations and error recovery for better completion
- Open source
- 66 GitHub stars
- Developer tools

Gives an agent a structured capture-diagnose-recover loop for failing runs
- Open source
- 66 GitHub stars
- Developer tools

Lets an AI agent make x402 payments within per-task budgets and spending policies
- Open source
- 66 GitHub stars
- Finance and payments







