build-hookBuild a Uniswap V4 hook. Use when user wants to create a custom V4 hook contract. Generates Solidity code, Foundry tests, mines CREATE2 address for hook flags, and produces deployment scripts. Handles the full hook development lifecycle.
Install via ClawdBot CLI:
clawdbot install wpank/build-hookBuilds a complete Uniswap V4 hook by delegating to the hook-builder agent. Handles the full development lifecycle: understanding requirements, determining hook flags, generating Solidity contracts, generating Foundry tests, mining a CREATE2 address with correct flag bits, and producing deployment scripts. Returns production-ready code artifacts written directly to the project.
Activate when the user asks:
| Parameter | Required | Default | Description |
| --- | --- | --- | --- |
| behavior | Yes | -- | Hook behavior description (e.g., "limit orders", "dynamic fees", "TWAMM", "oracle-based pricing") |
| callbacks | No | Auto-detect | Specific V4 callbacks if the user knows them (e.g., "beforeSwap, afterSwap") |
| constraints | No | -- | Gas budget, security requirements, or specific design constraints |
| chain | No | ethereum | Target chain for deployment (affects PoolManager address) |
Task(subagent_type:hook-builder) with the full context. The hook-builder agent will:Present a summary followed by the generated files:
V4 Hook Built: LimitOrderHook
Contract: src/hooks/LimitOrderHook.sol (187 lines)
Tests: test/hooks/LimitOrderHook.t.sol (12 tests)
Deployment: script/DeployLimitOrderHook.s.sol
Callbacks: beforeSwap, afterSwap
Flags: 0x00C0
CREATE2: Salt mined, address verified
Gas Estimates:
beforeSwap: ~45,000 gas
afterSwap: ~32,000 gas
Total overhead per swap: ~77,000 gas
Architecture:
Orders are placed at specific ticks and stored in an on-chain order book.
During beforeSwap, the hook checks for matching orders at the target tick.
Matched orders are filled atomically within the same transaction.
Next Steps:
1. Run tests: forge test --match-contract LimitOrderHookTest
2. Deploy to testnet: forge script script/DeployLimitOrderHook.s.sol --rpc-url sepolia
3. Verify on Etherscan: forge verify-contract <address> LimitOrderHook
hook-builder agent -- it does not call MCP tools directly.@uniswap/v4-core and @uniswap/v4-periphery.| Error | User-Facing Message | Suggested Action |
| --- | --- | --- |
| INVALID_CALLBACK_COMBINATION | "The requested behavior requires conflicting callbacks." | Simplify hook behavior or split into multiple hooks |
| CREATE2_MINING_TIMEOUT | "Could not mine a valid CREATE2 address within time limit." | Increase mining time limit or reduce required flags |
| FORGE_NOT_INSTALLED | "Foundry (forge) is required but not installed." | Install: curl -L https://foundry.paradigm.xyz \| bash && foundryup |
| VAGUE_REQUIREMENTS | "Need more detail about the desired hook behavior." | Describe specific behavior (e.g., "limit orders that execute at tick boundaries") |
| COMPILATION_ERROR | "Generated contract has compilation errors." | Review error output and adjust requirements |
AI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.