From cross-dex-trade
Use this skill when the user asks to list, inspect, quote, buy, sell, swap, deposit liquidity, or withdraw liquidity for GameTokens on CROSS Chain (chain id 612055). The service is now AMM swap-based, not orderbook-based. Supports token/game metadata, market stats, chart candles, trade history, token/pair discovery, quote, CROSS -> GameToken swaps, exact-output buys, GameToken -> CROSS swaps, GameToken+CROSS LP deposits, LP withdrawals, balances, local EOA signing, slippage controls, and per-trade CROSS caps. Triggers on phrases like "CROSS chain swap", "GameToken info", "SHILTZx 정보", "GameToken buy/sell", "deposit RUBYx liquidity", "withdraw RUBYx LP", "buy 5 CROSS worth of RUBYx", "sell 100 CROMx", "quote SHOUT", "크로스 게임토큰 스왑", "RUBYx 매수/매도/예치/인출".
How this skill is triggered — by the user, by Claude, or both
Slash command
/cross-dex-trade:cross-dex-tradeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill lets Claude quote and execute **swap-based GameToken trades and AMM liquidity actions** on CROSS Chain (`612055`). The previous orderbook flow is obsolete; do not use orderbook, limit price, open order, fill-state, or cancel semantics.
This skill lets Claude quote and execute swap-based GameToken trades and AMM liquidity actions on CROSS Chain (612055). The previous orderbook flow is obsolete; do not use orderbook, limit price, open order, fill-state, or cancel semantics.
Execution path is local EOA + viem. Write commands sign and broadcast real transactions using the user's local .env.
Activate when the user wants to:
x.crosstoken.io/tokensIf the user asks for an orderbook, limit order, order cancellation, bid/ask depth, or open orders, explain that cross-dex-trade has moved to AMM-based GameToken swaps and liquidity actions, so orderbook operations are no longer supported.
Run these checks before execution:
node --version # require >= 20
which openclaw # optional; only needed for explicit OpenClaw dispatch
Install dependencies once:
SKILL_DIR="$HOME/.claude/skills/cross-dex-trade"
[ -d "$SKILL_DIR/node_modules" ] || (cd "$SKILL_DIR" && npm install --silent)
Resolve the trading EOA in this order. Never echo secrets, never ask the user to paste a private key into chat, and never pass it on the command line.
./.env in the user's current working directory$HOME/.claude/skills/cross-dex-trade/.envPRIVATE_KEY, stop and tell the user to create:PRIVATE_KEY=<0x-prefixed-64-hex-secret>
MAX_TRADE_CROSS=10
Supported env vars:
PRIVATE_KEY — required for buy, buy-exact, sell, deposit, withdraw, balanceMAX_TRADE_CROSS — optional but recommended per-trade CROSS notional capCROSS_RPC_URL — optional RPC overrideWALLET_ADDRESS — optional derived-address cross-checkGAME_SWAP_API_URL — optional API override; default https://game-swap-api.cross.nexus/v1Apply every time:
eth_chainId == 612055.MAX_TRADE_CROSS aborts writes whose CROSS notional exceeds the cap. For liquidity, this means deposit CROSS input or withdraw quoted CROSS output.300 bps (3%). Let the user set --slippage-bps=N; refuse above 5000.1. Show side, symbol, input amount, quoted output, slippage, cap, and wallet suffix.Default direct mode:
cd "$HOME/.claude/skills/cross-dex-trade"
node scripts/trade.mjs <subcommand> [args]
Subcommands:
tokens [--query=TEXT] [--limit=N] — list GameTokens from the GameToken API; no signer requiredtoken-info <SYMBOL|all> [--query=TEXT] [--limit=N] [--history=N] [--liquidity-events=N] [--candles=N] [--tick=1m|5m|15m|1h|4h|1d] — inspect token, game, market, pair, recent swap, liquidity, and candle data; no signer requiredpairs — list AMM pairs, reserves, router, and wrapped native token; no signer requiredquote <buy|sell|buy-exact> <SYMBOL> <AMOUNT> — quote without signingbalance — show CROSS and nonzero GameToken balances for the configured EOAbuy <SYMBOL> <CROSS_SPEND> [--slippage-bps=300] — exact-input CROSS -> token swapbuy-exact <SYMBOL> <TOKEN_AMOUNT> [--slippage-bps=300] — exact-output token buy with max CROSS inputsell <SYMBOL> <TOKEN_AMOUNT> [--slippage-bps=300] — exact-input token -> CROSS swap; auto-approves router if neededquote-deposit <SYMBOL> <CROSS_AMOUNT> [--slippage-bps=300] — quote token needed and expected LP tokens for adding liquiditydeposit <SYMBOL> <CROSS_AMOUNT> [--slippage-bps=300] — add token+CROSS liquidity from a CROSS amount; auto-approves token if neededquote-deposit-token <SYMBOL> <TOKEN_AMOUNT> [--slippage-bps=300] — quote CROSS needed and expected LP tokens for adding liquidity from a token amountdeposit-token <SYMBOL> <TOKEN_AMOUNT> [--slippage-bps=300] — add token+CROSS liquidity from a token amount; auto-approves token if neededquote-withdraw <SYMBOL> <LP_AMOUNT|all> [--slippage-bps=300] — quote token+CROSS outputs for removing liquiditywithdraw <SYMBOL> <LP_AMOUNT|all> [--slippage-bps=300] — remove liquidity; auto-approves LP token if neededExamples:
node scripts/trade.mjs tokens --query=RUBY
node scripts/trade.mjs token-info SHILTZx --history=5 --candles=12 --tick=1h
node scripts/trade.mjs token-info all --limit=20
node scripts/trade.mjs pairs
node scripts/trade.mjs quote buy RUBYx 1
node scripts/trade.mjs buy RUBYx 1 --slippage-bps=300
node scripts/trade.mjs buy-exact RUBYx 10 --slippage-bps=300
node scripts/trade.mjs sell RUBYx 10 --slippage-bps=300
node scripts/trade.mjs quote-deposit RUBYx 1
node scripts/trade.mjs deposit RUBYx 1 --slippage-bps=300
node scripts/trade.mjs quote-deposit-token SHILTZx 20
node scripts/trade.mjs deposit-token SHILTZx 20 --slippage-bps=300
node scripts/trade.mjs quote-withdraw RUBYx 1
node scripts/trade.mjs withdraw RUBYx 1 --slippage-bps=300
Intent mapping:
buy RUBYx 1token-info SHILTZxtoken-info alltoken-info SHILTZx --history=10 --candles=24 --tick=1hquote buy-exact RUBYx 10, then after confirmation buy-exact RUBYx 10sell RUBYx 10quote-deposit RUBYx 1, then after confirmation deposit RUBYx 1quote-deposit-token SHILTZx 20, then after confirmation deposit-token SHILTZx 20quote-withdraw RUBYx 1, then after confirmation withdraw RUBYx 1withdraw RUBYx allAfter a quote, report:
priceImpactAfter token info, report:
After a trade, report:
txHash and explorer URLNo fill/open/partial wording. A successful swap either changes balances or reverts; there are no resting orders.
Use only if explicitly requested. OpenClaw should shell out to the same script and only run whitelisted subcommands:
cd "$HOME/.openclaw/workspaces/cross-dex"
openclaw agent --message "Run this swap and report JSON verbatim: bash -lc 'set -a; source .env; set +a; node $HOME/.claude/skills/cross-dex-trade/scripts/trade.mjs buy RUBYx 1 --slippage-bps=300'"
For chain, API, router, and ABI details, read references/cross-chain.md only when needed.
After changing API paths, router addresses, quote handling, or command docs, run:
npm test
This smoke test signs nothing. It verifies tokens, token-info, pairs, quote buy, quote buy-exact, quote sell, quote-deposit, quote-withdraw, router calldata selectors, and removal of legacy orderbook command names from SKILL.md.
Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub to-nexus/cross-skills-suite --plugin cross-dex-trade