{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/build-hook",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=build-hook",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/build-hook",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Overview",
        "body": "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."
      },
      {
        "title": "When to Use",
        "body": "Activate when the user asks:\n\n\"Build a V4 hook\"\n\"Create a limit order hook\"\n\"Build a dynamic fee hook\"\n\"Create a TWAMM hook\"\n\"Custom hook for V4\"\n\"Hook that charges higher fees during volatility\"\n\"Build a hook that distributes LP fees to stakers\"\n\"Create a hook with oracle integration\""
      },
      {
        "title": "Parameters",
        "body": "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)"
      },
      {
        "title": "Workflow",
        "body": "Extract parameters from the user's request: identify the hook behavior, any explicitly mentioned callbacks, constraints, and target chain.\n\n\nDelegate to hook-builder: Invoke Task(subagent_type:hook-builder) with the full context. The hook-builder agent will:\n\nUnderstand the requirements and determine which callbacks are needed\nMap callbacks to hook flags and validate the flag combination\nGenerate a Solidity contract extending BaseHook with proper NatSpec\nGenerate comprehensive Foundry tests (unit, integration, edge cases, gas snapshots)\nMine a CREATE2 salt that produces an address encoding the required flags\nProduce a deployment script with verification steps\n\n\n\nPresent results to the user with a summary covering:\n\nFiles written (contract path, test path, deployment script path)\nHook architecture explanation (what it does, how state flows)\nCallbacks implemented and their flag bitmask\nGas estimates per callback (from Foundry test output)\nNext steps for the developer (run tests, deploy to testnet, mainnet considerations)"
      },
      {
        "title": "Output Format",
        "body": "Present a summary followed by the generated files:\n\nV4 Hook Built: LimitOrderHook\n\n  Contract:   src/hooks/LimitOrderHook.sol (187 lines)\n  Tests:      test/hooks/LimitOrderHook.t.sol (12 tests)\n  Deployment: script/DeployLimitOrderHook.s.sol\n\n  Callbacks: beforeSwap, afterSwap\n  Flags:     0x00C0\n  CREATE2:   Salt mined, address verified\n\n  Gas Estimates:\n    beforeSwap: ~45,000 gas\n    afterSwap:  ~32,000 gas\n    Total overhead per swap: ~77,000 gas\n\n  Architecture:\n    Orders are placed at specific ticks and stored in an on-chain order book.\n    During beforeSwap, the hook checks for matching orders at the target tick.\n    Matched orders are filled atomically within the same transaction.\n\n  Next Steps:\n    1. Run tests: forge test --match-contract LimitOrderHookTest\n    2. Deploy to testnet: forge script script/DeployLimitOrderHook.s.sol --rpc-url sepolia\n    3. Verify on Etherscan: forge verify-contract <address> LimitOrderHook"
      },
      {
        "title": "Important Notes",
        "body": "This skill delegates entirely to the hook-builder agent -- it does not call MCP tools directly.\nThe hook-builder generates production-quality Solidity code with reentrancy protection and access control.\nCREATE2 address mining ensures the deployed address encodes the correct hook flags in its leading bytes (required by V4 PoolManager).\nFoundry must be installed for test generation and compilation. If not found, the skill will provide installation instructions.\nGenerated code uses Solidity ^0.8.26 and imports from @uniswap/v4-core and @uniswap/v4-periphery."
      },
      {
        "title": "Error Handling",
        "body": "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"
      }
    ],
    "body": "Build Hook\nOverview\n\nBuilds 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.\n\nWhen to Use\n\nActivate when the user asks:\n\n\"Build a V4 hook\"\n\"Create a limit order hook\"\n\"Build a dynamic fee hook\"\n\"Create a TWAMM hook\"\n\"Custom hook for V4\"\n\"Hook that charges higher fees during volatility\"\n\"Build a hook that distributes LP fees to stakers\"\n\"Create a hook with oracle integration\"\nParameters\nParameter\tRequired\tDefault\tDescription\nbehavior\tYes\t--\tHook behavior description (e.g., \"limit orders\", \"dynamic fees\", \"TWAMM\", \"oracle-based pricing\")\ncallbacks\tNo\tAuto-detect\tSpecific V4 callbacks if the user knows them (e.g., \"beforeSwap, afterSwap\")\nconstraints\tNo\t--\tGas budget, security requirements, or specific design constraints\nchain\tNo\tethereum\tTarget chain for deployment (affects PoolManager address)\nWorkflow\n\nExtract parameters from the user's request: identify the hook behavior, any explicitly mentioned callbacks, constraints, and target chain.\n\nDelegate to hook-builder: Invoke Task(subagent_type:hook-builder) with the full context. The hook-builder agent will:\n\nUnderstand the requirements and determine which callbacks are needed\nMap callbacks to hook flags and validate the flag combination\nGenerate a Solidity contract extending BaseHook with proper NatSpec\nGenerate comprehensive Foundry tests (unit, integration, edge cases, gas snapshots)\nMine a CREATE2 salt that produces an address encoding the required flags\nProduce a deployment script with verification steps\n\nPresent results to the user with a summary covering:\n\nFiles written (contract path, test path, deployment script path)\nHook architecture explanation (what it does, how state flows)\nCallbacks implemented and their flag bitmask\nGas estimates per callback (from Foundry test output)\nNext steps for the developer (run tests, deploy to testnet, mainnet considerations)\nOutput Format\n\nPresent a summary followed by the generated files:\n\nV4 Hook Built: LimitOrderHook\n\n  Contract:   src/hooks/LimitOrderHook.sol (187 lines)\n  Tests:      test/hooks/LimitOrderHook.t.sol (12 tests)\n  Deployment: script/DeployLimitOrderHook.s.sol\n\n  Callbacks: beforeSwap, afterSwap\n  Flags:     0x00C0\n  CREATE2:   Salt mined, address verified\n\n  Gas Estimates:\n    beforeSwap: ~45,000 gas\n    afterSwap:  ~32,000 gas\n    Total overhead per swap: ~77,000 gas\n\n  Architecture:\n    Orders are placed at specific ticks and stored in an on-chain order book.\n    During beforeSwap, the hook checks for matching orders at the target tick.\n    Matched orders are filled atomically within the same transaction.\n\n  Next Steps:\n    1. Run tests: forge test --match-contract LimitOrderHookTest\n    2. Deploy to testnet: forge script script/DeployLimitOrderHook.s.sol --rpc-url sepolia\n    3. Verify on Etherscan: forge verify-contract <address> LimitOrderHook\n\nImportant Notes\nThis skill delegates entirely to the hook-builder agent -- it does not call MCP tools directly.\nThe hook-builder generates production-quality Solidity code with reentrancy protection and access control.\nCREATE2 address mining ensures the deployed address encodes the correct hook flags in its leading bytes (required by V4 PoolManager).\nFoundry must be installed for test generation and compilation. If not found, the skill will provide installation instructions.\nGenerated code uses Solidity ^0.8.26 and imports from @uniswap/v4-core and @uniswap/v4-periphery.\nError Handling\nError\tUser-Facing Message\tSuggested Action\nINVALID_CALLBACK_COMBINATION\t\"The requested behavior requires conflicting callbacks.\"\tSimplify hook behavior or split into multiple hooks\nCREATE2_MINING_TIMEOUT\t\"Could not mine a valid CREATE2 address within time limit.\"\tIncrease mining time limit or reduce required flags\nFORGE_NOT_INSTALLED\t\"Foundry (forge) is required but not installed.\"\tInstall: curl -L https://foundry.paradigm.xyz | bash && foundryup\nVAGUE_REQUIREMENTS\t\"Need more detail about the desired hook behavior.\"\tDescribe specific behavior (e.g., \"limit orders that execute at tick boundaries\")\nCOMPILATION_ERROR\t\"Generated contract has compilation errors.\"\tReview error output and adjust requirements"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/wpank/build-hook",
    "publisherUrl": "https://clawhub.ai/wpank/build-hook",
    "owner": "wpank",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}