exploit-poc-writer

exploit-poc-writer is an agent for coding agents from omermaksutii/RugProof. It costs 40 tokens per session (710 once invoked), scanned A, original, MIT.

A tool that writes Foundry tests demonstrating that a smart-contract exploit works. Foundry is a development toolkit for building and testing Solidity contracts.

In plain words
What is it for?
Use it to create exploit tests for local contracts or blockchain copies called forks, including attacks involving multiple calls, balances, permissions, or protocol state.
Why use it?
It turns a suspected vulnerability into a repeatable test that must compile and pass, making the issue easier to verify and explain.

Agent

Part of the rugproof plugin — 35 commands, 23 agents shipped together

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 agents/omermaksutii/rugproof/exploit-poc-writer
Clone the repo
git clone --depth 1 https://github.com/omermaksutii/RugProof

Or install rugproof, the plugin that ships this one along with the rest of its 35 commands, 23 agents.

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 exploit-poc-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/omermaksutii/rugproof/exploit-poc-writer.svg)](https://agentmods.dev/agents/omermaksutii/rugproof/exploit-poc-writer)
Your own site
<a href="https://agentmods.dev/agents/omermaksutii/rugproof/exploit-poc-writer"><img src="https://agentmods.dev/badge/agents/omermaksutii/rugproof/exploit-poc-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 710 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.00040 $0.00710
Opus 5 $0.00020 $0.00355
Sonnet 5 $0.00008 $0.00142
Haiku 4.5 $0.00004 $0.00071

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

Security

Grade A, and why

exploit-poc-writer 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 4d 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.

agents/exploit-poc-writer.md · 95 lines

How it starts

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

You write Foundry tests that prove exploits work. The test must pass.

Hard rules

  1. The test must compile (forge build clean).
  2. The test must pass (forge test --match-test <name> returns 1 passing).
  3. Use forge-runner MCP to verify before output.
  4. If the test doesn't pass on the first try, iterate: read the trace, fix, retry. Three tries max — if still failing, output a diagnosis.

Template

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "forge-std/Test.sol";
import {<Target>} from "<path>";

contract Exploit<ID> is Test {
    <Target> target;
    address attacker = makeAddr("attacker");
    address victim = makeAddr("victim");

    function setUp() public {
        // minimal state to reproduce the vuln
    }

    function test_Exploit_<short-name>() public {
        // execute the exploit
        // assert attacker gained value or protocol broke
    }
}

Style

  • Use OpenZeppelin / Solady / forge-std for setup (makeAddr, vm.deal, vm.prank).
  • Use vm.startPrank/vm.stopPrank for multi-call sequences.
  • For mainnet-fork exploits, use vm.createFork(rpcUrl) and vm.selectFork.
  • Asserts should be specific:
    • assertGt(attacker.balance, expectedMin)
    • assertEq(token.balanceOf(victim), 0)
    • assertLt(vault.totalAssets(), threshold)

Auxiliary contracts

For reentrancy exploits, generate a MaliciousReceiver contract:

contract MaliciousReceiver {
    Vault immutable vault;
    constructor(Vault v) { vault = v; }
    receive() external payable {
        if (address(vault).balance >= 1 ether) {
            vault.withdraw();   // re-enter
        }
    }
    function attack() external payable {
        vault.deposit{value: msg.value}();
        vault.withdraw();
    }
}

For flash-loan exploits, mock the lender locally rather than depending on a live address.

Output

  • The full Foundry test file (test/exploits/Exploit<ID>.t.sol).
  • Auxiliary contract files if needed.
  • The forge test output showing the test passing (timing, gas, asserts).

Read the full file on GitHub · 95 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. 4d ago First seen · 95 lines · 40 tokens per session scan A ec8b79a33d89

Subscribe to this mod's changes

exploit-poc-writer is an agent published in the GitHub repository omermaksutii/RugProof (9 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 710 once invoked, about $0.0002 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-31.

Related

Other agents, from other repositories

blockchain-integration-architect

Web3 and blockchain integration specialist.

viksant/vibe-coding-tools-content · 6 tokens

chainaware-compliance-screener

First-layer MiCA-aligned compliance screening for DeFi protocols and CASPs. Orchestrates ChainAware's specialist subagents to produce a structured Compliance Report covering sanctions, AML behavioral flags, fraud detection, and transaction risk — with a clear verdict (PASS / ENHANCED DUE DILIGENCE / REJECT) and an…

ChainAware/behavioral-prediction-mcp · 286 tokens

chainaware-marketing-director

Full-cycle marketing campaign orchestrator for Web3 platforms. Takes a wallet list (or single wallet), a plain-text platform description, and a campaign goal — then orchestrates ChainAware's specialist subagents to produce a complete Marketing Campaign Brief: segmented audience, prioritized leads, whale roster…

ChainAware/behavioral-prediction-mcp · 244 tokens

chainaware-airdrop-screener

Batch screens wallets for airdrop eligibility using ChainAware's Behavioral Prediction MCP. Automatically filters out bots, new addresses, and high-fraud wallets, then ranks the remaining eligible wallets by reputation score for fair, merit-based token allocation. Use this agent PROACTIVELY whenever a user provides a…

ChainAware/behavioral-prediction-mcp · 207 tokens

chainaware-cohort-analyzer

Segments a batch of wallets into behavioral cohorts using ChainAware's Behavioral Prediction MCP. Runs predictivebehaviour and predictivefraud on each wallet, then groups them into meaningful cohorts (Power DeFi Users, NFT Collectors, New/Inactive, High-Risk, Bots/Fraud, etc.) with cohort statistics and a recommended…

ChainAware/behavioral-prediction-mcp · 233 tokens

chainaware-gamefi-screener

Screens wallets connecting to a Web3 game or P2E (Play-to-Earn) platform using ChainAware's Behavioral Prediction MCP. Detects bot farms, multi-account cheaters, and reward abusers, then classifies legitimate players into experience tiers for matchmaking and calculates their P2E reward eligibility. Use this agent…

ChainAware/behavioral-prediction-mcp · 247 tokens