audit-changes
Audit only the git diff vs main (or specified base). Optimized for PR review.
Generate Foundry invariant tests for property-based fuzzing. The high-value command for serious teams.
> /plugin marketplace add omermaksutii/RugProof > /plugin install rugproof@rugproof
How it fires
How this command gets triggered: by you, by Claude, or both.
/invariantContext preview
What this command does when you run it.
Generate Foundry invariant tests for property-based fuzzing. The high-value command for serious teams.
description: Generate Foundry invariant tests for property-based fuzzing. The high-value command for serious teams. argument-hint: "<contract-or-file>" allowed-tools: Read, Write, Bash, Agent, Skill, mcp__forge-runner__*
Property-based testing in Foundry. The single highest-leverage test artifact you can produce — invariants catch bugs no example-based test does.
Dispatch `invariant-writer` subagent. It reads the contract and proposes invariants based on protocol type:
**Token / ERC-20:**
**Vault / ERC-4626:**
**AMM:**
**Lending:**
**Governance:**
contract VaultInvariants is Test {
Vault vault;
Handler handler; // ← actor that calls arbitrary fns with bounded random inputs
function setUp() public {
vault = new Vault();
handler = new Handler(vault);
targetContract(address(handler));
}
function invariant_TotalAssetsCoversShares() public {
uint256 sum;
address[] memory users = handler.getActors();
for (uint i; i < users.length; ++i) {
sum += vault.convertToAssets(vault.balanceOf(users[i]));
}
assertGe(vault.totalAssets(), sum, "vault would be insolvent");
}
}Plus a `Handler` contract that has `deposit`, `withdraw`, `transfer`, etc. — each bounded to realistic random inputs.
Use `forge-runner` MCP:
mcp__forge-runner__test(test="invariant", flags="--fuzz-runs 5000")
If an invariant breaks, that's a finding. Reduce the failing seed to a minimal counter-example and surface as a finding.
Invariants generated for Vault:
✓ invariant_TotalAssetsCoversShares 5000/5000 runs
✓ invariant_DepositReducesAssetsBalance 5000/5000 runs
✗ invariant_PreviewWithdrawIsExact 4982/5000 runs
Counter-example for invariant_PreviewWithdrawIsExact:
seed: 0xabc...
calls: deposit(85), deposit(1), withdraw(86)
actual: previewWithdraw mismatched by 1 wei (rounding)The counter-example becomes a finding.
Rugproof your code before someone else does. 🌐 Live site: omermaksutii.github.io/RugProof 📦 Latest: v1.0.0 — 45 commands · 23 agents · 45 skills · 13 MCP servers · tested, offline-first, with rule packs, a benchmark, non-EVM coverage, and post-deploy
Repo: omermaksutii/RugProof
Audit only the git diff vs main (or specified base). Optimized for PR review.
Deep audit — same as /audit but spawns more parallel subagents, runs multi-pass review, and chases exploit chains across files.
Audit third-party dependencies — resolve installed versions, cross-reference known-vulnerable releases, and flag vendored code that has diverged from upstream.
Diff two Rugproof audit reports (before vs after) to track regressions — what's new, what's fixed, and whether the grade moved.
Pull past public audits (Code4rena, Sherlock, Spearbit, etc.) for a deployed contract or known protocol.
Audit a deployed contract on a live chain. Pulls verified source from the block explorer, optionally forks the chain for live-state simulation.