pwn-ai-agent-turnfinalizer

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

A Ruby helper that finishes an AI agent's turn after the user-facing answer has been sent. It moves some learning work, such as judging and reflection, to the background.

In plain words
What is it for?
Use it from pwneval when an agent needs background learning after replying. It helps enter and leave the user path, defer work, finalize turns, and wait for all pending work.
Why use it?
It keeps post-reply learning from delaying the answer while preserving the turn's recorded data. It also provides a standard way to manage pending and completed finalization work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it from pwneval when an agent needs background learning after replying. It helps enter and leave the user path, defer work, finalize turns, and wait for all pending work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/0dayinc/pwn/turn_finalizer
View source ↗ 0dayInc/pwn
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.

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

Made for: Claude Code.

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-turnfinalizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/0dayinc/pwn/turn_finalizer/github.svg)](https://agentmods.dev/skills/0dayinc/pwn/turn_finalizer)
Your own site
<a href="https://agentmods.dev/skills/0dayinc/pwn/turn_finalizer"><img src="https://agentmods.dev/badge/skills/0dayinc/pwn/turn_finalizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pwn-ai-agent-turnfinalizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/0dayinc/pwn/turn_finalizer"><img src="https://agentmods.dev/badge/skills/0dayinc/pwn/turn_finalizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 548 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00024 $0.00548
Opus 5.5 $0.00010 $0.00219
Sonnet 5.5 $0.00005 $0.00110
Haiku 4.5 $0.00002 $0.00055

Measured 2mo ago against content hash 913464ad49dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pwn-ai-agent-turnfinalizer 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 2mo 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/turn_finalizer/SKILL.md · 70 lines

What it actually says

PWN::AI::Agent::TurnFinalizer

agent-style post-reply learning. Loop.run returns the user-visible answer first; Reward / Policy / Curriculum keep running off that path. User-visible turn (Loop.run) tools, streaming, TaskSummarizer, final text After the reply is already decided TurnFinalizer.defer -> daemon thread re-attaches the R5 episode snapshot Learning.auto_introspect (critic, Reward.judge, PRM, HER, reflect) Default ON during Loop.run (PWN::Env[:ai][:agent][:defer_introspect]). Direct Learning.auto_introspect calls (specs, cron, tools) stay inline so existing ORM contracts still get a synchronous return value.

When to use

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

Methodologies

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

How to call

PWN::AI::Agent::TurnFinalizer.help
PWN::AI::Agent::TurnFinalizer.enter_user_path(opts)

Public methods

  • enter_user_path
  • leave_user_path
  • user_path
  • should_defer
  • defer
  • finalize
  • join_all
  • pending
  • commit_artifacts
  • required_artifacts
  • output_paths
  • artifact_snapshot
  • observe_artifacts
  • arbitrate
  • evidence_ledger
  • evidence_satisfied
  • authors
  • help
  • commit_artifacts!
  • enter_user_path!
  • evidence_satisfied?
  • join_all!
  • leave_user_path!
  • should_defer?
  • user_path?

Source

pwn/ai/agent/turn_finalizer.rb

Verification

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

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. 2mo ago Changed · +3 lines 913464ad49dc
  2. 2mo ago Changed · +3 lines 93363783bbdd
  3. 2mo ago Changed · +4 lines 77d1e794d480
  4. 3mo ago First seen · 60 lines · 24 tokens per session scan A a4e289803d89

Subscribe to this mod's changes

pwn-ai-agent-turnfinalizer is a skill published in the GitHub repository 0dayInc/pwn (102 stars, last pushed 3d ago), licensed MIT. It adds 24 tokens to every session and 548 once invoked, about $0.0001 per session on Opus 5.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

pwn-ai-agent-turnfinalizer compared with skills from other repositories

pwn-ai-agent-turnfinalizer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pwn-ai-agent-turnfinalizer0dayInc/pwnSkill1023d agoMITA24Claude Code
osmedeus-expertj3ssie/osmedeusSkill6.7k5d agoMITA113Claude Code, Codex
performing-jwt-none-algorithm-attackxalgorix/xalgorixSkill1.5ktodayApache-2.0A34Claude Code, Codex
performing-ai-assisted-vulnerability-discoveryxalgorix/xalgorixSkill1.5ktodayApache-2.0A91Claude Code, Codex
analyzing-linux-elf-malwaremukul975/Anthropic-Cybersecurity-SkillsSkill37k3mo agoApache-2.0B82Claude Code
performing-zero-day-vulnerability-discoveryxalgorix/xalgorixSkill1.5ktodayApache-2.0B36Claude Code, Codex
supabasePentesterFlow/agentSkill1.5k3mo agoApache-2.0A120Claude Code