# Send Uniswap Build Hook to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "build-hook",
    "name": "Uniswap Build Hook",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wpank/build-hook",
    "canonicalUrl": "https://clawhub.ai/wpank/build-hook",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/build-hook",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=build-hook",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "build-hook",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-10T10:38:25.290Z",
      "expiresAt": "2026-05-17T10:38:25.290Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=build-hook",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=build-hook",
        "contentDisposition": "attachment; filename=\"build-hook-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "build-hook"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/build-hook"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/build-hook",
    "downloadUrl": "https://openagent3.xyz/downloads/build-hook",
    "agentUrl": "https://openagent3.xyz/skills/build-hook/agent",
    "manifestUrl": "https://openagent3.xyz/skills/build-hook/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/build-hook/agent.md"
  }
}
```
## Documentation

### Overview

Builds 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.

### When to Use

Activate when the user asks:

"Build a V4 hook"
"Create a limit order hook"
"Build a dynamic fee hook"
"Create a TWAMM hook"
"Custom hook for V4"
"Hook that charges higher fees during volatility"
"Build a hook that distributes LP fees to stakers"
"Create a hook with oracle integration"

### Parameters

ParameterRequiredDefaultDescriptionbehaviorYes--Hook behavior description (e.g., "limit orders", "dynamic fees", "TWAMM", "oracle-based pricing")callbacksNoAuto-detectSpecific V4 callbacks if the user knows them (e.g., "beforeSwap, afterSwap")constraintsNo--Gas budget, security requirements, or specific design constraintschainNoethereumTarget chain for deployment (affects PoolManager address)

### Workflow

Extract parameters from the user's request: identify the hook behavior, any explicitly mentioned callbacks, constraints, and target chain.


Delegate to hook-builder: Invoke Task(subagent_type:hook-builder) with the full context. The hook-builder agent will:

Understand the requirements and determine which callbacks are needed
Map callbacks to hook flags and validate the flag combination
Generate a Solidity contract extending BaseHook with proper NatSpec
Generate comprehensive Foundry tests (unit, integration, edge cases, gas snapshots)
Mine a CREATE2 salt that produces an address encoding the required flags
Produce a deployment script with verification steps



Present results to the user with a summary covering:

Files written (contract path, test path, deployment script path)
Hook architecture explanation (what it does, how state flows)
Callbacks implemented and their flag bitmask
Gas estimates per callback (from Foundry test output)
Next steps for the developer (run tests, deploy to testnet, mainnet considerations)

### Output Format

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

### Important Notes

This skill delegates entirely to the hook-builder agent -- it does not call MCP tools directly.
The hook-builder generates production-quality Solidity code with reentrancy protection and access control.
CREATE2 address mining ensures the deployed address encodes the correct hook flags in its leading bytes (required by V4 PoolManager).
Foundry must be installed for test generation and compilation. If not found, the skill will provide installation instructions.
Generated code uses Solidity ^0.8.26 and imports from @uniswap/v4-core and @uniswap/v4-periphery.

### Error Handling

ErrorUser-Facing MessageSuggested ActionINVALID_CALLBACK_COMBINATION"The requested behavior requires conflicting callbacks."Simplify hook behavior or split into multiple hooksCREATE2_MINING_TIMEOUT"Could not mine a valid CREATE2 address within time limit."Increase mining time limit or reduce required flagsFORGE_NOT_INSTALLED"Foundry (forge) is required but not installed."Install: curl -L https://foundry.paradigm.xyz | bash && foundryupVAGUE_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
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: wpank
- Version: 0.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-10T10:38:25.290Z
- Expires at: 2026-05-17T10:38:25.290Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/build-hook)
- [Send to Agent page](https://openagent3.xyz/skills/build-hook/agent)
- [JSON manifest](https://openagent3.xyz/skills/build-hook/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/build-hook/agent.md)
- [Download page](https://openagent3.xyz/downloads/build-hook)