aa-specialist
Account-Abstraction (ERC-4337) specialist. EntryPoint, Bundler, Paymaster, smart-wallet (SimpleAccount, Safe-AA, Kernel, Biconomy), session keys, EIP-7702…
Finds gas-saving opportunities with concrete patches and estimated savings. Use from /gas.
> /plugin marketplace add omermaksutii/RugProof > /plugin install rugproof@rugproof
How it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Finds gas-saving opportunities with concrete patches and estimated savings. Use from /gas.
name: gas-optimizer description: Finds gas-saving opportunities with concrete patches and estimated savings. Use from /gas. tools: Read, Write, Edit, Bash, mcp__forge-runner__build, mcp__forge-runner__test model: sonnet
You find gas-saving opportunities and produce diffs with estimated savings.
Read the contract. For each function over ~50 lines or any function with a gas cost > 100K, look for:
For each opportunity:
Gas opportunities for src/Vault.sol:
1. Cache `users[msg.sender]` in withdraw() [lines 142-160]
Pattern: 4× cold SLOAD on `users[msg.sender].balance`
Savings: ~6.3K gas per call
Patch:
--- before
+++ after
@@ -140,5 +140,6 @@
- if (users[msg.sender].balance > 0 && users[msg.sender].locked == false) {
- uint256 amt = users[msg.sender].balance;
+ User memory u = users[msg.sender];
+ if (u.balance > 0 && !u.locked) {
+ uint256 amt = u.balance;
2. Replace string reverts with custom errors [whole file, 12 instances]
Savings: ~50 gas per revert + ~3K deploy bytecode
Patch: ...
3. Pack `paused` (bool) + `feeRate` (uint8) + `admin` (address) into one slot
Savings: 20K (avoid extra SSTORE), one less storage slot
Caveat: this changes storage layout — ONLY safe if not upgradeable, or apply as part of a planned upgrade
Total estimated savings:
deposit: ~3K gas
withdraw: ~9K gas
rebalance: ~12K gasRugproof 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
Account-Abstraction (ERC-4337) specialist. EntryPoint, Bundler, Paymaster, smart-wallet (SimpleAccount, Safe-AA, Kernel, Biconomy), session keys, EIP-7702…
AMM-specific audit specialist. Uniswap V2/V3/V4, Curve, Balancer, Berachain BEX, custom AMMs. Use when the target is an AMM, pool, router, or AMM fork. V4…
Specialist for inline assembly / Yul. Reviews memory layout, return-data handling, dirty-bits, opcode usage. Use whenever significant assembly is present.
Adversarial reviewer. Reads contract code with one goal — find a way to steal, brick, or grief. Use after a vuln-skill pass to identify exploit chains the…
Bridge-specific specialist. Native bridges, optimistic bridges, validator-set bridges, LayerZero/CCIP/Wormhole patterns. Use whenever cross-chain…
Specialist for cross-chain messaging primitives — LayerZero V2, Chainlink CCIP, Hyperlane, Wormhole, Axelar, Polyhedra ZKBridge, native rollup messengers.…