# Pwn AI Agent Toolguard

> Drive PWN::AI::Agent::ToolGuard from pwn_eval.

- Skill: `0dayinc/pwn-ai-agent-toolguard` (Agent Skill)
- Install (CLI): `npx get-skill add 0dayinc/pwn-ai-agent-toolguard`
- Raw SKILL.md: https://api.skillmd.com/api/skills/0dayinc/pwn-ai-agent-toolguard/raw
- Safety review: pending (external: skill-scanner PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: 0dayInc (https://skillmd.com/u/0dayinc)
- Updated: 2026-11-19
- Page: https://skillmd.com/skills/0dayinc/pwn-ai-agent-toolguard

---


# PWN::AI::Agent::ToolGuard

Shared pre-dispatch guards for the two high-volume runtime tools (shell / pwn_eval). Rejects placeholder payloads, aliases wrong schema keys, and names the shell that will actually run the command.

## When to use

Call `PWN::AI::Agent::ToolGuard` from `pwn_eval` when the task needs this module.
Do not reimplement it in shell.

## Methodologies

Generated from `pwn/ai/agent/tool_guard.rb`. Prefer the public class methods below.
Class methods take `(opts = {})` and read `opts`.

## How to call

```ruby
PWN::AI::Agent::ToolGuard.help
PWN::AI::Agent::ToolGuard.unwrap_payload(opts)
```

## Public methods

- `unwrap_payload`
- `present`
- `placeholder`
- `placeholder_match`
- `bashism`
- `bashism_match`
- `shell_syntax_surface`
- `mint_canary`
- `canary_leak`
- `injection_score`
- `quarantine_output`
- `shell_bash`
- `shell_name`
- `protect_http`
- `protect_core_constants`
- `coerce_args`
- `invalid_payload`
- `denial`
- `host_load`
- `deadline_s`
- `reset_timeout_budget`
- `mutation_count`
- `payload_spent`
- `note_timeout`
- `next_timeout`
- `timeout_lesson`
- `timeout_result`
- `timeout_prior_count`
- `refuse_copied_persist`
- `scope_refusal`
- `policy_decision`
- `scope_check`
- `rfc1918`
- `ip_in_cidr`
- `command_class`
- `record_runtime`
- `predicted_timeout`
- `auto_job`
- `authors`
- `help`
- `auto_job?`
- `bashism?`
- `canary_leak?`
- `ip_in_cidr?`
- `note_timeout!`
- `placeholder?`
- `present?`
- `protect_core_constants!`
- `protect_http!`
- `refuse_copied_persist?`
- `reset_timeout_budget!`
- `rfc1918?`
- `scope_check!`
- `shell_bash?`

## Source

`pwn/ai/agent/tool_guard.rb`

## Verification

`PWN::AI::Agent::ToolGuard.respond_to?(:unwrap_payload)` after the
module is loaded. Read the source for parameter names.

