What problem does it solve?
Manually writing Uniswap v4 hook contracts requires deep expertise in hook permissions, address bit encoding, and security best practices, leading to costly errors and lengthy development cycles. This skill eliminates that friction by automating the generation of production-ready hook code.
Core Features & Use Cases
- Guided Hook Type Selection: Uses a decision table to match use cases (MEV protection, limit orders, custom curves, dynamic fees, etc.) to the correct base hook type, with clear trade-off guidance for overlapping use cases.
- Automated MCP Configuration: Assembles the canonical OpenZeppelin Contracts Wizard JSON with correctly configured permissions, utility libraries, share tokens, and access control settings to avoid manual syntax errors.
- Use Case Example: A DeFi developer building an anti-sandwich hook can use this skill to generate the correct AntiSandwichHook configuration with the required block number offset and max tick delta inputs, plus the necessary permission bits for address mining.
Quick Start
Use the v4-hook-generator skill to create a custom Uniswap v4 hook contract for your MEV protection use case, configured with the correct permissions and access control settings.