$npx -y skills add PaulRBerg/agent-skills --skill coingecko-cliUse for CoinGecko/cg CLI crypto market data: prices, market cap, trending coins, top gainers/losers, coin search, or historical/OHLC data.
| 1 | # CoinGecko CLI |
| 2 | |
| 3 | Use the installed CLI's machine-readable command catalog as the source of truth for supported market-data operations. |
| 4 | |
| 5 | ## Workflow |
| 6 | |
| 7 | 1. Verify `cg` exists and inspect non-interactive auth/tier state: |
| 8 | |
| 9 | ```sh |
| 10 | command -v cg |
| 11 | cg status -o json |
| 12 | cg commands -o json |
| 13 | ``` |
| 14 | |
| 15 | Do not run interactive `cg auth` or write config without the user's approval. |
| 16 | |
| 17 | 2. Select the command, flags, enum values, output formats, endpoint, auth requirement, and `paid_only` status from |
| 18 | `cg commands -o json`. Use `cg <command> --help` only when the catalog lacks a needed detail. |
| 19 | |
| 20 | 3. Resolve CoinGecko IDs with `cg search <term> -o json` when the user supplied a name or ambiguous symbol. Do not |
| 21 | silently treat symbols as unique. |
| 22 | |
| 23 | 4. Preview unfamiliar or quota-sensitive requests with `--dry-run`. Execute parseable queries with `-o json`; use |
| 24 | `--export` only when the user requested a CSV artifact. |
| 25 | |
| 26 | 5. Present the requested result in the user's format. For ordinary human-readable output, use a compact table and |
| 27 | preserve enough precision for the asset's magnitude. |
| 28 | |
| 29 | ## Boundaries and Defaults |
| 30 | |
| 31 | - Batch IDs in one request when the command supports it. On 429, respect the reported reset/backoff rather than retrying |
| 32 | aggressively. |
| 33 | - Detect paid-only commands before execution. If the current tier cannot serve the request, say so and offer a supported |
| 34 | route. |
| 35 | - `cg` does not cover every CoinGecko endpoint. For unsupported contract-address prices, global stats, NFT detail, |
| 36 | GeckoTerminal, or logo metadata, fetch the relevant current API documentation from |
| 37 | <https://docs.coingecko.com/llms.txt> and state that the CLI route is unavailable. |
| 38 | - Never expose API keys or send private wallet/account data to market-data endpoints. |
| 39 | |
| 40 | Completion requires the resolved coin/command, successful JSON or requested export evidence, and explicit handling of |
| 41 | tier, ambiguity, or rate-limit constraints. |
| 42 | |
| 43 | ## User-Facing Output |
| 44 | |
| 45 | For ordinary human output, lead with `### 🪙 <coin> (<id>)`, show only the requested metrics in a compact table, and add |
| 46 | one source line with the endpoint plus timestamp, tier, or window when material. For exports, use |
| 47 | `### ✅ Exported <row count> rows`, link the artifact, and state the query/window without reproducing the CSV. Use |
| 48 | `### ⚠️ Rate limited — retry after <time>` when returning control, `### ⏳ Rate limited — retrying after <time>` only |
| 49 | while actively waiting, or `### ⚠️ Paid endpoint — current tier: <tier>` with one supported route. Return requested |
| 50 | JSON/CSV, exact IDs, URLs, values, commands, and diagnostics undecorated. |