Scaffold stateful invariant and property fuzz tests with meaningful accounting handlers, bounded actions, and ghost variables.
Create invariant tests that verify core protocol accounting across complex sequences of actions. Avoids vacuous fuzz runs and uninformative revert storms by structuring dedicated handler contracts.
Custom Handler contract constraining fuzzer inputs to realistic parameter spaces
Targeted invariant test contract asserting formal protocol properties
Ghost variable tracking for off-chain accounting and oracle simulation
Foundry.toml campaign tuning recommendations (depth, runs, fail-on-revert)
Reads all state-changing functions, access controls, internal balances, and stated economic invariants.
Maps out exact mathematical properties that must hold true after any arbitrary sequence of transactions.
Wraps target functions with realistic bounded inputs, actor routing, and ghost accounting to track expectations.
Writes the invariant_* test assertions targeting total supply consistency, solvency ratios, and role restrictions.
Configures appropriate run depths, call sequences, and seed parameters to ensure broad state exploration.
Once the skill is installed, trigger it in Claude Code, Cursor, or your AI assistant with:
“Use the foundry-invariant-scaffold skill to design invariant tests for our YieldVault.sol contract. We need to ensure that totalAssets() is always greater than or equal to totalSupply() multiplied by the share price.”Join the developer mailing list for new version releases, test scripts, and new Web3 skills. No spam.