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 agentmods add skills/0dayinc/pwn/loopnpx skills add 0dayInc/pwn --skill loopgit clone --depth 1 https://github.com/0dayInc/pwnWhat 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 | $0.00020 | $0.00834 |
| Opus 5 | $0.00010 | $0.00417 |
| Sonnet 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 63 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::Plugins::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::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.
- 2d 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 (76 stars, last pushed 4d ago), licensed MIT. It adds 20 tokens to every session and 834 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.
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…
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…
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.
performing-ai-assisted-vulnerability-discovery
Using LLMs to accelerate vulnerability research and pentest workflows — generating syntax-valid fuzzing seeds and evolving grammars, fine-tuned mutation dictionaries, parallel agent-based proof-of-vulnerability generation, and evidence-driven passive analysis of real HTTP traffic via the Burp MCP server. Covers…
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…
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…