pwn-ai-agent-policy

pwn-ai-agent-policy is a skill for Claude Code, Codex from 0dayInc/pwn. It costs 20 tokens per session (669 once invoked), scanned A, original, MIT.

A controller for choosing tools during automated agent tasks. It learns from earlier tool results and stores those choices for later runs.

In plain words
What is it for?
Use it when running pwn-ai evaluations that need the PWN::AI::Agent::Policy module to select actions and record learning data.
Why use it?
It reduces repeated poor tool choices by using feedback from previous tasks, while leaving the main planning system in control.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/0dayinc/pwn/policy
Any agent
npx skills add 0dayInc/pwn --skill policy
Clone the repo
git clone --depth 1 https://github.com/0dayInc/pwn

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pwn-ai-agent-policy

README.md
[![agentmods](https://agentmods.dev/badge/skills/0dayinc/pwn/policy.svg)](https://agentmods.dev/skills/0dayinc/pwn/policy)
Your own site
<a href="https://agentmods.dev/skills/0dayinc/pwn/policy"><img src="https://agentmods.dev/badge/skills/0dayinc/pwn/policy.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 669 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.00669
Opus 5 $0.00010 $0.00334
Sonnet 5 $0.00004 $0.00134
Haiku 4.5 $0.00002 $0.00067

Measured 5d ago against content hash 157cd8dda71b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pwn-ai-agent-policy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

etc/default_skills/pwn/ai/agent/policy/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PWN::AI::Agent::Policy

PWN::AI::Agent::Policy is the LIVE tabular RL controller that pwn-ai did not have before R5. Everything else in the harness is retrieval-plus-policy: scores are written to disk and re-injected as prose, or exported later for optional LoRA. This module is the missing MDP: state s — discretized (kind, task, plan, completeness, usable, last, fail) action a — tool name, or "final" reward r — step: 0 (spam cost −0.01 after 8 tools); terminal: judge × confidence next s' — state after the tool result Each Loop turn is one episode. Transitions land in ~/.pwn/policy_traj.jsonl. Q(s,a) and REINFORCE logits H(s,a) are updated from those tuples and persisted in ~/.pwn/policy.json. The learned Q values are an ADVISORY term in Registry.rank. They never replace TaskSummarizer planning, plan_first, or CORE_TOOLS. Disable with PWN::Env[:ai][:agent][:policy] = false.

When to use

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

Methodologies

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

How to call

PWN::AI::Agent::Policy.help
PWN::AI::Agent::Policy.state(opts)

Public methods

  • state
  • cold
  • warm
  • episode_budget_met
  • begin_episode
  • observe_step
  • finish
  • update_q
  • update_pg
  • q
  • value
  • advantage
  • recommend
  • current_state
  • current_episode
  • detach_episode
  • attach_episode
  • load
  • save
  • trajectories
  • stats
  • evaluate
  • to_context
  • lean
  • reset
  • enabled
  • authors
  • help
  • warmup
  • maybe_warmup
  • attach_episode!
  • cold?
  • detach_episode!
  • enabled?
  • episode_budget_met?
  • lean!
  • maybe_warmup!
  • update_pg!
  • update_q!
  • warm?
  • warmup!

Source

pwn/ai/agent/policy.rb

Verification

PWN::AI::Agent::Policy.respond_to?(:state) after the module is loaded. Read the source for parameter names.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 86 lines · 20 tokens per session scan A 157cd8dda71b

Subscribe to this mod's changes

pwn-ai-agent-policy is a skill published in the GitHub repository 0dayInc/pwn (78 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 669 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyzing-linux-elf-malware

Analyze malicious Linux ELF binaries — botnets, cryptominers, ransomware, and rootkits targeting Linux servers, containers, and cloud infrastructure — through static analysis, dynamic tracing, and reverse engineering of x8664 and ARM samples. Use when investigating Linux malware, triaging a suspicious ELF binary…

mukul975/Anthropic-Cybersecurity-Skills · 82 tokens

osmedeus-expert

Expert guide for the Osmedeus security automation workflow engine. Use when: (1) writing or editing YAML workflows (modules and flows), (2) running osmedeus CLI commands (scan, workflow management, installation, server), (3) configuring steps, runners, triggers, or template variables, (4) debugging workflow execution…

j3ssie/osmedeus · 113 tokens

supabase

Supabase / PostgREST Row-Level-Security playbook — pull the anon (or leaked servicerole) key out of the frontend JS, map tables from the auto-generated OpenAPI spec, test anonymous RLS READ disclosures (PII/secret leaks), and anonymous RLS WRITE abuse (insert/update/delete — e.g. forging…

PentesterFlow/agent · 120 tokens

graphql

GraphQL pentest playbook — find the endpoint, dump the schema (introspection or field-suggestion fallback), then test for authorization gaps, query batching, alias overload, depth-based DoS, and SQLi/NoSQLi in resolver arguments. Use when the target exposes a /graphql endpoint, GraphiQL, Apollo, or accepts GraphQL…

PentesterFlow/agent · 75 tokens

jwt

JWT attack playbook — algorithm confusion (alg=none, HS/RS confusion), kid path traversal/SQLi, jku/x5u SSRF, weak HS256 cracking, and embedded JWK trickery. Use when the target uses JWTs for auth (header.payload.signature).

PentesterFlow/agent · 60 tokens

performing-jwt-none-algorithm-attack

Execute and test the JWT none algorithm attack to bypass signature verification by manipulating the alg header field in JSON Web Tokens.

xalgorix/xalgorix · 34 tokens