fuzz

A command that creates property-based fuzz tests for one function by trying many bounded, varied inputs and checking expected rules.

In plain words
What is it for?
Use it to test function properties such as round trips, inverse behavior, monotonic results, or balanced transfers.
Why use it?
It helps reveal edge cases that a few hand-written examples may miss.

Command

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 commands/omermaksutii/rugproof/fuzz
Clone the repo
git clone --depth 1 https://github.com/omermaksutii/RugProof
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 479 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.00010 $0.00479
Opus 5 $0.00005 $0.00239
Sonnet 5 $0.00002 $0.00096
Haiku 4.5 $0.00001 $0.00048

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

Security

Grade A, and why

fuzz 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.

commands/fuzz.md · 50 lines

What it actually says

/fuzz — fuzz tests for one function

Lighter than /invariant — targets a specific function with bounded random inputs.

For deeper campaigns, drive the dedicated fuzzers via the fuzz-runner MCP — mcp__fuzz-runner__echidna (property fuzzing) or mcp__fuzz-runner__medusa (parallel, Go). Call mcp__fuzz-runner__is_available first; if a fuzzer isn't installed the tool returns a labeled sample so the flow still demonstrates.

Procedure

  1. Read the function and identify input types + valid ranges.
  2. Generate Foundry fuzz tests:
function testFuzz_DepositReturnsCorrectShares(uint256 amount) public {
    amount = bound(amount, 1, 1e30);
    vm.deal(address(this), amount);
    uint256 sharesBefore = vault.totalSupply();
    uint256 minted = vault.deposit{value: amount}();

    assertEq(vault.totalSupply(), sharesBefore + minted);
    assertGt(minted, 0, "minted zero shares");
}
  1. Add property assertions specific to the function:

    • Idempotency: f(f(x)) == f(x) for view-or-once-only ops
    • Inverse: encode(decode(x)) == x
    • Monotonicity: f(a) ≤ f(b) for a ≤ b on monotone fns
    • Conservation: balance changes sum to zero on transfers
  2. Run with mcp__forge-runner__test(flags="--fuzz-runs 10000").

Output

Same as /test-gen but scoped to the target function.

Notes

  • Use bound(input, lo, hi) instead of vm.assume for better coverage.
  • Don't fuzz with unrealistic ranges (e.g. transfer amounts of 2**256-1) — bound to plausible values.
  • For functions with multiple inputs, fuzz them independently or together depending on their semantic coupling.
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. 2d ago First seen · 50 lines · 10 tokens per session scan A 0af6413b5ba4

Subscribe to this mod's changes

fuzz is a command published in the GitHub repository omermaksutii/RugProof (9 stars, last pushed 1mo ago), licensed MIT. It adds 10 tokens to every session and 479 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-31.