v4-hook-generator

Generate Uniswap v4 hook Solidity code via the OpenZeppelin Contracts Wizard MCP tool.

4|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Iziedking/hawkeye --skill v4-hook-generator-iziedking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: v4-hook-generator
Source: https://github.com/Iziedking/hawkeye/tree/main/.agents/skills/v4-hook-generator
Command: npx skills add https://github.com/Iziedking/hawkeye --skill v4-hook-generator-iziedking

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about v4-hook-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Uniswap v4 hook contract for MEV protection?

To generate a Uniswap v4 hook contract for MEV protection, you use an automated tool that configures the correct AntiSandwichHook settings, including block number offsets and max tick delta inputs, along with the necessary permission bits for address mining.

What are the permission bit encoding requirements for Uniswap v4 hooks?

Uniswap v4 hook permission bit encoding requires strict address bit configuration to ensure valid deployment. An automated generator applies the correct permission bits based on your specific use case, eliminating manual setup errors and ensuring the contract interacts correctly with the protocol.

How do I set up dynamic fee structures in a Uniswap v4 hook?

To set up dynamic fee structures in a Uniswap v4 hook, you use a guided selection process that matches your use case to the correct base hook type. This automatically assembles the required utility libraries and access control settings for secure custom swap logic.

Does the OpenZeppelin Contracts Wizard work with Uniswap v4 hook generation?

Yes, the OpenZeppelin Contracts Wizard is used to automate Uniswap v4 hook generation. It assembles canonical JSON configurations with correctly configured permissions, utility libraries, share tokens, and access control settings to produce production-ready Solidity code.

Why does my manually written Uniswap v4 hook contract fail during deployment?

Manually written Uniswap v4 hook contracts often fail due to incorrect hook permission bit encoding, invalid constructor signatures, or inappropriate utility library selection. Automating the generation process eliminates these manual syntax errors and ensures valid deployment configurations.

Can I build hook-owned liquidity mechanisms on Uniswap v4 without deep Solidity expertise?

Yes, you can build hook-owned liquidity mechanisms by using an automated hook generator that handles the complex address bit encoding and security best practices. This eliminates the need for deep expertise in hook permissions and significantly shortens development cycles.