docs(skills): add first-time setup flow to all SKILL.md Prerequisites

Each skill now guides the AI Agent through full credential setup when
GMGN_API_KEY is not configured: generate Ed25519 key pair, show public
key to user with instructions to apply at https://gmgn.ai/ai, wait for
API key, then write to ~/.config/gmgn/.env.

- gmgn-token / gmgn-market / gmgn-portfolio: API key setup only
- gmgn-track: API key + optional private key for follow-wallet
- gmgn-swap: both API key and private key required from the start

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gumponchain
2026-03-31 17:35:41 +08:00
committed by GMGN.AI
parent 91128a887e
commit 09351a9205
5 changed files with 95 additions and 18 deletions
+18 -3
View File
@@ -55,9 +55,24 @@ Use the `gmgn-cli` tool to query K-line data for a token, browse trending tokens
## Prerequisites
- `.env` file with `GMGN_API_KEY` set
- Run from the directory where your `.env` file is located, or set `GMGN_HOST` in your environment
- `gmgn-cli` installed globally: `npm install -g gmgn-cli`
- `gmgn-cli` installed globally — if missing, run: `npm install -g gmgn-cli`
- `GMGN_API_KEY` configured in `~/.config/gmgn/.env`
**First-time setup** (if `GMGN_API_KEY` is not configured):
1. Generate key pair and show the public key to the user:
```bash
openssl genpkey -algorithm ed25519 -out /tmp/gmgn_private.pem 2>/dev/null && \
openssl pkey -in /tmp/gmgn_private.pem -pubout 2>/dev/null
```
Tell the user: *"This is your Ed25519 public key. Go to **https://gmgn.ai/ai**, paste it into the API key creation form, then send me the API Key value shown on the page."*
2. Wait for the user's API key, then configure:
```bash
mkdir -p ~/.config/gmgn
echo 'GMGN_API_KEY=<key_from_user>' > ~/.config/gmgn/.env
chmod 600 ~/.config/gmgn/.env
```
## `market kline` Parameters