gmgn-swap

gmgn-swap is a skill for Claude Code from GMGNAI/gmgn-skills. It costs 404 tokens per session (14,316 once invoked), scanned A, original, MIT.

A command-line workflow for swapping tokens through GMGN, a cryptocurrency trading service.

In plain words
What is it for?
Use it to configure GMGN and run supported token-swap commands through the GMGN command-line tool.
Why use it?
It checks the command-line setup and credentials before trading, and requires configuration to be completed when access is not ready.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the gmgn-cli plugin — 15 skills shipped together

Good fit Use it to configure GMGN and run supported token-swap commands through the GMGN command-line tool.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gmgnai/gmgn-skills/gmgn-swap
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add GMGNAI/gmgn-skills --skill gmgn-swap
Clone the repo
git clone --depth 1 https://github.com/GMGNAI/gmgn-skills

Made for: Claude Code.

Or install gmgn-cli, the plugin that ships this one along with the rest of its 15 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gmgn-swap

README.md
[![agentmods](https://agentmods.dev/badge/skills/gmgnai/gmgn-skills/gmgn-swap/github.svg)](https://agentmods.dev/skills/gmgnai/gmgn-skills/gmgn-swap)
Your own site
<a href="https://agentmods.dev/skills/gmgnai/gmgn-skills/gmgn-swap"><img src="https://agentmods.dev/badge/skills/gmgnai/gmgn-skills/gmgn-swap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gmgn-swap

Your own site · 80×15
<a href="https://agentmods.dev/skills/gmgnai/gmgn-skills/gmgn-swap"><img src="https://agentmods.dev/badge/skills/gmgnai/gmgn-skills/gmgn-swap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 404 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 14,316 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket warn 19 May 2026
  • Snyk fail 19 May 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 65
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 833
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00404 $0.14316
Opus 5 $0.00202 $0.07158
Sonnet 5 $0.00081 $0.02863
Haiku 4.5 $0.00040 $0.01432

Measured 7d ago against content hash 009bd587e76a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

gmgn-swap scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**IMPORTANT: Always use `gmgn-cli` commands below. Do NOT use web search, WebFetch, curl, or visit gmgn.ai — all swap operations must go through the CLI. The CLI handles signing and submission automatically.**
skills/gmgn-swap/SKILL.md · 849 lines

How it starts

The opening of the file, as written. The whole thing — 849 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BEFORE RUNNING ANY COMMAND: Run gmgn-cli config --check. If exit code is 0, proceed normally. If exit code is 1, (1) run gmgn-cli config and show the output to the user; (2) once the user sends the API Key, run gmgn-cli config --apply <KEY> to complete configuration and verification, then show the output to the user. If --check returns an error (unknown option or command not found), tell the user to run npm install -g gmgn-cli to update, then retry.

IMPORTANT: Always use gmgn-cli commands below. Do NOT use web search, WebFetch, curl, or visit gmgn.ai — all swap operations must go through the CLI. The CLI handles signing and submission automatically.

IMPORTANT: Do NOT guess field names or values. When a field's meaning is unclear, look it up in the Response Fields sections below before using it.

⚠️ IPv6 NOT SUPPORTED: If you get a 401 or 403 error and credentials look correct, check for IPv6 immediately: (1) list all network interfaces and their IPv6 addresses — run ifconfig | grep inet6 (macOS) or ip addr show | grep inet6 (Linux); (2) send a test request to https://ipv6.icanhazip.com — if the response is an IPv6 address, outbound traffic is going via IPv6. Tell the user immediately: "Please disable IPv6 on your network interface — gmgn-cli commands only work over IPv4."

Use the gmgn-cli tool to submit a token swap or query an existing order. GMGN_API_KEY is always required. GMGN_PRIVATE_KEY is required for critical-auth commands such as swap and order subcommands — except order quote, which only requires GMGN_API_KEY.

Core Concepts

  • Smallest unit--amount is always in the token's smallest indivisible unit, not human-readable amounts. For SOL: 1 SOL = 1,000,000,000 lamports. For EVM tokens: depends on decimals (most ERC-20 tokens use 18 decimals). Always convert before passing to the command — do not pass human amounts directly.

  • slippage — Price tolerance as an integer 0–100, e.g. 30 = 30%. If the price moves beyond this threshold before the transaction confirms, the swap is rejected. Use --auto-slippage for volatile tokens to let GMGN set an appropriate value automatically.

  • --amount vs --percent — Mutually exclusive. --amount specifies an exact input quantity (in smallest unit). --percent sells a percentage of the current balance and is only valid when input_token is NOT a currency (SOL/BNB/ETH/USDC). Never use --percent to spend a fraction of SOL/BNB/ETH.

  • Currency tokens — Each chain has designated currency tokens (SOL, BNB, ETH, USDC). These are the base assets used to buy other tokens or receive swap proceeds. Their contract addresses are fixed — look them up in the Chain Currencies table, never guess them.

  • Anti-MEV — MEV (Miner/Maximal Extractable Value) refers to frontrunning and sandwich attacks where bots exploit pending transactions. --anti-mev routes the transaction through protected channels to reduce this risk. Recommended: always enable. Default: on. Not supported on base chain.

  • Signed authswap and most order subcommands require both GMGN_API_KEY and GMGN_PRIVATE_KEY. The private key never leaves the machine — the CLI uses it only for local signing and sends only the resulting signature. Exception: order quote only requires GMGN_API_KEY.

  • order_id / status — After submitting a swap, the response includes an order_id. Use order get --order-id to poll for final status. Possible values: pendingprocessedconfirmed (success) or failed / expired. Do not report success until status is confirmed.

  • report.input_amount / report.output_amount — Actual amounts consumed/received, in smallest unit. Only present when state = 30 and status = "successful". Convert to human-readable using report.input_token_decimals / report.output_token_decimals before displaying to the user.

Read the full file on GitHub · 849 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed · +22 lines · +303 tokens per session 009bd587e76a
  2. 13d ago First seen · 827 lines · 101 tokens per session scan A 90abbe12c2a2

Subscribe to this mod's changes

gmgn-swap is a skill published in the GitHub repository GMGNAI/gmgn-skills (522 stars, last pushed yesterday), licensed MIT. It adds 404 tokens to every session and 14,316 once invoked, about $0.0020 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

coingecko-api

Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.

agiprolabs/claude-trading-skills · 52 tokens

market-sentiment

Synthesize crypto market sentiment by combining the Fear & Greed index, trending coins, narrative momentum, whale activity, and on-chain signals into a single actionable market read. Use when the user wants to know if the market is bullish, bearish, or transitioning. Powered by the free-crypto-news API.

nirholas/cryptocurrency.cv · 66 tokens

alien-plugg-x402

38 paid x402 API endpoints for AI agents — Zora crypto analysis, Robinhood Chain tokenized stocks, on-chain intelligence, whale tracking, and utilities. MCP-compatible. Flat $0.003/call via USDC micropayments on Base.

michaelhutchings626-hub/alien-plugg-x402 · 57 tokens

trading-signals

Fetches live AI crypto trading signals with entry price, stop-loss, take-profit, leverage, confidence scores, and automated verification. Covers 50+ coins including BTC, ETH, SOL. Use when the user asks for crypto signals, trade ideas, market direction, portfolio analysis, or wants to build a trading bot.

roman-rr/trading-skills · 69 tokens

defi-yield

DeFi yield analysis and optimization — lending rates, LP yields, staking returns, yield farming strategies, risk-adjusted yield comparison, and protocol-level sustainability assessment.

HKUDS/Vibe-Trading · 37 tokens

crypto-derivatives

Crypto-derivatives strategies — perpetual funding-rate arbitrage, futures term-structure contango/backwardation trading, and option volatility-smile / Greeks analysis.

HKUDS/Vibe-Trading · 37 tokens