31 Commits

Author SHA1 Message Date
David Lau e68e889c3c feat(chains): support robinhood on kol, smartmoney, signal and cooking
- Remove the robinhood-rejection guards in kol, smartmoney, signal and
  cooking create-token so the CLI matches the backend, which now accepts
  robinhood on these endpoints
- Update --chain / --dex / --raised-token help text and error messages
- cooking: robinhood launchpad uses trench / pons DEXes, native raised
  token only
- Sync SKILL.md files, cli-usage.md and both Readmes with the new chain
  support

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 19:53:25 +08:00
David Lau fdc7a3fb16 fix(security): defend against prompt injection via token metadata
Address HackenProof report GMGNWM-143, where attacker-controlled token metadata
could hijack an AI agent driving gmgn-cli into executing an unauthorized trade.
Move guardrails from overridable SKILL.md text into code.

- Add src/sanitize.ts: neutralize prompt-injection framing and hidden/control
  characters in API output (via printResult) and validate create-token metadata
- Add src/confirm.ts: code-enforced human confirmation for financial writes
  (swap, multi-swap, order strategy create, cooking create) — reads a typed
  "yes" from /dev/tty; automation requires GMGN_ALLOW_AUTOMATED_TRADES=1 + --yes
- Harden config.ts: tighten ~/.config/gmgn/.env to 0600 and warn if world-readable
- Update SKILL.md files, Readme.md and Readme.zh.md to document the gate,
  the --yes flag, and untrusted-metadata handling

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 19:24:50 +08:00
gina888666 3ecd76c572 docs(skills): restore Credential Model to original position in cooking and swap
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 17:30:05 +08:00
gina888666 18a0bf98b1 docs(skills): restore Credential Model section to all 6 SKILL.md files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 17:18:31 +08:00
gina888666 88643ca05c feat(config): add --check flag and improve BEFORE RUNNING ANY COMMAND detection
- Add gmgn-cli config --check: pure local check for GMGN_API_KEY, exit 0 = found, exit 1 = not found
- Update BEFORE RUNNING ANY COMMAND in all 6 SKILL.md files to use --check instead of file path detection
- Add fallback instruction for outdated gmgn-cli versions (unknown option → prompt user to npm install -g gmgn-cli)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:39:57 +08:00
gina888666 d701420705 refactor(config): move setup flow into CLI, remove gmgn-config skill
- gmgn-cli config: add multi-language guidance (zh-CN/zh-TW/en) based on system locale
- gmgn-cli config --apply <key>: write GMGN_API_KEY + GMGN_PRIVATE_KEY to ~/.config/gmgn/.env and verify via track follow-wallet
- Delete skills/gmgn-config/SKILL.md — all logic now lives in CLI source
- Simplify BEFORE RUNNING ANY COMMAND in all 6 SKILL.md files to two CLI commands, no duplicated text
- Remove stale First-time setup sections (openssl-based) from all 6 SKILL.md files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:39:57 +08:00
gina888666 ec35707d15 feat(config): extract setup flow into gmgn-config skill; simplify CLI output
- Add skills/gmgn-config/SKILL.md with complete setup flow: key pair
  generation, credential writing, and verification via track follow-wallet.
  Verification result is output in the user's conversation language.
- Simplify all 6 SKILL.md BEFORE RUNNING ANY COMMAND to one line that
  delegates to gmgn-config skill, removing duplicate logic.
- Remove locale detection from CLI — output only the link; Agent handles
  all user-facing guidance in the conversation language.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:39:57 +08:00
gina888666 cc2fc0ed00 fix(skills): replace python3/awk with node for .env config in all SKILL.md
Use node -e to write GMGN_API_KEY and GMGN_PRIVATE_KEY into .env —
node is guaranteed to be present since gmgn-cli requires Node.js.
Also clarify that the same config step applies when the user explicitly
runs gmgn-cli config and sends back an API Key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:39:57 +08:00
gina888666 5453373ffa fix(skills): fix private key extraction command in BEFORE RUNNING ANY COMMAND
Replace awk+echo with python3+printf to correctly serialize the PEM
private key as a single-line \n-escaped value when writing to .env.
The awk approach produced multi-line output that broke .env parsing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:39:57 +08:00
gina888666 e8af4b88b5 feat(config): add gmgn-cli config command for API Key onboarding
Add a new `gmgn-cli config` command that automates Ed25519 key pair
generation for new users. The command reuses an existing keypair.pem if
present, or generates a new one, then outputs a pre-filled API Key
creation link with the public key embedded. Guidance text is output in
the user's system locale (zh-CN, zh-TW, or English).

All 6 SKILL.md files are updated with a BEFORE RUNNING ANY COMMAND
block that detects missing GMGN_API_KEY, triggers gmgn-cli config, and
instructs the Agent to write both GMGN_API_KEY and GMGN_PRIVATE_KEY
into ~/.config/gmgn/.env once the user provides their API Key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:39:57 +08:00
prodev-nova 3d11f8c6d6 docs(cooking): clarify Flap fee-share schema and add real-world examples
- Correct mkt_bps: it's the tax-recipient share (X handle in gift mode or
  split_conf addresses in split mode), not a generic "marketing" fund
- Make twitter_account / split_conf conditional-required based on recipient_type
  instead of always required
- Add two end-to-end Flap examples (split mode → BSC address, gift mode → X handle)
- Merge "Full worked examples" into the Usage Examples section

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 14:54:11 +08:00
prodev-nova 1964e927cd fix(cooking): remove deprecated --interval-seconds flag
The interval_seconds param is no longer used. Removed from the CLI
option, params assembly, CreateTokenParams, SKILL.md and cli-usage.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 21:03:23 +08:00
David Lau 73d81fa0b2 fix(docs): align slippage to integer 0–100 in all remaining files
Update Readme.md, Readme.zh.md, src/commands/swap.ts and cooking.ts
with integer 0–100 slippage examples (e.g. 30 = 30%) to match the
updated API validation and skill docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 20:09:27 +08:00
prodev-nova fd8a1c4d2a fix(cooking): anti-mev-mode values off / normal / secure
Correct the --anti-mev-mode enum to off / normal / secure
(across cooking.ts, SKILL.md, cli-usage.md, and the TradeParam examples).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 17:00:23 +08:00
prodev-nova 0282a9a09b docs(cooking): add worked examples, platform matrix, TradeParam; fix anti-mev-mode values
- Fix --anti-mev-mode values: off / jito / 0slot (was normal / secure)
- Add platform capability matrix (per-platform fields, bundle/sniper
  wallet limits, cashback/mayhem support)
- Add Quote Token conversion guidance for --raised-token launches
- Add full TradeParam field table for --buy/sell-trade-config
- Add two full worked CLI examples (Pump bundle+sniper+autosell+buyback,
  FourMeme fee-split + USDT raise token)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 16:34:27 +08:00
prodev-nova 134a11593c fix(cooking): correct pump fee-share provider values
The pump_fee_share_list `provider` field rejected "wallet" with
"unknown provider: wallet". Valid values are solana / twitter / github.

- OpenApiClient: update PumpFeeShareInfo provider comment
- SKILL.md / cli-usage.md: provider enum solana / twitter / github,
  username is a SOL address when provider = solana

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:50:54 +08:00
prodev-nova c6fae6afe7 docs(cooking): use "exist auth" not "normal auth" for cooking stats
Address review feedback on PR #148: cooking stats uses exist auth
(authExistRequest), matching the CLI client and project terminology.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 14:50:49 +08:00
prodev-nova ec5719ce12 feat(cooking): complete create params, fix Flap split & pump provider
- Add advanced create_token params: description, fee, dev_max_fee_per_gas,
  raised_token, anti_mev_mode, dev_wallet_bps, source, approve_vision
- Add fee-share configs: pump_fee_share_list, bags_fee_share_list,
  flap_rate_conf (+ V6 buy/sell_tax_rate), fourmeme_rate_conf
- Add multi-wallet buy: buy_wallets, snip_buy_wallets, interval_seconds
- Add CondMarket TradeParam (buy/sell_trade_config) and auto-sell sell_configs
- Pump modes: --is-mayhem / --is-cashback / --is-buy-back (Agent Auto Buyback)
- Fix Flap split_conf field: split_bps -> bps
- Pump fee-share provider: github / wallet only (drop twitter)
- Drop is_revoke_fee_auth and is_agent/agent_bps
- Sync SKILL.md and cli-usage.md with all flags, JSON schemas,
  guided launch flow (platform-aware advanced options) and percentage-based
  fee-share UX

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 14:04:35 +08:00
David Lau d51f1c49d3 refactor(auth): rename normalRequest/criticalRequest; align auth terminology
- Rename private methods: normalRequest → authExistRequest,
  criticalRequest → authSignedRequest in OpenApiClient.ts (both gmgn-skills
  and scripts/src)
- Replace all "normal auth" / "critical auth" labels across SKILL.md files,
  cli-usage.md, Readme.md, and CLI command descriptions with:
    exist auth  — API Key only, no private key required
    signed auth — API Key + GMGN_PRIVATE_KEY signature required
- Add explicit "requires GMGN_PRIVATE_KEY" notes to signed-auth commands
  and "API Key only" notes to exist-auth commands throughout docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 17:45:10 +08:00
deepfeature e181cba142 fix(skills): update rate limit settings for cooking, market, portfolio, swap, token, and track routes 2026-05-13 17:13:26 +08:00
GMGN.AI ad4eab3852 docs(skills): front-load key terms and trim descriptions for search optimization
Shorten all 6 descriptions to 60-80 words with high-value terms in the
first 50 words (highest embedding weight). Add "crypto", "meme coin",
"meme token" where missing. Remove redundant chain-name repetition in
"Use when" sections. Keeps discriminating boundary hints (e.g. gmgn-track
→ gmgn-portfolio redirect for single-wallet queries).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 20:58:22 +08:00
GMGN.AI cdcf4e11d3 docs(skills): optimize descriptions for vector search and keyword search
Rewrote all 6 SKILL.md descriptions to improve discoverability on
clawhub.ai via both vector (semantic) and keyword search:
- gmgn-token: add "due diligence", "is it a rug", "dev wallet", "before buying" semantics
- gmgn-market: clarify "without a specific token address" to distinguish from gmgn-token; add "pumping", "fresh listings"
- gmgn-portfolio: add "by address", "decide whether to copy-trade" trigger context
- gmgn-swap: add "single swap" vs multi-wallet distinction; clarify execution verbs
- gmgn-track: add "alpha signals", "on-chain alpha"; explicit boundary note vs gmgn-portfolio
- gmgn-cooking: add "bonding curve fair launch", "cook a token", ETH/TON chain support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 20:43:44 +08:00
GMGN.AI 4f96fedbb1 docs(skills): optimize SKILL.md descriptions for clawhub.ai discoverability
Rewrite description fields across all 6 skills to follow a consistent
"Get [capabilities] via GMGN API. Use when user asks for [intents]."
pattern, aligned with how Openclaw agents search clawhub.ai. Adds
natural-language intent keywords (price, market cap, holder list,
Smart Money, KOL trades, copy-trading, etc.) so skills surface higher
in skill-search results.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 19:32:03 +08:00
David Lau 48a06cd9b4 feat(swap): expose execution report fields in order get response
Replace top-level filled_input_amount/filled_output_amount with the
report object returned when state=30 and status=successful. Document
all report fields (amounts, tokens, decimals, price, gas) and update
order polling, post-swap receipt template, and cooking status polling
to reference report.input_amount / report.output_amount.

Closes GMGNAI/gmgn-skills#34

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 20:40:53 +08:00
GMGN.AI c525fba661 Merge pull request #77 from prodev-nova/feat/cooking
docs(cooking): improve guided launch flow and clarify env credential lookup
2026-04-07 15:46:15 +08:00
prodev-nova 0ce0051e60 docs(cooking): improve guided launch flow and clarify env credential lookup
- Rewrite Guided Launch Flow: required fields collected one at a time,
  optional fields grouped into a single question for faster UX
- Add env lookup warning: document that a local .env in the workspace
  overrides ~/.config/gmgn/.env, with a check command
2026-04-07 15:08:06 +08:00
gumponchain 8999d36d1d docs(swap): fix price_scale definition and update all skills
- Redefine price_scale: profit_stop uses gain % from entry (e.g. "100" = +100% / 2×), loss_stop uses drop % from entry (e.g. "65" = drops 65%)
- Update all condition-order examples in SKILL.md and both READMEs accordingly
- Add is_anti_mev recommended note and anti-mev flag to swap examples
- Add order strategy create to Financial Risk Notice
- Fix response section heading format (bold → ###) for order strategy create/list
- Add reset_at field extraction guidance to Rate Limit Handling in all 6 skills

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 17:11:16 +08:00
axel dd1cb9d2e5 docs(cooking): rewrite SKILL.md with full guided launch flow and safety infrastructure
- Align opening banners with other GMGN skills (IPv6, no-guess, no-websearch)
- Add Core Concepts section (bonding curve, --buy-amt human units, --dex identifiers, image input, status polling, slippage)
- Add Financial Risk Notice (irreversible transactions, explicit confirmation required)
- Add Guided Launch Flow (6-step wizard: chain/platform → identity → logo → social → buy-amt → confirm)
- Add Rate Limit Handling with leaky-bucket weights
- Add First-time setup and Credential Model sections
- Add Pre-create Confirmation and Post-create Receipt output templates
- Add Execution Guidelines (confirmation, dex validation, image handling, order polling)
- Add --description parameter for token project pitch
- Add References table linking to other GMGN skills (swap, token, market, track, portfolio)
- Remove cross-skill dependencies (standalone skill, no gmgn-swap references)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 21:57:45 +08:00
deepfeature b12a2294b7 feat: add cooking command and update swap/docs 2026-04-02 21:57:45 +08:00
axel 138d571f8b docs(cooking): rewrite SKILL.md with full guided launch flow and safety infrastructure
- Align opening banners with other GMGN skills (IPv6, no-guess, no-websearch)
- Add Core Concepts section (bonding curve, --buy-amt human units, --dex identifiers, image input, status polling, slippage)
- Add Financial Risk Notice (irreversible transactions, explicit confirmation required)
- Add Guided Launch Flow (6-step wizard: chain/platform → identity → logo → social → buy-amt → confirm)
- Add Rate Limit Handling with leaky-bucket weights
- Add First-time setup and Credential Model sections
- Add Pre-create Confirmation and Post-create Receipt output templates
- Add Execution Guidelines (confirmation, dex validation, image handling, order polling)
- Add --description parameter for token project pitch
- Add References table linking to other GMGN skills (swap, token, market, track, portfolio)
- Remove cross-skill dependencies (standalone skill, no gmgn-swap references)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 21:31:21 +08:00
deepfeature 2e71f283f0 feat: add cooking command and update swap/docs 2026-04-02 14:58:55 +08:00