Claude Skill

cli-coingecko

Imported from paulrberg/agent-skills/skills/cli-coingecko.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download paulrberg-agent-skills-skills_cli-coingecko-913232a.zip · 3 KB
Part of paulrberg/agent-skills — 42 skills

Install

skills CLI npx skills add https://github.com/PaulRBerg/agent-skills/tree/main/skills/cli-coingecko
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install paulrberg-agent-skills@llmmart
Git git clone https://github.com/PaulRBerg/agent-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole paulrberg/agent-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

CoinGecko CLI

This skill is coordination-exempt: skip the ai-coord gate for its declared work.

Use the installed CLI's machine-readable command catalog as the source of truth for supported market-data operations.

Workflow

  1. Verify cg exists and inspect non-interactive auth/tier state:

    command -v cg
    cg status -o json
    cg commands -o json
    

    Do not run interactive cg auth or write config without the user's approval.

  2. On an explicitly requested CLI update, run cg update --dry-run, then cg update within that authorization. Ask only if the preview reveals an action beyond the requested update. If automatic detection is wrong, pass --method with homebrew, npm, go, or script. Recheck cg version and cg commands -o json, then record the verified version in references/version.txt when maintaining this skill.

  3. Select the command, flags, enum values, output formats, endpoint, auth requirement, and paid_only status from cg commands -o json. Use cg <command> --help only when the catalog lacks a needed detail.

  4. Resolve CoinGecko IDs with cg search <term> -o json when the user supplied a name or ambiguous symbol. Do not silently treat symbols as unique.

  5. Preview unfamiliar or quota-sensitive requests with --dry-run. Execute parseable queries with -o json; use --export only when the user requested a CSV artifact.

  6. If a historical-data request cannot be completed because cg is unavailable, cg history fails due to a CLI defect, or its response is demonstrably malformed, and a visual result can satisfy the request, immediately read references/open-historical-page.md and use its browser fallback.

  7. Present the requested result in the user's format. For ordinary human-readable output, use a compact table and preserve enough precision for the asset's magnitude.

Boundaries and Defaults

  • Batch IDs in one request when the command supports it. On 429, respect the reported reset/backoff rather than retrying aggressively.
  • Detect paid-only commands before execution. If the current tier cannot serve the request, say so and offer a supported route.
  • Do not use the browser fallback for authentication, tier, rate-limit, invalid-input, or ambiguity errors. It does not satisfy requests for JSON, CSV, or other machine-readable evidence.
  • cg does not cover every CoinGecko endpoint. For unsupported contract-address prices, global stats, NFT detail, GeckoTerminal, or logo metadata, fetch the relevant current API documentation from https://docs.coingecko.com/llms.txt and state that the CLI route is unavailable.
  • Never expose API keys or send private wallet/account data to market-data endpoints.

Completion requires the resolved coin/command, successful JSON or requested export evidence, and explicit handling of tier, ambiguity, or rate-limit constraints. A historical-page fallback instead requires a validated URL opened in Chromium plus disclosure of the CLI failure that triggered it.

User-Facing Output

For ordinary human output, lead with ### 🪙 <coin> (<id>), show only the requested metrics in a compact table, and add one source line with the endpoint plus timestamp, tier, or window when material. For exports, use ### ✅ Exported <row count> rows, link the artifact, and state the query/window without reproducing the CSV. Use ### ⚠️ Rate limited — retry after <time> when returning control, ### ⏳ Rate limited — retrying after <time> only while actively waiting, or ### ⚠️ Paid endpoint — current tier: <tier> with one supported route. Return requested JSON/CSV, exact IDs, URLs, values, commands, and diagnostics undecorated.

Files (agent-skills)
  • agents
    • openai.yaml 42 B
      policy:
        allow_implicit_invocation: true
      
  • references
    • open-historical-page.md 1.3 KB
      # Historical Page Fallback
      
      Open CoinGecko's historical-data page only when `cli-coingecko` routes a request here after a genuine CLI failure and a
      visual result can satisfy the request.
      
      ## Workflow
      
      1. Require a CoinGecko coin ID and an ISO date (`YYYY-MM-DD`). If `cg search` still works, use it to resolve a supplied
         name or ambiguous symbol. If the entire CLI is unavailable, resolve the ID through CoinGecko's website search in
         Chromium and confirm the page slug; never infer an ID from a symbol.
      
      2. Build the validated ±1-day URL:
      
         ```sh
         uv run <skill-dir>/scripts/build-url.py <coin-id> <date>
         ```
      
         Invalid IDs or calendar dates exit nonzero without opening a page.
      
      3. Pass the returned URL to Chrome DevTools `new_page` with `background: false`. Do not use the macOS `open` command.
      
      4. Complete with `### 🌐 CoinGecko history opened — <coin-id> · <date> (±1 day)`, the linked page URL, and a concise
         disclosure of the CLI failure that triggered the fallback. Keep the helper's bare-URL stdout and validation errors
         undecorated.
      
      ## Boundaries
      
      - Do not use this route for authentication, tier, rate-limit, invalid-input, or ambiguity errors.
      - A browser page is not machine-readable evidence. If the user requested JSON, CSV, or an exact export, report the CLI
        failure without claiming completion.
      
    • version.txt 6 B
      1.1.7
      
  • scripts
    • build-url.py 1.1 KB
      #!/usr/bin/env -S uv run --script
      """Build a CoinGecko historical-data URL around one ISO date."""
      
      from __future__ import annotations
      
      import argparse
      import re
      from datetime import date, timedelta
      from urllib.parse import quote
      
      
      COIN_ID_RE = re.compile(r"^[a-z0-9]+(?:-[a-z0-9]+)*$")
      
      
      def build_url(coin_id: str, raw_date: str) -> str:
          if not COIN_ID_RE.fullmatch(coin_id):
              raise ValueError("coin-id must be a lowercase CoinGecko slug")
          target = date.fromisoformat(raw_date)
          start = target - timedelta(days=1)
          end = target + timedelta(days=1)
          return (
              f"https://coingecko.com/en/coins/{quote(coin_id, safe='')}/historical_data"
              f"?start={start.isoformat()}&end={end.isoformat()}"
          )
      
      
      def main() -> int:
          parser = argparse.ArgumentParser()
          parser.add_argument("coin_id")
          parser.add_argument("date")
          args = parser.parse_args()
          try:
              print(build_url(args.coin_id, args.date))
          except ValueError as error:
              parser.error(str(error))
          return 0
      
      
      if __name__ == "__main__":
          raise SystemExit(main())
      
  • SKILL.md 3.9 KB
    ---
    coordination: exempt
    name: cli-coingecko
    user-invocable: false
    description:
      "Use for CoinGecko/cg CLI crypto market data: prices, market cap, trending coins, top gainers/losers, coin search, or
      historical/OHLC data."
    ---
    
    # CoinGecko CLI
    
    This skill is coordination-exempt: skip the ai-coord gate for its declared work.
    
    Use the installed CLI's machine-readable command catalog as the source of truth for supported market-data operations.
    
    ## Workflow
    
    1. Verify `cg` exists and inspect non-interactive auth/tier state:
    
       ```sh
       command -v cg
       cg status -o json
       cg commands -o json
       ```
    
       Do not run interactive `cg auth` or write config without the user's approval.
    
    2. On an explicitly requested CLI update, run `cg update --dry-run`, then `cg update` within that authorization. Ask
       only if the preview reveals an action beyond the requested update. If automatic detection is wrong, pass `--method`
       with `homebrew`, `npm`, `go`, or `script`. Recheck `cg version` and `cg commands -o json`, then record the verified
       version in `references/version.txt` when maintaining this skill.
    
    3. Select the command, flags, enum values, output formats, endpoint, auth requirement, and `paid_only` status from
       `cg commands -o json`. Use `cg <command> --help` only when the catalog lacks a needed detail.
    
    4. Resolve CoinGecko IDs with `cg search <term> -o json` when the user supplied a name or ambiguous symbol. Do not
       silently treat symbols as unique.
    
    5. Preview unfamiliar or quota-sensitive requests with `--dry-run`. Execute parseable queries with `-o json`; use
       `--export` only when the user requested a CSV artifact.
    
    6. If a historical-data request cannot be completed because `cg` is unavailable, `cg history` fails due to a CLI defect,
       or its response is demonstrably malformed, and a visual result can satisfy the request, immediately read
       [references/open-historical-page.md](references/open-historical-page.md) and use its browser fallback.
    
    7. Present the requested result in the user's format. For ordinary human-readable output, use a compact table and
       preserve enough precision for the asset's magnitude.
    
    ## Boundaries and Defaults
    
    - Batch IDs in one request when the command supports it. On 429, respect the reported reset/backoff rather than retrying
      aggressively.
    - Detect paid-only commands before execution. If the current tier cannot serve the request, say so and offer a supported
      route.
    - Do not use the browser fallback for authentication, tier, rate-limit, invalid-input, or ambiguity errors. It does not
      satisfy requests for JSON, CSV, or other machine-readable evidence.
    - `cg` does not cover every CoinGecko endpoint. For unsupported contract-address prices, global stats, NFT detail,
      GeckoTerminal, or logo metadata, fetch the relevant current API documentation from
      <https://docs.coingecko.com/llms.txt> and state that the CLI route is unavailable.
    - Never expose API keys or send private wallet/account data to market-data endpoints.
    
    Completion requires the resolved coin/command, successful JSON or requested export evidence, and explicit handling of
    tier, ambiguity, or rate-limit constraints. A historical-page fallback instead requires a validated URL opened in
    Chromium plus disclosure of the CLI failure that triggered it.
    
    ## User-Facing Output
    
    For ordinary human output, lead with `### 🪙 <coin> (<id>)`, show only the requested metrics in a compact table, and add
    one source line with the endpoint plus timestamp, tier, or window when material. For exports, use
    `### ✅ Exported <row count> rows`, link the artifact, and state the query/window without reproducing the CSV. Use
    `### ⚠️ Rate limited — retry after <time>` when returning control, `### ⏳ Rate limited — retrying after <time>` only
    while actively waiting, or `### ⚠️ Paid endpoint — current tier: <tier>` with one supported route. Return requested
    JSON/CSV, exact IDs, URLs, values, commands, and diagnostics undecorated.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related