gemachdao/gdex-skill/gdex-onboarding

Claude Code and agent skill by gemachdao/gdex-skill

Trust tier 3
  • community
  • ext:[{"type":"context","description":"Custom context provider definitions"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Start here — GDEX overview, architecture, supported chains, available skills, and quickstart for cross-chain DeFi trading via managed-custody wallets

Install

npx vskill@latest install gemachdao/gdex-skill/gdex-onboarding

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as gemachdao/gdex-skill/gdex-onboarding.

GDEX: Agent Onboarding

GDEX is a cross-chain DeFi trading infrastructure for AI agents. It provides spot trading, perpetual futures (HyperLiquid), portfolio management, token discovery, copy trading, and bridging across Solana, Sui, and 12+ EVM chains — all through a single SDK with managed-custody wallets.

When to Use

  • You're new to GDEX and need to understand the platform
  • You need to decide which skill to load for a specific task
  • You want a quick overview of supported chains and capabilities

Architecture

Agent → @gemachdao/gdex-skill SDK → GDEX Backend (trade-api.gemach.io/v1) → On-chain Execution

Key concepts:

  • Managed custody — GDEX provisions and manages all on-chain trading wallets server-side. Your control wallet only signs in once.
  • Encrypted payloads — All trades use AES-256-CBC encrypted computedData payloads. The API key derives the AES key deterministically via SHA256 hash chain.
  • Session keypairs — A secp256k1 session key signs trade payloads after initial control-wallet sign-in.
  • Shared API keys — Pre-configured keys let agents authenticate instantly without wallet signing.

Quick Start

bash
npm install @gemachdao/gdex-skill
typescript
import { GdexSkill, GDEX_API_KEY_PRIMARY } from '@gemachdao/gdex-skill';
const skill = new GdexSkill();
skill.loginWithApiKey(GDEX_API_KEY_PRIMARY);
// No-auth: check trending tokens
const trending = await skill.getTrendingTokens({ chain: 'solana', period: '24h', limit: 5 });
// Trading needs the managed-custody session from sign-in (see "Full Managed-Custody Setup"
// below or gdex-authentication): apiKey + control walletAddress + sessionPrivateKey.
const trade = await skill.buyToken({
chain: 8453, // Base
tokenAddress: '0xTokenAddress',
amount: '0.01', // 0.01 ETH
slippage: 1,
apiKey: GDEX_API_KEY_PRIMARY,
walletAddress: controlAddress, // the control wallet that signed in
sessionPrivateKey,
});

Using the MCP server? Run gdex_connect once and pass the returned accountRef to every trading tool (buy_token, open_perp_position, usdc_buy, ...) instead of keys.

Shared API Keys (pre-configured for all agents):

  • Primary: 9b4e1c73-6a2f-4d88-b5c9-3e7a2f1d6c54
  • Secondary: 2c8f0a91-5d34-4e7b-9a62-f1c3d8e4b705

Supported Chains

ChainChainIdDEXesPerpsBridge
Ethereum1Uniswap v2/v3, Odos—Yes
Optimism10Uniswap v3, Odos—Yes
BSC56PancakeSwap, Odos—Yes
Sonic146——Yes
Fraxtal252Uniswap v3—Yes
Robinhood Chain4663Uniswap v2, KyberSwap—No
Nibiru6900——Yes
Base8453Uniswap v3, Odos, Arcadia—Yes
Arbitrum42161Uniswap v3, Odos—Yes
Berachain80094——Yes
Solana622112261 / 'solana'Raydium, Raydium v2, Orca—Yes
Sui1313131213 / 'sui'Cetus, Bluefin—Yes
HyperLiquid——Native perp engine—

Chain IDs for managed-custody: 900 = Solana, 101 = Sui, or standard EVM chain IDs.

Available Skills

CategorySkillDescription
Getting Startedgdex-onboardingYou are here — Overview, architecture, quickstart
Authgdex-authenticationManaged-custody auth, encryption, session key flow
Tradinggdex-spot-tradingBuy/sell tokens on any supported chain
gdex-perp-tradingHyperLiquid perpetual futures — positions, orders, leverage
gdex-perp-fundingDeposit/withdraw USDC to/from HyperLiquid
gdex-limit-ordersCreate, cancel, and list limit orders
Datagdex-portfolioCross-chain portfolio, balances, trade history
gdex-token-discoveryToken details, trending tokens, OHLCV charts (no auth)
Platformgdex-copy-tradingCopy trade wallets, create/manage configs, tx history, DEXes (Solana writes only)
gdex-perp-copy-tradingHL perp copy trading — top traders, create/manage configs, market data
gdex-bridgeCross-chain bridging with quotes
gdex-usdc-walletUnified USDC wallet — one USDC balance across chains, auto-bridge funding
gdex-wallet-setupGenerate EVM wallets, session keys, get wallet info
Frontendgdex-ui-install-setupReact/Next.js project setup, SDK context providers
gdex-ui-trading-componentsReact component patterns for trading UIs
gdex-ui-portfolio-dashboardPortfolio dashboard components
gdex-ui-wallet-connectionWallet connection UI and auth flows
gdex-ui-themingCSS theming — dark/light mode, trading colors
gdex-ui-page-layoutsFull page compositions for trading apps
Developer Toolsgdex-sdk-debuggingTroubleshoot errors, chain quirks, common pitfalls

Recommended Next Steps

If you want to trade tokens (spot):

  1. Load gdex-authentication for auth setup
  2. Load gdex-spot-trading for buy/sell operations

If you want perpetual futures:

  1. Load gdex-authentication for auth setup
  2. Load gdex-perp-funding to deposit USDC to HyperLiquid
  3. Load gdex-perp-trading for positions and orders

If you just need market data (no auth):

  1. Load gdex-token-discovery — works immediately, no authentication needed

If the user has no wallet:

  1. Load gdex-wallet-setup to generate an EVM control wallet
  2. Load gdex-authentication to sign in via managed custody

If you want to copy successful traders:

  1. Load gdex-authentication for auth setup
  2. Load gdex-copy-trading for tracking wallets and settings

If you want to bridge assets cross-chain:

  1. Load gdex-authentication for auth setup
  2. Load gdex-bridge for bridging operations
  3. For USDC, load gdex-usdc-wallet: it trades and bridges USDC across chains as one balance

If you want to build a trading frontend:

  1. Load gdex-ui-install-setup for React/Next.js project setup
  2. Load gdex-ui-trading-components for order forms and position tables
  3. Load gdex-ui-theming for dark/light mode and trading colors
  4. Load gdex-ui-page-layouts for full page compositions

If you're debugging an issue:

  1. Load gdex-sdk-debugging for error codes, chain quirks, and common pitfalls

Key Links

ResourceURL
SDK (npm)https://www.npmjs.com/package/@gemachdao/gdex-skill
Repositoryhttps://github.com/GemachDAO/gdex-skill
Trading Dashboardhttps://gdex.pro
Backend APIhttps://trade-api.gemach.io/v1

Installation

bash
# Install all skills globally (recommended)
npx skills add GemachDAO/gdex-skill --all --agent '*' -g
# Install specific skill
npx skills add GemachDAO/gdex-skill --skill gdex-spot-trading
# Install SDK
npm install @gemachdao/gdex-skill

MCP Server

For AI clients that support Model Context Protocol, the GDEX MCP server exposes 157 tools covering the full SDK surface — spot and perp trading, HyperLiquid funding, limit orders, copy trading, bridging, portfolio and token data, transfers/social, and Hyperliquid HIP-4 outcome markets (e.g. buy_token, open_perp_position, place_perp_order, hl_create_outcome_order, hl_swap_collateral, get_account_state, estimate_bridge).

Auto-configure (one command, no npm account)
bash
npx -y github:GemachDAO/gdex-skill gdex-mcp-server init --client claude
# clients: claude · cursor · vscode · codex · opencode

This writes the MCP config for your agent (e.g. .mcp.json) wired to launch the server straight from GitHub with the shared API key — no npm publish required:

jsonc
{
"mcpServers": {
"gdex-mcp-server": {
"command": "npx",
"args": ["-y", "github:GemachDAO/gdex-skill", "gdex-mcp-server"],
"env": { "GDEX_API_KEY": "9b4e1c73-6a2f-4d88-b5c9-3e7a2f1d6c54" }
}
}
}
The skills.sh install configures skills, not MCP — run the command above to add
the MCP server. The skills also work via the SDK without MCP. The first launch
builds the package from source (cached afterward).

Autonomous Agent Quickstart

If you're an AI agent operating autonomously (no human to ask), here's the minimum viable flow:

1. Initialize
typescript
import { GdexSkill, GDEX_API_KEY_PRIMARY } from '@gemachdao/gdex-skill';
const skill = new GdexSkill();
skill.loginWithApiKey(GDEX_API_KEY_PRIMARY);
2. Research Before Trading
typescript
// Check what's trending
const trending = await skill.getTrendingTokens({ chain: 622112261, period: '1h', limit: 10 });
// Get details on a token — CHECK dexId BEFORE buying
const token = await skill.getTokenDetails({ tokenAddress: trending[0].address, chain: 622112261 });
if (token.dexId === 'meteora') {
// ❌ Meteora tokens FAIL on Solana — skip this token
}
if (token.dexId === 'raydium') {
// ✅ Safe to buy
}
3. Full Managed-Custody Setup (for actual trading)
typescript
import { ethers } from 'ethers';
import {
generateGdexSessionKeyPair, buildGdexSignInMessage,
buildGdexSignInComputedData, buildGdexUserSessionData,
} from '@gemachdao/gdex-skill';
const wallet = ethers.Wallet.fromPhrase('your mnemonic...');
const { sessionPrivateKey, sessionKey } = generateGdexSessionKeyPair();
const nonce = String(Date.now());
const msg = buildGdexSignInMessage(wallet.address, nonce, sessionKey);
const sig = await wallet.signMessage(msg);
const payload = buildGdexSignInComputedData({
apiKey: GDEX_API_KEY_PRIMARY, userId: wallet.address, sessionKey, nonce, signature: sig,
});
await skill.signInWithComputedData({ computedData: payload.computedData, chainId: 1 }, { sessionPrivateKey });
4. Key Rules for Autonomous Operation
  • Always use control wallet address (the one that signed in) for userId/walletAddress in API calls
  • Never use managed wallet address in API calls (except getHlUserStats())
  • Amounts in raw units for managed trades (lamports for Solana, wei for EVM)
  • Check `dexId` before buying on Solana — skip Meteora tokens
  • Generate fresh nonce for every operation
  • Portfolio/balances use raw client — high-level methods send wrong params
  • If `hlCloseAll` fails, use reduce-only order instead

Related Skills

  • gdex-authentication — Managed-custody auth flow and encryption details
  • gdex-spot-trading — Buy/sell tokens on any chain
  • gdex-perp-trading — HyperLiquid perpetual futures
  • gdex-token-discovery — Token info without authentication
  • gdex-wallet-setup — Wallet generation for new users
  • gdex-ui-install-setup — Frontend project setup with React/Next.js
  • gdex-sdk-debugging — Error troubleshooting and debugging guide

Live-Tested Operational Playbook

_Consolidated reference (migrated from the umbrella skill). Critical notes and an autonomous-agent playbook validated against the live backend._

Critical Notes (Live-Tested)

walletAddress = CONTROL address, NOT managed address. All HL write operations (hlCreateOrder, hlCloseAll, perpDeposit, etc.) require walletAddress set to the control wallet address used during sign-in — NOT the managed-custody address returned by /v1/user. The backend verifies the session key signature against the sign-in userId. Passing the managed address causes 400 Unauthorized (code 103).
`hlCloseAll` / `/v1/hl/close_all_positions` is unreliable. It frequently returns TIMEOUT or JSON parse errors. Close per coin with closePerpPosition (MCP: close_perp_position), which closes the live position at market (reduce-only).

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • contextCustom context provider definitions

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gemachdao/gdex-skill/gdex-onboarding/badge)](https://verified-skill.com/skills/gemachdao/gdex-skill/gdex-onboarding)

Something wrong with this skill or its page? Tell us.