# Pwn AI Agent Learning Mistakes

> Drive PWN::AI::Agent::Learning::Mistakes from pwn_eval.

- Skill: `0dayinc/pwn-ai-agent-learning-mistakes` (Agent Skill)
- Install (CLI): `npx get-skill add 0dayinc/pwn-ai-agent-learning-mistakes`
- Raw SKILL.md: https://api.skillmd.com/api/skills/0dayinc/pwn-ai-agent-learning-mistakes/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: 0dayInc (https://skillmd.com/u/0dayinc)
- Updated: 2026-12-02
- Page: https://skillmd.com/skills/0dayinc/pwn-ai-agent-learning-mistakes

---

---
name: pwn-ai-agent-learning-mistakes
description: Drive PWN::AI::Agent::Learning::Mistakes from pwn_eval.
license: MIT
allowed-tools: [pwn, pwn_eval]
metadata:
  bundled: true
  generated: true
  module: PWN::AI::Agent::Learning::Mistakes
  source: pwn/ai/agent/learning/mistakes.rb
---

# PWN::AI::Agent::Learning::Mistakes

PWN::AI::Agent::Learning::Mistakes is the negative-feedback half of the pwn-ai learning loop. Where Learning records WHAT WORKED and Metrics records HOW OFTEN a tool worked, Mistakes records SPECIFIC FAILURE PATTERNS with a stable fingerprint so the agent can (a) recognise it is repeating itself, (b) be told exactly what not to do again in every future system prompt, and (c) capture the FIX once one is found so the avoidance lesson becomes an actionable correction. A "mistake" is keyed by sha12(tool + normalised_error). Normalisation strips volatile bits (paths, hex addresses, line numbers, timestamps, UUIDs, PIDs) so "NoMethodError ... at foo.rb:42" and "... at foo.rb:99" collapse to one signature and its :count climbs — that count IS the repeat detector. Closed loop (why it does NOT repeat mistakes): Loop.run --(tool failure)---------> Mistakes.record (persist + count++) Loop.run --(same sig fails ≥N)----> guard_repeated_failure (uses PERSISTENT count, so triggers on the 1st recurrence in a new session, not the 3rd) Loop.run --(failure w/ known fix)-> inline "KNOWN FIX: …" (self-corrects next iter) Loop.run --(user says "wrong")----> check_user_correction (flip last outcome + record) PromptBuilder <-------------------- Mistakes.to_context (DO-NOT-REPEAT + KNOWN-FIXES) model --(tool call)---------------> mistakes_record / mistakes_resolve

## When to use

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

## Methodologies

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

## How to call

```ruby
PWN::AI::Agent::Learning::Mistakes.help
PWN::AI::Agent::Learning::Mistakes.load(opts)
```

## Public methods

- `load`
- `save`
- `signature`
- `error_class`
- `family`
- `find`
- `for_tool`
- `record`
- `resolve`
- `top`
- `extinguish!`
- `extinguish_parked!`
- `park`
- `operator_inbox`
- `to_context`
- `correction_hint`
- `note_hint_outcome`
- `correction?`
- `check_user_correction`
- `lean!`
- `reset`
- `effective_count`
- `authors`
- `help`

## Source

`pwn/ai/agent/learning/mistakes.rb`

## Verification

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

