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.
npx skills add 0dayInc/pwn --skill loopgit clone --depth 1 https://github.com/0dayInc/pwnWrote 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.
[](https://agentmods.dev/skills/0dayinc/pwn/loop)<a href="https://agentmods.dev/skills/0dayinc/pwn/loop"><img src="https://agentmods.dev/badge/skills/0dayinc/pwn/loop/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.
<a href="https://agentmods.dev/skills/0dayinc/pwn/loop"><img src="https://agentmods.dev/badge/skills/0dayinc/pwn/loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00020 | $0.00833 |
| Opus 5.5 | $0.00008 | $0.00333 |
| Sonnet 5.5 | $0.00004 | $0.00167 |
| Haiku 4.5 | $0.00002 | $0.00083 |
Grade A, and why
pwn-ai-agent-loop 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PWN::AI::Agent::Loop
The agent conversation loop: build system prompt → call LLM with tools → if tool_calls: dispatch, append role:'tool' results, loop → else: return text. This replaces the regex-ReAct in PWN::Runtime::REPL :pwn_ai_hook with native function-calling. State (memory, skills, sessions) is all externalised — Loop.run is stateless aside from the messages array it builds. NEGATIVE-FEEDBACK CLOSURE ------------------------- Loop.run is where "learn from mistakes, don't repeat them" is actually enforced. On EVERY failed dispatch it: 1. Records the (tool, normalised_error) fingerprint into PWN::AI::Agent::Learning::Mistakes with a PERSISTENT cross-session count. 2. Reads that count back and, if it OR the in-turn count reaches REPEAT_THRESHOLD, prepends a hard "REPEATED FAILURE — change approach" guard to the tool result the model sees next. 3. Appends Mistakes.correction_hint (seen N×, sig, KNOWN FIX: …) so a previously-discovered fix is handed straight back to the model on the FIRST recurrence in a new session — it does not have to fail 3× again to re-learn what it already knew. PromptBuilder.mistakes_block re-injects the top open mistakes and top known fixes into the system prompt of every future turn. COMPLETION ---------- The original request is the completion signal. TaskSummarizer and Policy are advisory (compass / rank). Loop keeps calling CORE_TOOLS until that request is done or a tool returned failure evidence, then stops. LOCAL-MODEL SCAFFOLDING ----------------------- When the active engine is :ollama (or the corresponding :agent flags are set) Loop.run additionally: * threads request → PromptBuilder for relevance-ranked MEMORY, * threads request → Registry.definitions(relevance:) for a slimmed tool set (:tool_router), * splices Learning.exemplars_for(request:) between system and user as few-shot behaviour retrieval, * runs a plan-then-act pre-pass (:plan_first) so the model externalises a tool plan before its first dispatch, * escalates to a frontier persona for a 3-line corrective hint once ≥ ESCALATE_AFTER_FAILS in-turn failures accumulate (:escalation_persona) — the local model still produces the final answer so Learning/Metrics stay attributed to :ollama.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday Changed · -5 lines d6ebeef9cd85
- 3mo ago Changed · +3 lines 638670454e08
- 3mo ago First seen · 63 lines · 20 tokens per session scan A d9cb90b87b4f
pwn-ai-agent-loop is a skill published in the GitHub repository 0dayInc/pwn (102 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 833 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.
pwn-ai-agent-loop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pwn-ai-agent-loop0dayInc/pwn | Skill | 102 | today | MIT | A | 20 | Claude Code |
| performing-jwt-none-algorithm-attackxalgorix/xalgorix | Skill | 1.6k | today | Apache-2.0 | A | 34 | Claude Code, Codex |
| performing-zero-day-vulnerability-discoveryxalgorix/xalgorix | Skill | 1.6k | today | Apache-2.0 | B | 36 | Claude Code, Codex |
| analyzing-linux-elf-malwaremukul975/Anthropic-Cybersecurity-Skills | Skill | 37k | 3mo ago | Apache-2.0 | B | 82 | Claude Code |
| supabasePentesterFlow/agent | Skill | 1.5k | 3mo ago | Apache-2.0 | A | 120 | Claude Code |
| sstiPentesterFlow/agent | Skill | 1.5k | 3mo ago | Apache-2.0 | A | 99 | Claude Code |
| racePentesterFlow/agent | Skill | 1.5k | 3mo ago | Apache-2.0 | A | 82 | Claude Code |