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
+23 -4
View File
@@ -59,10 +59,29 @@ Use the `gmgn-cli` tool to query on-chain tracking data based on the user's requ
## Prerequisites
- `.env` file with `GMGN_API_KEY` set
- `GMGN_PRIVATE_KEY` required for `track follow-wallet` (signature auth); not needed for `track kol` / `track smartmoney`
- 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`
- `GMGN_PRIVATE_KEY` required only for `track follow-wallet`; not needed for `track kol` / `track smartmoney`
**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
```
If the user also needs `track follow-wallet`, append the private key:
```bash
echo 'GMGN_PRIVATE_KEY="<pem_content_from_step_1>"' >> ~/.config/gmgn/.env
```
## Usage Examples