# Send Design Uniswap 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": "design-hook",
    "name": "Design Uniswap Hook",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/wpank/design-hook",
    "canonicalUrl": "https://clawhub.ai/wpank/design-hook",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/design-hook",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=design-hook",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "design-hook",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T02:41:50.344Z",
      "expiresAt": "2026-05-08T02:41:50.344Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=design-hook",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=design-hook",
        "contentDisposition": "attachment; filename=\"design-hook-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "design-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/design-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/design-hook",
    "downloadUrl": "https://openagent3.xyz/downloads/design-hook",
    "agentUrl": "https://openagent3.xyz/skills/design-hook/agent",
    "manifestUrl": "https://openagent3.xyz/skills/design-hook/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/design-hook/agent.md"
  }
}
```
## Documentation

### Overview

Designs a Uniswap V4 hook architecture without generating code. Delegates to the hook-builder agent in design-only mode to produce a comprehensive design document covering: which callbacks are needed, hook flag requirements, state management approach, gas estimates, security considerations, and architecture decisions. Use this to plan before building, or to evaluate feasibility.

### When to Use

Activate when the user asks:

"Design a hook for..."
"What callbacks do I need for..."
"Hook architecture for..."
"Plan a V4 hook"
"Is it possible to build a hook that..."
"What would a dynamic fee hook look like?"
"Help me think through a hook design"
"Which flags do I need for a TWAMM?"

### Parameters

ParameterRequiredDefaultDescriptionbehaviorYes--Hook behavior description (e.g., "limit orders", "dynamic fees", "oracle pricing")constraintsNo--Gas budget, security requirements, or specific design constraintsintegrationsNo--External systems the hook needs to interact with (oracles, governance, staking)

### Workflow

Extract parameters from the user's request: identify the hook behavior, constraints, and any external integrations.


Delegate to hook-builder in design-only mode: Invoke Task(subagent_type:hook-builder) with explicit instruction to produce a design document only -- no code generation, no file writes. The hook-builder will:

Analyze the requirements and determine which V4 callbacks are needed
Map callbacks to hook flags and validate the combination
Design the state management approach (what storage, what data structures)
Estimate gas overhead per callback
Identify security considerations specific to this hook design
Evaluate feasibility and flag any concerns



Present the design document to the user covering:

Callbacks needed and why each is required
Hook flags and bitmask
State management design (storage variables, data structures, access patterns)
Gas estimates and performance implications
Security considerations and mitigations
Architecture decisions with rationale
Comparison with alternative approaches if applicable

### Output Format

Present a structured design document:

V4 Hook Design: Dynamic Fee Hook

  Callbacks Required:
    - beforeSwap: Read volatility oracle, calculate dynamic fee
    - beforeInitialize: Set initial fee parameters and oracle address

  Hook Flags: BEFORE_SWAP_FLAG | BEFORE_INITIALIZE_FLAG
  Bitmask: 0x2080

  State Management:
    - volatilityOracle: IVolatilityOracle (immutable, set in constructor)
    - baseFee: uint24 (configurable by owner)
    - maxFee: uint24 (cap to prevent excessive fees)
    - feeMultiplier: uint24 (scales with volatility)

  Gas Estimates:
    beforeSwap: ~30,000 gas (oracle read + fee calculation)
    beforeInitialize: ~25,000 gas (one-time setup)

  Security Considerations:
    - Oracle manipulation: Use TWAP, not spot price
    - Fee cap: Enforce maxFee to protect traders
    - Owner control: Fee parameters updatable by owner only

  Architecture Decisions:
    - Using beforeSwap (not afterSwap) to set fee before execution
    - External oracle for volatility data rather than on-chain calculation
    - Fee bounded between baseFee and maxFee for predictability

  Alternative Approaches:
    - On-chain volatility calculation (higher gas, no oracle dependency)
    - Fixed fee tiers with governance voting (simpler, less responsive)

### Important Notes

This skill produces a design document only -- no code is generated and no files are written.
The design document provides enough detail to proceed with build-hook when the user is ready.
If the hook design is infeasible (e.g., requires callbacks that V4 doesn't support), this will be clearly communicated.
Gas estimates are approximations based on typical implementations -- actual gas depends on implementation details.

### Error Handling

ErrorUser-Facing MessageSuggested ActionVAGUE_REQUIREMENTS"Need more detail about the desired hook behavior."Describe specific behavior (e.g., "limit orders that execute at tick boundaries")UNSUPPORTED_CALLBACK"V4 does not support the requested callback."Review available V4 callbacks and adjust requirementsINFEASIBLE_DESIGN"This hook design is not feasible with current V4 capabilities."Simplify requirements or consider alternative approaches
## 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-01T02:41:50.344Z
- Expires at: 2026-05-08T02:41:50.344Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/design-hook)
- [Send to Agent page](https://openagent3.xyz/skills/design-hook/agent)
- [JSON manifest](https://openagent3.xyz/skills/design-hook/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/design-hook/agent.md)
- [Download page](https://openagent3.xyz/downloads/design-hook)