skills/gate-dex-trade/SKILL.md
Gate DEX swap EXECUTION skill. For on-chain token exchange transactions that MODIFY blockchain state: swap, buy, sell, exchange, convert tokens, cross-chain bridge. Every operation here results in an on-chain transaction requiring signing. This skill EXECUTES trades — it does not provide read-only data lookups or manage wallet accounts.
npx skillsauth add gate/gate-skills gate-dex-tradeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Pure Routing Layer — Swap EXECUTION only. Every operation produces an on-chain transaction. All specifications in
references/.
⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. Do NOT select or call any tool until all rules are read. These rules have the highest priority. → Read gate-runtime-rules.md
Trigger Scenarios: Use when the user wants to execute a token exchange that modifies blockchain state:
Do not use OpenAPI for swap unless user explicitly asks OpenAPI/AK/SK. MCP unavailable → references/setup.md only.
NOT this skill (common misroutes):
gate-dex-market (read-only lookup, no trade intent)gate-dex-wallet (account query)gate-dex-wallet (direct transfer, not swap)gate-dex-wallet (DApp interaction)User triggers trading intent
↓
Step 1: Has user explicitly specified a mode?
├─ Explicitly mentions "OpenAPI" / "AK/SK" / "API Key" → OpenAPI mode
├─ Otherwise → MCP only (Step 2)
└─ Not specified → Step 2
↓
Step 2: Is this a cross-chain swap?
├─ Cross-chain → Must use MCP mode (OpenAPI doesn't support cross-chain), proceed to Step 3
└─ Same-chain / uncertain → Step 3
↓
Step 3: Gate Wallet MCP Server Discovery & Detection
a) Scan configured MCP Server list for Servers providing `dex_tx_swap_quote`, `dex_tx_swap_prepare`, and staged swap signing tools
b) If found → Record server identifier, verify with:
CallMcpTool(server="<identifier>", toolName="dex_chain_config", arguments={chain: "ETH"})
├─ Success → MCP mode
└─ Failed → Step 4
c) No matching Server → Step 4
↓
Step 4: MCP unavailable → setup guide only ([`references/setup.md`](./references/setup.md)), no OpenAPI fallback
Read and strictly follow references/mcp.md, execute according to its complete workflow.
Includes: connection detection, authentication (mcp_token), MCP Resource/tool calls (dex_tx_swap_quote / dex_tx_swap_prepare / dex_tx_swap_checkin_preview / staged sign-submit / dex_tx_swap_detail), local prebuilt swap-checkin-mac / swap-checkin-linux / swap-checkin-win.exe (Windows amd64) binary execution, token address resolution, native_in/native_out rules, three-step confirmation gateway (SOP), quote templates, risk warnings, cross-Skill collaboration, security rules.
Default off in this workspace — explicit OpenAPI request only.
Limitation: OpenAPI mode only supports same-chain Swap, does not support cross-chain exchanges.
Load files progressively — only load what the current step needs:
references/openapi/_shared.md — env detection, credentials, API call method (via helper script)| Stage | Load File | When |
|-------|-----------|------|
| Query (chain/gas) | openapi/quote.md | User asks about chains or gas |
| Swap: get quote | openapi/quote.md + openapi/sop.md | User initiates swap |
| Swap: build tx | openapi/build.md | After quote confirmed (SOP Step 2) |
| Swap: sign tx | openapi/sign.md | After build confirmed (SOP Step 3) |
| Swap: submit | openapi/submit.md | After signing complete |
| History | openapi/submit.md | User asks for swap history |
openapi/errors.mdLegacy monolithic file preserved at
references/openapi.mdfor backward compatibility.
When MCP detection fails and a setup guide is needed, read and display references/setup.md. Show only the configuration for the user's current platform when identifiable. Display at most once per session.
Actual supported chains are determined by runtime API/Resource returns:
swap://supported_chains Resourcetrade.swap.chain interfaceFor uncommon chains: MCP calls dex_chain_config, OpenAPI calls trade.swap.chain.
mcp_token, OpenAPI uses AK/SK — never mixtools
Exchange listing tracker. Use this skill whenever the user asks about exchange listing, delisting, or maintenance announcements. Trigger phrases include: any new coins listed recently, what did Binance list, new listings, delisted. MCP tools: news_feed_get_exchange_announcements, info_coin_get_coin_info, info_marketsnapshot_get_market_snapshot.
testing
Event attribution and explanation. Use this skill ONLY when the user's query is exclusively about the reason behind a price move with no other analysis dimensions. Trigger phrases: why did X crash, what just happened, why is it pumping, what caused. If the query ALSO mentions fundamentals, risk check, technicals, or any other analysis dimension, use gate-info-research instead — it handles multi-dimension queries in a single unified report.
tools
Community sentiment via Gate-News MCP, X/Twitter-first. Use for social discussion, KOL takes, or opinion on a coin or topic. Triggers: what does the community think about ETH, Twitter or X sentiment, what are people saying, KOL opinions. Reddit, Discord, Telegram when search_ugc is available; until then label output as X/Twitter-only. Tools: news_feed_search_x, news_feed_get_social_sentiment.
testing
News briefing. Use this skill ONLY when the user's query is exclusively about recent news or headlines with no other analysis dimensions. Trigger phrases: what happened recently, today's highlights, crypto news, any new updates. If the query ALSO mentions coin analysis, risk check, technicals, or any other analysis dimension, use gate-info-research instead — it handles multi-dimension queries in a single unified report.