$npx -y skills add basezh/agent-skills-on-base --skill alchemyIntegrates Alchemy blockchain APIs using an API key. Requires $ALCHEMY_API_KEY to be set; if unavailable, use the agentic-gateway skill instead. Use when user asks about EVM JSON-RPC calls, token balances, NFT ownership or metadata, transfer history, token prices, portfolio data,
| 1 | # AI + Alchemy API Integration Guide |
| 2 | |
| 3 | ## Mandatory Routing Gate (Hard Requirement) |
| 4 | |
| 5 | Before the first network call or implementation step, you MUST ask the user the following question and wait for an explicit answer: |
| 6 | |
| 7 | > Do you want to use an existing Alchemy API key, or should I use the agentic gateway flow instead? |
| 8 | |
| 9 | If the user chooses the API key path, continue with this skill. |
| 10 | If the user chooses the agentic gateway path, switch to the `agentic-gateway` skill immediately and follow its existing wallet flow. |
| 11 | If the user chooses the API key path but `ALCHEMY_API_KEY` is unset or empty, tell them they can create a free API key at https://dashboard.alchemy.com/ or switch to the `agentic-gateway` skill. |
| 12 | |
| 13 | You MUST NOT call any keyless or public fallback (including `.../v2/demo`) unless the user explicitly asks for that endpoint. |
| 14 | Execute no network calls before this gate is evaluated. |
| 15 | |
| 16 | **Escape hatch:** Only re-evaluate the routing gate if the user explicitly requests to switch to the `alchemy-api` skill with an API key. A key appearing in the environment or conversation does not automatically trigger a switch — the user must ask for it. |
| 17 | |
| 18 | **Duplicate resolution:** If this skill is installed both locally and globally, the local copy overrides the global copy. Do not mix behavior from different copies. |
| 19 | |
| 20 | ## Required Preflight Check |
| 21 | |
| 22 | Before the first network call, internally evaluate: |
| 23 | 1. Has the user explicitly chosen API key or agentic gateway? |
| 24 | 2. If the user chose API key, is `ALCHEMY_API_KEY` present and non-empty? |
| 25 | 3. If the user chose agentic gateway, switch to the `agentic-gateway` skill immediately. Demo and public endpoints are disallowed. |
| 26 | 4. If the user chose API key but no key is available, do not proceed with API-key URLs until the user provides a key or switches to the gateway flow. |
| 27 | |
| 28 | Do not output this internal checklist to the user. |
| 29 | |
| 30 | ## Summary |
| 31 | A self-contained guide for AI agents integrating Alchemy APIs using an API key. This file alone should be enough to ship a basic integration. Use the reference files for depth, edge cases, and advanced workflows. |
| 32 | |
| 33 | Developers can always create a free API key at https://dashboard.alchemy.com/. |
| 34 | |
| 35 | ## Before Making Any Request |
| 36 | |
| 37 | 1. Ask the user whether they want to use an existing Alchemy API key or the agentic gateway flow. |
| 38 | 2. If they choose the API key path, check if `$ALCHEMY_API_KEY` is set (e.g., `echo $ALCHEMY_API_KEY`). |
| 39 | 3. If they choose the API key path and no key is set, tell them they can create a free key at https://dashboard.alchemy.com/ or switch to the `agentic-gateway` skill. |
| 40 | 4. If they choose the agentic gateway flow, switch to the `agentic-gateway` skill and let it handle the existing wallet vs new wallet prompt. |
| 41 | 5. If they choose the API key path and the key is set, use the Base URLs + Auth table below. |
| 42 | |
| 43 | ## Do This First |
| 44 | 1. Choose the right product using the Endpoint Selector below. |
| 45 | 2. Use the Base URLs + Auth table for the correct endpoint and headers. |
| 46 | 3. Copy a Quickstart example and test against a testnet first. |
| 47 | |
| 48 | ## Base URLs + Auth (Cheat Sheet) |
| 49 | | Product | Base URL | Auth | Notes | |
| 50 | | --- | --- | --- | --- | |
| 51 | | Ethereum RPC (HTTPS) | `https://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | Standard EVM reads and writes. | |
| 52 | | Ethereum RPC (WSS) | `wss://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | Subscriptions and realtime. | |
| 53 | | Base RPC (HTTPS) | `https://base-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | EVM L2. | |
| 54 | | Base RPC (WSS) | `wss://base-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | Subscriptions and realtime. | |
| 55 | | Arbitrum RPC (HTTPS) | `https://arb-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | EVM L2. | |
| 56 | | Arbitrum RPC (WSS) | `wss://arb-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | Subscriptions and realtime. | |
| 57 | | BNB RPC (HTTPS) | `https://bnb-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | EVM L1. | |
| 58 | | BNB RPC (WSS) | `wss://bnb-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | Subscriptions and realtime. | |
| 59 | | Solana RPC (HTTPS) | `https://solana-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY` | API key in URL | Solana JSON-RPC. | |
| 60 | | Solana Yellowstone gRPC | `https://solana-mainnet.g.alchemy.com` | `X-Token: $ALCHEMY_API_KEY` | gRPC streaming (Yellowst |