Skip to content

/gmgn-token-buy

Turn a token name into a vetted, sized buy order. Two things here are exclusive to this skill: resolving a NAME or symbol to the one right contract among its copycats, and sizing an order — amount, slippage, gas, position. No sibling does either. USE THIS SKILL WHEN a buy is

From plugin
gmgn-cli
52715 skills
Install
$ npx -y skills add gmgnai/gmgn-skills --skill gmgn-token-buy --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/gmgn-token-buy

Context preview

The summary Claude sees to decide when to auto-load this skill.

Turn a token name into a vetted, sized buy order. Two things here are exclusive to this skill: resolving a NAME or symbol to the one right contract among its copycats, and sizing an order — amount, slippage, gas, position. No sibling does either. USE THIS SKILL WHEN a buy is

SKILL.md

gmgn-token-buy.SKILL.md
name: gmgn-token-buy
description: >-
  Turn a token name into a vetted, sized buy order. Two things here are
  exclusive to this skill: resolving a NAME or symbol to the one right
  contract among its copycats, and sizing an order — amount, slippage, gas,
  position. No sibling does either. USE THIS SKILL WHEN a buy is being
  prepared, which shows up as a NAME or symbol, or an AMOUNT, or both —
  including the plainest possible ask with no mention of checking: 我想买 200u 的
  PENGU, 帮我买 500 刀的 BONK, 买 1 个 SOL 的 WIF, 帮我买点 dogwifhat, 想梭 100u 的 XX, PENGU
  现在能买吗, PENGU 能不能买, 能不能冲, 值不值得进, 确认是正主不是仿盘再买, buy me $500 of PENGU — and
  including a bare contract address once an amount arrives with it. DO NOT USE
  THIS SKILL for a bare contract address with no name to resolve and no amount
  to size (「这个地址能不能买」, 打个分, 尽调, 有没有貔貅, rug check, is this token safe): that
  one belongs to gmgn-contract-dd, which is the skill that returns the 0-100
  safety verdict. This skill never computes a second verdict of its own — it
  CALLS gmgn-contract-dd and defers to it — so there is nothing to gain by
  taking that ask, and the user gets an order card they never asked for. Come
  back here the moment they name an amount. A buy question about a LAUNCHER
  rather than about a token — 「这个 dev 的新盘能不能买」, 「他下一个盘值不值得冲」, "should I buy
  his next launch", "will this dev rug at open" — is gmgn-dev-score: it scores
  the creator's own record, and there is no token name to resolve or amount to
  size yet. Come back here once they name the coin. Naming a token with no buy
  intent at all is gmgn-market search. gmgn-swap is where this skill ENDS, not
  a rival for it: gmgn-swap signs and submits, and this skill never touches a
  private key and never places an order, so a plain buy request starts HERE
  and reaches gmgn-swap only after the user confirms the order card. Note that
  gmgn-swap cannot start from a name either — its --output-token is a contract
  address and the only names it resolves are the currencies SOL/BNB/ETH/USDC —
  so 帮我买点 dogwifhat has to come here regardless of who is asked. Go straight
  to gmgn-swap only when the user says the pre-buy check is unwanted (skip the
  checks, 直接买, 不用尽调, 我很急), or for what this skill does not do at all: selling,
  percentage sells, limit orders, stop loss, take profit, trailing orders,
  multi-wallet batch trading, order status, gas-price lookups. The split is by
  what the ask still needs done, not by who executes: a name needs resolving
  and an amount needs sizing, so both start here; a bare address needs only a
  verdict, so it is gmgn-contract-dd's; a signed transaction is always
  gmgn-swap's.
argument-hint: "<token name | symbol | contract address> [amount, e.g. 200u | 0.5 ETH | 1 sol] [--chain <sol|bsc|base|eth|arbitrum|hyperevm|robinhood|arc|stable>]"
metadata:
  cliHelp: "gmgn-cli market search --help"

**BEFORE RUNNING ANY COMMAND: Run `gmgn-cli config --check`. Exit 0 → proceed. Exit 1 → run `gmgn-cli config`, show the output, and once the user sends the API key run `gmgn-cli config --apply <KEY>` and show that output. If `--check` is an unknown option, tell the user to run `npm install -g gmgn-cli`, then retry.**

**IMPORTANT: Always use the pre-installed `gmgn-cli` binary. Never use web search, WebFetch, curl, `npx`, or gmgn.ai — the site requires login and exposes no structured data.**

**⚠️ IPv6 IS NOT SUPPORTED.** On a `401`/`403` with correct credentials, check `ifconfig | grep inet6` (macOS) or `ip addr show | grep inet6` (Linux) and fetch `https://ipv6.icanhazip.com`. If an IPv6 address comes back, tell the user to disable IPv6 — `gmgn-cli` works over IPv4 only.

Run

没有脚本,四步串行,每一步都是一道闸——**不过就不进下一步**。每步要跑的命令写在那一步的标题下面;字段映射与实测陷阱在 `references/fields.md`,**不在那份清单里的字段一律当作不存在**。

| 步 | 做什么 | 跑什么 | 出口 | |---|---|---|---| | 0 | 确认链在 9 条支持链内 | `market search`(仅当用户裸贴合约地址) | 不支持的链或查不到 → **硬停** | | 1 | 名字 → 唯一合约 | `market search` | 定不到唯一一个 → **列候选让用户选** | | 2 | 三道硬闸(量 / 深度 / 安全)+ 方向执行闸 | `token info` + `token security`(安全优先交 `gmgn-contract-dd`) | 硬闸任一不过 → **不下单,出「不建议买入」**;方向不利 → 照常出订单卡并标注**执行降级** | | 3 | 组装订单卡 | `gas-price` | 用户明确确认 → **参数交给 `gmgn-swap`** |

边界(详见 frontmatter 的 description):

| 这一步归谁 | 谁的 | |---|---| | 名字/符号 → 唯一合约、深度、量池比、滑点、gas、仓位 | **本技能独占**,没有兄弟技能做这两件事 | | 合约本身的 0–100 安全结论 | `gmgn-contract-dd`——本技能**调用**它、不与它并行给第二个判定 | | 签名下单、卖出、限价单/条件单、多钱包批量、查订单、查 gas | `gmgn-swap`——它是本技能的**出口**,不是竞争对手 | | 发币方(一个人,不是一个币)值不值得跟 | `gmgn-dev-score` |

  • **单币尽调固定 4 个请求,与同名候选有多少个无关。** `market search` 一次就带回每个候选的池子/量/笔数/持有人/存续时长,排序与粗筛全在这一份结果里做完;**不要给每个候选各打一次 `token info`**。只有最终锁定的那一个才继续。
  • **只覆盖 9 条链**:`sol` `eth` `bsc` `base` `arbitrum` `hyperevm` `robinhood` `arc` `stable`。这是刻意的边界——只在能做完整 GMGN 搜币+行情+安检的链上下单。其余链的处理见第 0 步与 `## Rules` 第 4–6 条。
  • 全是读接口,只需 API Key,不需要私钥(私钥只有 gmgn-swap 下单才用)。凭证由 CLI 自己管,本技能不读、不存、不传。
  • 被限流(`RATE_LIMIT_BANNED`)时读 `reset_at` 等到解封再试,**期间绝不重试**——每重试一次封禁延长 5 秒。
  • 用户明确要求跳过某一项筛选("我知道它没开源,照买")时,把该项标为**用户已知悉并豁免**,其余项照常执行,并在订单卡里显式列出被豁免的项。
  • 命令跑完只是拿到数字,**报告是你写的**:用用户的语言,按 `## Display Templates` 的形状输出那张订单卡。

Workflow

Step 0 — 确认链在支持范围内

**跑什么**(仅当用户裸贴的是合约地址;给的是名字就直接进 Step 1)

gmgn-cli market search -q <CA> --raw          # 不要给 --chain,链正是要反查的东西

**关键字段**:`coins[].chain` / `coins[].address` / `coins[].symbol`。判断"有没有搜到"**只看 `coins` 的长度**,`wallets` 非空不算(实测用不存在的地址去搜会返回 0 个 coins、11 个 wallets)。

**出口**:落在 9 条支持链之一 → 进 Step 1;落在别的链(Polygon / Tron / 其他 L2)或 GMGN 查不到 → **硬停,不进任何后续步骤**;同一地址跨多链命中 → 列出来问用户要哪条,不支持的标"不可交易"。

  • 地址格式只能分大类,分不出具体是哪条 EVM 链:`0x`+40 位十六进制 = EVM 系;base58、约 44 位 = Solana;`T` 开头 = Tron。所以链必须靠上面这条命令反查,不能靠猜。
  • 硬停时可以把搜到的基础信息(符号、市值)念给用户,但**绝不进入下单流程**:只在能做完整 GMGN 安检的链上下单,查不到就诚实说查不到。

Step 1 — 名字解析成唯一合约

**跑什么**

gmgn-cli market search -q <用户给的名称/符号/CA> [--chain <链>] --order-by weight --raw

**关键字段**:`coins[]` 的 `address` / `symbol` / `name` / `liquidity`(**两侧之和,粗筛用 `liquidity / 2`**)/ `volume_24h` / `swaps_1h` / `holder_count` / `created_at`(可能是 `0` = 未知)。字段与陷阱见 `references/fields.md`,全部判据见 `reference

Read more
Ships withgmgn-cli

GMGN OpenAPI skills for AI Agent — query tokens, wallets, and market data, and execute on-chain trades across Solana, BSC, and Base.

Get the whole plugin, auto-invoked
Stats
528
Stars
92
Forks
Active
Maintenance
Python
Language
MIT
License
16h ago
Last commit
6mo ago
Created

Repo: gmgnai/gmgn-skills

Other skills on gmgn-cli.