hyperliquid-plan
Installation
SKILL.md
Hyperliquid plan
Turn one user intent into an unsigned ticket that can be reviewed, expired, and reconciled.
Inputs
Require the network, user account address, target market and DEX, side, action, order type, entry or limit, invalidation or stop, risk budget, slippage policy, time horizon, and account-mode assumptions. Missing risk inputs stop an exposure-increasing plan.
Workflow
- Rebind live identity and state: network, account, account abstraction mode, DEX, coin name, asset ID,
szDecimals, price rules, margin table, mark, oracle, mid, depth, effective fees, positions, open orders, balances, available-to-trade, and current leverage. - Read account modes. Standard, unified, and portfolio-margin accounts expose balances and liquidation risk differently.
- Size with risk sizing. Use
node scripts/risk.mjs --helpfor deterministic arithmetic. The stop fill must include adverse slippage and both entry and exit fees. - Construct the action with order semantics. Resolve all IDs and precision from the target network now.
- Model the full result set: rejection, resting, full fill, partial fill, trigger wait, margin cancel, unknown response, and account-state mismatch.
- Assign one fresh 128-bit client order ID per order leg. Add
expiresAfterwhen the signing scheme supports it. Record both before execution. - Check exchange constraints, user limits, rate-limit budget, current price tolerance, free margin, margin tier at post-trade notional, total open risk, correlated exposure, and protection for the resulting position.
- Emit the ticket contract. Do not request a signature.