Agent Skill · Limit Break

lbamm-pool-hook

Generate complete ILimitBreakAMMPoolHook Solidity implementations

Provider: Limit Break Path in repo: SKILL.md

Skill body

LBAMM Pool Hook Generator

Generate a complete ILimitBreakAMMPoolHook implementation based on the user’s requirements.

Project Setup

Before generating code, check the user’s project is configured:

  1. Foundry: foundry.toml must exist. If not: forge init
  2. LBAMM Core: lib/lbamm-core/ must exist. If not: forge install limitbreakinc/lbamm-core
  3. Remappings: remappings.txt needs @limitbreak/lbamm-core/=lib/lbamm-core/. Append if missing – do not overwrite existing entries.
  4. Local testing: LBAMM is in audit and not yet on public networks. For local testing, use lbamm-examples – see lbamm-protocol/references/local-dev.md. Generated scripts should read addresses from environment variables (vm.envAddress) so they work with the local Anvil deployment.

Instructions

  1. Parse requirements from $ARGUMENTS – identify the pool hook behavior (dynamic fees, pool creation gating, LP access control, oracle pricing for single provider pools, etc.)

  2. Resolve ambiguities before generating – if $ARGUMENTS mentions external contracts without addresses (e.g., “a price oracle”, “a registry”, “a token”), ask the user whether they have an existing contract (and get the address) or want a new one generated. Similarly, clarify pool type (Dynamic vs Single Provider) if not obvious, or specific configuration values that would change the implementation. Ask everything in a single message. If clear, proceed.

  3. Determine capabilities needed:
    • Dynamic fee calculation via getPoolFeeForSwap() (pool must be created with fee = 55_555)
    • Pool creation validation via validatePoolCreation()
    • Liquidity operation validation via validatePoolAddLiquidity(), validatePoolRemoveLiquidity(), validatePoolCollectFees()
    • If targeting Single Provider pools: implement ISingleProviderPoolHook extension with getPoolPriceForSwap() and getPoolLiquidityProvider()
  4. Generate a complete Solidity contract that:
    • Uses pragma solidity 0.8.24;
    • Implements ILimitBreakAMMPoolHook (or ISingleProviderPoolHook if targeting single provider pools)
    • Implements poolHookManifestUri()
    • Includes appropriate state management and access control
  5. Note fee bounds:
    • poolFeeBPS <= 10_000 for input-based swaps
    • poolFeeBPS < 10_000 (strictly less) for output-based swaps
    • Hook fees on liquidity ops are capped by caller’s maxHookFee0/maxHookFee1

Reference Files

When to Use This vs Other Hook Skills

Dependencies

@limitbreak/lbamm-core/src/interfaces/hooks/ILimitBreakAMMPoolHook.sol
lbamm-pool-type-single-provider/src/interfaces/ISingleProviderPoolHook.sol
@limitbreak/lbamm-core/src/DataTypes.sol

Skill frontmatter

user-invocable: true disable-model-invocation: true argument-hint: [description of desired pool hook behavior]

Work with this as data

Every skill here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for agent skills

4 MCP tools reach this
  • find_skillsBrowse and filter every skill in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This skill
curl "https://apis.io/api/v1/skills/lbamm-pool-hook"
All agent skills
curl "https://apis.io/api/v1/skills?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.