Conversation
…draw (v0.3.1) - order: new --leverage <N> (1–100) sets account-level leverage via updateLeverage before placing the order, fixing the UX gap where specifying 10x silently used the account default (e.g. 20x) - order: new --isolated flag selects isolated margin mode (default is cross) - withdraw: add $1 USDC fixed fee notice in preview and output; balance check now validates amount + $1 fee; minimum withdrawal error changed from warning to bail - SKILL.md: fix prices command flag (--market → --coin); document leverage flags; add $1 fee notice to withdraw section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🔨 Phase 2: Build Verification — ✅ PASSED
Build succeeded. Compiled artifact uploaded as workflow artifact. Source integrity: commit SHA `` is the content fingerprint. |
Phase 4: Summary + Pre-flight for
|
| Command | Description |
|---|---|
hyperliquid register |
Set up signing address for trading (one-time setup) |
hyperliquid positions [--address] [--show-orders] |
Check open positions and account summary |
hyperliquid prices [--coin] |
Get current market prices for all or specific coins |
hyperliquid order --coin --side --size [--type] [--price] [--sl-px] [--tp-px] [--confirm] |
Place market/limit orders with optional TP/SL brackets |
hyperliquid close --coin [--size] [--confirm] |
Market close existing positions |
hyperliquid tpsl --coin [--sl-px] [--tp-px] [--confirm] |
Set stop-loss/take-profit on open positions |
hyperliquid cancel --coin --order-id [--confirm] |
Cancel open orders |
hyperliquid deposit --amount [--confirm] |
Deposit USDC from Arbitrum |
Triggers
An AI agent should activate this skill when users mention Hyperliquid trading activities, perpetual contracts, or specific phrases like "trade on Hyperliquid," "HL order," "Hyperliquid positions," or "close my HL position." It should also trigger for general derivatives trading requests when Hyperliquid is the preferred platform.
Auto-injected Pre-flight
## Pre-flight Dependencies (auto-injected by Plugin Store CI)
> Run once per session before first use. These checks ensure required tools are installed.
### Install onchainos CLI + Skills (auto-injected)
```bash
# 1. Install onchainos CLI
onchainos --version 2>/dev/null || curl -fsSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | sh
# 2. Install onchainos skills (enables AI agent to use onchainos commands)
npx skills add okx/onchainos-skills --yes --global
# 3. Install plugin-store skills (enables plugin discovery and management)
npx skills add okx/plugin-store --skill plugin-store --yes --globalInstall hyperliquid binary (auto-injected)
if ! command -v hyperliquid >/dev/null 2>&1; then
OS=$(uname -s | tr A-Z a-z)
ARCH=$(uname -m)
EXT=""
case "${OS}_${ARCH}" in
darwin_arm64) TARGET="aarch64-apple-darwin" ;;
darwin_x86_64) TARGET="x86_64-apple-darwin" ;;
linux_x86_64) TARGET="x86_64-unknown-linux-gnu" ;;
linux_i686) TARGET="i686-unknown-linux-gnu" ;;
linux_aarch64) TARGET="aarch64-unknown-linux-gnu" ;;
linux_armv7l) TARGET="armv7-unknown-linux-gnueabihf" ;;
mingw*_x86_64|msys*_x86_64|cygwin*_x86_64) TARGET="x86_64-pc-windows-msvc"; EXT=".exe" ;;
mingw*_i686|msys*_i686|cygwin*_i686) TARGET="i686-pc-windows-msvc"; EXT=".exe" ;;
mingw*_aarch64|msys*_aarch64|cygwin*_aarch64) TARGET="aarch64-pc-windows-msvc"; EXT=".exe" ;;
esac
mkdir -p ~/.local/bin
curl -fsSL "https://github.com/okx/plugin-store/releases/download/plugins/hyperliquid@0.3.1/hyperliquid-${TARGET}${EXT}" -o ~/.local/bin/hyperliquid${EXT}
chmod +x ~/.local/bin/hyperliquid${EXT}
fiReport install (auto-injected, runs once)
REPORT_FLAG="$HOME/.plugin-store/reported/hyperliquid"
if [ ! -f "$REPORT_FLAG" ]; then
mkdir -p "$HOME/.plugin-store/reported"
# Device fingerprint → SHA256 → 32-char device ID
DEV_RAW="$(hostname):$(uname -s):$(uname -m):$HOME"
DEV_ID=$(echo -n "$DEV_RAW" | shasum -a 256 | head -c 32)
# HMAC signature (obfuscated key, same as CLI binary)
_K=$(echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | base64 -d 2>/dev/null || echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | openssl base64 -d)
HMAC_SIG=$(echo -n "${_K}${DEV_ID}" | shasum -a 256 | head -c 8)
DIV_ID="${DEV_ID}${HMAC_SIG}"
unset _K
# Report to Vercel stats
curl -s -X POST "https://plugin-store-dun.vercel.app/install" \
-H "Content-Type: application/json" \
-d '{"name":"hyperliquid","version":"0.3.1"}' >/dev/null 2>&1 || true
# Report to OKX API (with HMAC-signed device token)
curl -s -X POST "https://www.okx.com/priapi/v1/wallet/plugins/download/report" \
-H "Content-Type: application/json" \
-d '{"pluginName":"hyperliquid","divId":"'"$DIV_ID"'"}' >/dev/null 2>&1 || true
touch "$REPORT_FLAG"
fi
</details>
---
*Generated by Plugin Store CI after maintainer approval.*
📋 Phase 3: AI Code Review Report — Score: 82/100
1. Plugin Overview
Summary: This plugin enables trading perpetual futures and spot tokens on the Hyperliquid DEX. It supports placing market/limit orders with TP/SL brackets, managing positions, depositing USDC from Arbitrum via bridge, withdrawing to Arbitrum, transferring between perp/spot accounts, and bootstrapping gas on HyperEVM. All signing is delegated to onchainos wallet's EIP-712 sign-message capability. Target Users: Experienced DeFi traders who want to trade perpetual futures on Hyperliquid through an AI agent interface, using onchainos wallet for signing. 2. Architecture AnalysisComponents:
Skill Structure:
Data Flow:
Dependencies:
3. Auto-Detected Permissionsonchainos Commands Used
Wallet Operations
External APIs / URLs
Chains Operated On
Overall Permission SummaryThis plugin has extensive financial operation capabilities: it can place leveraged perpetual futures orders, close positions, set stop-loss/take-profit, deposit USDC from Arbitrum to Hyperliquid via bridge contract, withdraw USDC back to Arbitrum, transfer between perp/spot accounts, swap USDC for HYPE gas tokens via relay.link, and send USDC via CoreWriter precompile. All signing is delegated to onchainos (no private keys handled directly), and all write operations require explicit 4. onchainos API ComplianceDoes this plugin use onchainos CLI for all on-chain write operations?Yes — all on-chain writes go through On-Chain Write Operations (MUST use onchainos)
Data Queries (allowed to use external sources)
External APIs / Libraries Detected
Verdict: ✅ Fully CompliantAll on-chain write operations are properly routed through onchainos CLI. The plugin does not self-implement any signing or transaction broadcasting. 5. Security AssessmentStatic Rule Scan (C01-C09, H01-H09, M01-M08, L01-L02)
LLM Judge Analysis (L-PINJ, L-MALI, L-MEMA, L-IINJ, L-AEXE, L-FINA, L-FISO)
Toxic Flow Detection (TF001-TF006)
No toxic flows detected. Prompt Injection Scan
Result: ✅ Clean Dangerous Operations Check
Result: Data Exfiltration Risk
Result: ✅ No Risk Overall Security Rating: 🟡 Medium RiskThe plugin handles high-value financial operations (leveraged perpetual futures) but implements proper security controls: all signing via onchainos TEE, 6. Source Code Security (if source code is included)Language & Build Config
Dependency AnalysisAll dependencies are well-known, maintained crates from crates.io:
No suspicious or unmaintained dependencies detected. Code Safety Audit
Does SKILL.md accurately describe what the source code does?Yes — the SKILL.md documentation accurately reflects the source code behavior for all 18 commands. The command parameters, signing flows, API interactions, and output formats match the implementation. The Verdict: ✅ Source Safe7. Code ReviewQuality Score: 82/100
Strengths
Issues Found
8. Recommendations
9. Reviewer SummaryOne-line verdict: Well-architected Hyperliquid trading plugin with proper security controls (onchainos signing delegation, Merge recommendation: Items to address before or after merge:
Generated by Claude AI via Anthropic API — review the full report before approving. |
Summary
order: new--leverage <N>flag (1–100) sets account-level leverage viaupdateLeverageaction before placing the order — fixes the UX gap where specifying 10x silently inherited the account default (e.g. 20x)order: new--isolatedflag selects isolated margin mode when--leverageis set (default is cross)withdraw: add $1 USDC fixed fee notice in preview and output; balance check now validatesamount + $1 fee; minimum withdrawal error changed fromeprintln!warning toanyhow::bail!SKILL.md: correctpricescommand flag (--market→--coin); document--leverage/--isolatedflags; add $1 fee notice to withdraw sectionTest plan
hyperliquid order --coin BTC --side buy --size 0.01 --leverage 10— preview shows"leverage": "10x cross"hyperliquid order --coin BTC --side buy --size 0.01 --leverage 10 --confirm— logs "Leverage set to 10x (cross) for BTC" then places orderhyperliquid order --coin BTC --side buy --size 0.01 --leverage 5 --isolated --confirm— logs "Leverage set to 5x (isolated) for BTC"hyperliquid withdraw --amount 50— preview showswithdrawalFee_usd: 1,totalDeducted_usd: 51hyperliquid withdraw --amount 1— bails with minimum withdrawal errorhyperliquid prices --coin BTC— returns price (old--marketflag was wrong)🤖 Generated with Claude Code