ワンクリックで
lbamm-test
Generate Foundry test suites following LBAMM test patterns
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generate Foundry test suites following LBAMM test patterns
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Design an apptoken -- map high-level requirements to protocols, configuration steps, and implementation skills
Apptoken ecosystem knowledge -- token standards (ERC-721C, ERC-1155C, ERC-20C), apptoken categories, cross-protocol integration patterns. Use this skill whenever the user asks about apptokens, Creator Token Standards, ERC-20C/ERC-721C/ERC-1155C, Limit Break tokens, cross-protocol integration, or how the apptoken ecosystem fits together.
Generate integration code for the LBAMM CLOBTransferHandler -- on-chain limit order book with maker deposits, FIFO order filling, and price-linked lists. Generates Foundry scripts for maker flows (deposit, open/close orders, withdraw) and taker flows (filling orders through AMM swaps). Use this skill whenever the user asks about LBAMM CLOB, on-chain order books, limit orders on LBAMM, maker/taker flows, CLOB deposits, or filling CLOB orders.
LBAMM transfer handler architecture -- how transfer handlers work during swap settlement, the ILimitBreakAMMTransferHandler interface, executor validation hooks, callback patterns, and custom handler development. Use this skill whenever the user asks about LBAMM transfer handlers, swap settlement, ammHandleTransfer, custom settlement logic, ITransferHandlerExecutorValidation, how swaps use transfer data, or writing a custom handler contract.
Generate DEX integration contracts that call LBAMM
Generate integration code for the LBAMM PermitTransferHandler -- gasless swap execution via EIP-712 signed permits with optional cosigner. Generates Foundry scripts, signing code, and transferData encoding for fill-or-kill and partial fill permit swaps.
| name | lbamm-test |
| description | Generate Foundry test suites following LBAMM test patterns |
| user-invocable | true |
| disable-model-invocation | true |
| argument-hint | [contract to test or test description] |
Generate Foundry test suites following LBAMM test patterns and conventions.
Before generating code, check the user's project is configured:
foundry.toml must exist. If not: forge initlib/lbamm-core/ must exist. If not: forge install limitbreakinc/lbamm-coreremappings.txt needs @limitbreak/lbamm-core/=lib/lbamm-core/. Append if missing -- do not overwrite existing entries.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.Read the contract under test (if referenced in $ARGUMENTS)
Resolve ambiguities before generating -- if $ARGUMENTS doesn't reference a specific contract or file to test, or it's unclear which aspects to cover (happy paths, reverts, fees, access control), ask in a single message. If clear, proceed.
Select the correct base test class:
LBAMMCoreBaseTest -- For testing core AMM operations, token settings, fee managementLBAMMCorePoolBaseTest -- For testing pool-specific operations (swaps, liquidity, fees) -- extends LBAMMCoreBaseTest with pool operation helpersGenerate setUp() with:
TestConstants.t.sol)ERC20Mock at well-known addresses via vm.etch)Generate test cases for:
vm.expectRevert(SelectorName.selector))Use established helpers:
_executeSingleSwap(), _executeMultiSwap(), _executeDirectSwap()_executeAddLiquidity(), _executeRemoveLiquidity(), _executeCollectFees()_createPool(), _createPoolWithAddLiquidity()_mintAndApprove(), _dealDepositApproveNative()_setTokenSettings(), _setProtocolFees()_packSettings() for building token flag bitmasksreferences/test-infrastructure.md -- Base test classes, helpers, mocks, CREATE2 setup, TestConstantsreferences/test-patterns.md -- Example test suites per feature arealbamm-protocol