deploy-uni-hook

Generate, audit, simulate, and deploy Uniswap v4 hooks from a brief.

714|255|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/aaronjmars/aeon --skill deploy-uni-hook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deploy-uni-hook
Source: https://github.com/aaronjmars/aeon/tree/main/skills/deploy-uni-hook
Command: npx skills add https://github.com/aaronjmars/aeon --skill deploy-uni-hook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deploying a Uniswap v4 hook is risky: a bad hook binding is immutable and can brick a pool or steal funds, and hand-writing Solidity, mining CREATE2 flag addresses, and wiring a test pool is slow and error-prone. This Skill turns a one-line brief into a simulated, audited, and optionally broadcast hook deployment with safety gates before any on-chain write.

Core Features & Use Cases

  • Brief-driven hook generation: Pick from pre-audited templates (dynamic fee, no-op, skim) or generate a freeform hook from a natural-language prompt, with flags auto-derived from the implemented callbacks.
  • Multi-gate safety pipeline: Static audit (dangerous-pattern scan, onlyPoolManager checks), an agent-written behavioral forge test on a fork, and a full fork simulation all gate any broadcast; dry-run is the default and mainnet requires a triple opt-in.
  • Every Uniswap v4 chain: Resolve any v4 chain by name from chains.tsv (Base, Ethereum, Unichain, Arbitrum, Optimism, Polygon, BNB, Avalanche, and more, plus Sepolia testnets), with authenticated Alchemy RPC support and best-effort Etherscan source verification.
  • Use Case: Ask for "a dynamic fee hook that raises fees with volatility on base-sepolia" and get a compiled, simulated deploy plan with the mined hook address and routing class; add the arm: prefix to broadcast it for real.

Quick Start

Ask the agent to deploy a Uniswap v4 hook by giving a brief such as "a skim hook that takes a small fee on every swap on base-sepolia", optionally prefixed with arm: to broadcast after the simulation passes.

Frequently Asked Questions about deploy-uni-hook

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

FAQPage Schema
How do I deploy a Uniswap v4 hook from a prompt?

Provide a brief describing the hook behavior, optionally with template:dynamic|noop|skim and chain:<name>. The skill generates the Solidity, mines a CREATE2 salt matching the hook flags, simulates a full deploy plus swap on a fork, and only broadcasts if you prefix the brief with arm:.

Which chains does Uniswap v4 hook deployment support?

Every official Uniswap v4 deployment listed in chains.tsv, including Base, Ethereum, Unichain, Arbitrum, Optimism, Polygon, BNB, Avalanche, and their Sepolia testnets. The default is base-sepolia; mainnets require both arm: and an explicit chain: in the brief.

Is it safe to broadcast a hook to mainnet?

Mainnet broadcast is gated by three locks: the arm: prefix, an explicit chain: name, and the HOOK_MAINNET_OK=1 repo variable enforced inside hook-deploy.sh. The deploy also risks gas only, since the demo pool uses self-minted MockERC20 tokens, and funding and gas-price checks abort unsafe broadcasts.

What happens if the hook simulation or audit fails?

A failed static audit exits DEPLOY_HOOK_AUDIT_FAILED, a failing behavioral forge test exits DEPLOY_HOOK_TEST_FAILED, and a reverting fork simulation exits DEPLOY_HOOK_SIM_FAILED. In every case the skill refuses to broadcast and reports the failure instead.

Will my hook route through the Uniswap Labs interface?

Hooks auto-route on the Labs classic router unless the address starts with 0x91, the hook returns deltas, or it uses dynamic fees. The deploy receipt prints the routing class; allowlisted hooks need the Uniswap Labs allowlist form or a UniswapX filler.

What dependencies are required to run the hook deploy flow?

The workflow pre-stages Foundry and a pre-built v4 project at $HOOKBUILD_DIR before the run; the skill does not install tooling in-run. Optional environment variables are HOOK_DEPLOYER_PRIVATE_KEY for broadcast, ALCHEMY_API_KEY for authenticated RPC, and ETHERSCAN_API_KEY for source verification.