Unexpected Code Execution Detection
100TrustedPre-approves toolsIdentification of command injection, eval abuse, and remote code loading risks in agents.
What it does
Unexpected Code Execution Detection transforms an assistant into a diagnostic auditor for its own operations. By adding this capability, you instruct the agent to actively monitor whether its command-line or code-evaluation processes are susceptible to external interference.
This is a specialized auditing component designed for developers managing AI assistants that possess direct system access. It ensures that any request to trigger shell commands or interpret code undergoes validation to prevent unauthorized operations, marking potentially dangerous inputs before they can cause harm.
When it earns its place
Reach for it when…
Use this when your agent interacts with shell environments, interprets snippets of programming code, or pulls external modules from dynamic URLs. It is essential for verifying that input sanitization controls are functional.
Look elsewhere when…
This is not designed for agents that only perform standard text analysis or internal document retrieval without executing commands. It will not identify non-code-related security flaws, such as data exfiltration via prompt injection or bypasses of standard textual filters.
What to say to use it
You never invoke a skill directly — the assistant picks it up when your request matches what it covers. These are the kinds of things that do that.
- check if my agent is vulnerable to command injection
- see if the assistant executes unauthorized python code
- detect potential remote code loading flaws
- test if user input triggers system commands
Install it
Install for all your projects
Copy the skill directory into your personal skills folder. Claude picks it up on its own the next time your request matches what it does — there is nothing to enable.
git clone --depth 1 --branch main https://github.com/Tencent/AI-Infra-Guard.git /tmp/AI-Infra-Guard
mkdir -p ~/.claude/skills
cp -r /tmp/AI-Infra-Guard/agent-scan/agent_scan/prompt/skills/unexpected-code-execution-detection ~/.claude/skills/unexpected-code-execution-detectionInstall for one project only
Put it in the project's own skills folder instead, so it can be committed and shared with everyone working on that repository.
cp -r /tmp/AI-Infra-Guard/agent-scan/agent_scan/prompt/skills/unexpected-code-execution-detection .claude/skills/unexpected-code-execution-detectionIf a skill of the same name exists in both places, the personal one wins.
Installing on Claude.ai or through the API instead? The full guide covers every surface.
Pair it with an MCP server
Unexpected Code Execution Detection changes how the work is done. These servers change what Claude can reach while doing it.
- PortSwigger MCP Server73The skill supplies the review method; PortSwigger MCP Server supplies the findings to run that method against.
- GitHub MCP Server53With GitHub MCP Server, a security review reads the code as it is committed rather than as it is described.
- Bitwarden MCP Server36Bitwarden MCP Server shows how credentials are actually held, which is usually where a compliance check finds its answer.