build-hook
Build 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.
Why use this skill?
Use the build-hook skill to generate Uniswap V4 hook contracts, Foundry tests, and deployment scripts automatically. Simplify your DeFi development lifecycle.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/wpank/build-hookWhat This Skill Does
The build-hook skill provides an end-to-end development lifecycle management for Uniswap V4 hook developers. It serves as a sophisticated interface to the hook-builder sub-agent, which is specifically trained in V4 architecture and Solidity best practices. Upon activation, the skill parses high-level requirements—such as custom fee structures, order types, or oracle integrations—and translates them into functional, production-ready code. It handles the complex engineering tasks of selecting the correct hook flag bitmasks, generating robust Foundry unit/integration tests, and automating the address generation process using CREATE2 to satisfy pool key requirements. This eliminates the boilerplate and manual errors typically associated with hook deployment and security auditing, providing a seamless workflow from concept to implementation.
Installation
To integrate this capability into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/wpank/build-hook
Ensure your local Foundry environment is initialized, as the skill relies on standard Foundry project structures (e.g., src/, test/, and script/ directories) to write its generated artifacts.
Use Cases
This skill is ideal for DeFi developers and researchers looking to prototype or productionize Uniswap V4 extensions. Common use cases include: implementing custom dynamic fee tiers based on market volatility, creating on-chain limit order mechanisms that trigger during specific swap events, building TWAMM (Time-Weighted Average Market Maker) modules to mitigate sandwich attacks, or integrating external oracle price feeds (e.g., Chainlink or Pyth) to restrict swap conditions. It is also highly effective for teams requiring rapid iteration of experimental AMM logic.
Example Prompts
- "Build a V4 hook that implements a dynamic fee mechanism which increases transaction costs during high volatility periods."
- "I need a TWAMM hook for Uniswap V4 that handles long-term orders over multiple blocks; please include comprehensive gas usage tests."
- "Create a custom limit order hook for V4, ensuring that the necessary callbacks are set and the address is pre-mined using CREATE2."
Tips & Limitations
When using this skill, be as specific as possible regarding your constraints; providing gas budget requirements early in the prompt allows the sub-agent to optimize the implementation logic. Always verify generated code with a formal security audit before deploying to mainnet, as hooks have broad permissions over PoolManager state. Note that the skill creates files directly in your directory; ensure you have a clean git state before running the generation to easily compare the outputs.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-wpank-build-hook": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
mermaid-diagrams
Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.
api-design-principles
Skill by wpank
auto-context
Automatically read relevant context before major actions. Loads TODO.md, roadmap.md, handoffs, task plans, and other project context files so the AI operates with full situational awareness. Use when starting a task, implementing a feature, refactoring, debugging, planning, or resuming a session.
clear-writing
Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.
track-performance
Track the performance of Uniswap LP positions over time — check which positions need attention, are out of range, or have uncollected fees. Use when the user asks how their positions are doing.