/goldsky:subgraph-builderfrom Goldsky
Builds, deploys, and manages Goldsky subgraphs (hosted GraphQL APIs over onchain EVM data). Supports instant no-code subgraphs from ABI and code-based subgraphs with custom entities and AssemblyScript handlers.
Ships in Goldsky. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build a Goldsky Subgraph end-to-end: design the schema, write mappings, configure the manifest, then build and deploy to a hosted GraphQL endpoint. Subgraphs are best for dApp frontends and apps that need flexible GraphQL queries over structured onchain data. Subgraphs are EVM-only.
Default to Turbo unless the user specifically needs GraphQL. Turbo is faster, more reliable, and cheaper, and needs no custom indexing code. Before building a subgraph, confirm a hosted GraphQL API is actually the requirement (usually: a dApp/frontend querying onchain data). If the real goal is moving onchain data into a database (PostgreSQL, ClickHouse, Kafka, S3) for analytics or a backend, build a Turbo pipeline instead —
/turbo-builder. Subgraphs are the right call only for a GraphQL API or custom entity-relationship modeling. Surface this once; don't push it if they clearly want GraphQL.
/subgraph-doctor./subgraph-migrate.goldsky subgraph flags, use goldsky subgraph <cmd> --help — this skill covers the workflow, not a flag dump.| You have… | Approach | Path |
|---|---|---|
| A contract + ABI, want a GraphQL API fast, no custom logic | Instant / no-code subgraph | Step A |
| Custom entities, relationships, or business logic in handlers | Code-based subgraph | Step B |
Both deploy to the same hosted endpoint. Start with instant unless the user needs custom logic.
Run goldsky project list 2>&1. If not logged in, use /auth-setup.
Generate and deploy directly from a contract ABI — no AssemblyScript.
# Interactive wizard (prompts for contract, network, start block, events/calls)
goldsky subgraph init
# Or one-shot from an ABI file
goldsky subgraph deploy my-subgraph/1.0.0 --from-abi ./MyContract.json
--enable-call-handlers (only meaningful with --from-abi).eth_call enrichment, declared calls), see references/schema-and-mappings.md → "Instant subgraph enrichment".Skip to Step 5: Deploy.
A code-based subgraph is three files: subgraph.yaml (manifest), schema.graphql (entities), and src/ AssemblyScript mappings.
goldsky subgraph init my-subgraph/1.0.0 --target-path ./my-subgraph
Useful flags: --abi, --contract, --contract-events, --network, --start-block. See goldsky subgraph init --help.
Define the entities your dApp will query in schema.graphql. This is the most important design step — get the entity model and types right before writing mappings.
REQUIRED for any non-trivial schema: read references/schema-and-mappings.md for scalar-type choices (Bytes for addresses/hashes, BigInt for amounts, BigDecimal for prices), @derivedFrom relationships, immutable entities, and protocol recipes (ERC-20/721, DEX, lending, governance).
Set specVersion, the data source(s) (address, abi, startBlock, network), and which eventHandlers / callHandlers / blockHandlers map to which functions. Use templates for the factory pattern (contracts created at runtime). See references/schema-and-mappings.md → "Manifest".
Use a single
apiVersionacross all data sources — mixed versions fail validation. Declaredeth_calls(a perf win) requirespecVersion: 1.2.0+ — seereferences/performance.md.
Write the handler functions in src/ that turn events into entities. Key idioms (get-or-create, try_ calls for revert safety, Bytes IDs, BigInt/BigDecimal math) are in references/schema-and-mappings.md. Before deploying, write Matchstick unit tests — see references/testing.md.
goldsky subgraph init my-subgraph/1.0.0 --target-path ./my-subgraph --build
# or build as part of deploy below
Confirm the target project first.
deployuses the CLI's currently-selected project silently, which may not be the one you expect — and every deployment is a billed worker. Rungoldsky project listto confirm the active project (or switch it) before deploying, especially when taggingprod.
# From a local code-based build
goldsky subgraph deploy my-subgraph/1.0.0 --path .
# Tag at deploy time so your frontend URL is stable
goldsky subgraph deploy my-subgraph/1.0.0 --path . --tag prod
--path, --from-abi, --from-ipfs-hash, and --from-url are mutually exclusive — use one.
Once deployed, wire up access. Full details in references/operations.md:
https://api.goldsky.com/api/public/<project-id>/subgraphs/<name>/<version>/gn; toggle public/private and use API keys for private.prod/staging to a version so the frontend URL never changes on redeploy.kind: subgraph / specVersion 1.3.0. Combining means deploy each subgraph, then merge downstream: separate endpoints (simplest), a Turbo pipeline when data is derivable from raw chain data (preferred), or a Mirror pipeline when you must reuse the subgraphs' entities (the only case needing Mirror — Turbo can't source from subgraphs). Detect this intent and steer accordingly; confirm the user needs a merge before building. See references/operations.md.goldsky subgraph list my-subgraph/1.0.0
Then query the endpoint, starting with _meta to confirm it's indexing:
{ _meta { hasIndexingErrors block { number } } }
Present a summary (name/version, network, endpoint URL, tag). Point the user to /subgraph-doctor if indexing stalls or errors.
/turbo-builder) — faster and more reliable. Don't default to a subgraph./turbo-builder (Turbo indexes non-EVM chains; subgraphs can't)./subgraph-doctor).startBlock must be a block number on the chain being indexed — not from another chain or a vanity value. Use the contract's deployment (creation) block: find it on the chain's block explorer (the contract's creation transaction) or via the no-code wizard, which auto-detects it. Starting at 0 works but wastes time scanning empty history.references/schema-and-mappings.md — schema design, scalar types, relationships, manifest, AssemblyScript idioms, instant-subgraph enrichment, protocol recipesreferences/performance.md — declared eth_calls, immutable entities, @derivedFrom, timeseries/aggregations, pruning, grafting, call cachereferences/operations.md — GraphQL endpoints, public/private + API keys, rate limits, tags, webhooks, lifecycle, cross-chain, when-to-usereferences/testing.md — Matchstick unit tests, mock library, the Subgraph Linter/subgraph-doctor — Diagnose a failing, stalled, or won't-deploy subgraph/subgraph-migrate — Migrate an existing subgraph off The Graph/turbo-builder — Stream raw chain data to a database instead of a GraphQL API (the preferred default for non-GraphQL use cases, including cross-chain)/mirror — Sync existing subgraph entities into a database — the one case Turbo can't cover (e.g. merging subgraph entities cross-chain)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub goldsky-io/goldsky-agent --plugin goldsky16 skills in this plugin
/auth-setupSet up Goldsky CLI authentication and project configuration. Use this skill when the user needs to: install the goldsky CLI (what's the official install command?), run goldsky login (including when the browser opens but 'authentication failed'), run goldsky project list and see 'not logged in' or 'unauthorized', switch between Goldsky projects, check which project they're currently authenticated to, or fix 'unauthorized' errors when running goldsky turbo commands. Also use for 'walk me through setting up goldsky CLI from scratch for the first time', and when they just installed Goldsky and say 'Set it up and help me get started'. If any other Goldsky skill hits an auth error, redirect here first./boostConfigure and troubleshoot Goldsky Boost, the free RPC caching CDN in front of a provider the user already pays for. Use for cutting RPC bills without migrating, connecting Alchemy/QuickNode/Infura upstreams, goldsky boost, edge.goldsky.com/boost, verification, cache hit rates, eth_getLogs forwarding, and x-cache / x-edge-billable / x-edge-source headers. Boost keeps the existing provider and forwards uncached requests. To replace a provider with Goldsky's managed RPC, use /edge. Pipeline, Subgraph, and Compose tasks have separate skills./datasetsUse this skill when the user needs to look up or verify Goldsky blockchain dataset names, chain prefixes, dataset types, or versions. Triggers on questions like 'what\'s the dataset name for X?', 'what prefix does Goldsky use for chain Y?', 'what version should I use for Z?', or 'what datasets are available for Solana/Stellar/Arbitrum/etc?'. Also use for chain-specific dataset questions (e.g., polygon vs matic prefix, stellarnet balance datasets, solana token transfer dataset names), and to answer 'is there a dataset for X?' where X is a domain rather than a chain — decoded logs, token transfers and balances, mint/burn events for circulating supply, DEX or prediction-market activity (Polymarket), or the raw blocks, transactions and traces behind wallet history and reconciliation. Do NOT trigger for questions about CLI commands, pipeline setup, or general Goldsky architecture unless the core question is about finding the right dataset name or chain prefix. Feeds REST queries (Polymarket, blocks) are /feeds./edgeConfigure and troubleshoot Goldsky Edge, Goldsky's managed EVM RPC endpoint service. Use for Edge RPC, Goldsky RPC endpoints, edge.goldsky.com, slow eth_getLogs, rate limits, hedged requests, flashblocks, HyperEVM system transactions, x402 pay-per-request RPC, pricing, the Edge dashboard, gs_edge_ keys, rpc-edge, and errors -32005/-32012/-32014/-32015/-32016. Covers resilient low-latency EVM endpoints and provider comparisons. For self-hosted eRPC configuration, consult docs.erpc.cloud/llms.txt. To keep an existing provider and reduce its bill through caching, or for x-cache / x-edge-billable / goldsky boost, use /boost. REST reads under edge.goldsky.com/data (Feeds: wallets, tokens, Polymarket, blocks; formerly Edge Data / Data APIs) are /feeds. Pipeline and Subgraph questions have separate skills./feedsQuery Goldsky Feeds over HTTP: one wallet's balances and transfers; metadata and current USD price of up to 100 EVM tokens; Polymarket activity (a wallet's trades), positions, PnL and balances; block headers by number, hash or timestamp; and a chain's head block. Feeds absorbed Edge Data / Data APIs, with the same URLs and keys. Use for wallet holdings, portfolio value, transfer history, deposit checks, token prices or metadata, a wallet's Polymarket trades or positions, which block was at a timestamp, the latest indexed block, edge.goldsky.com/data, a Feeds API key, Feeds pricing, or paying per request with x402 instead of a key. Get the key with goldsky feeds key reveal, then call the feeds over HTTP. The CLI login token is not this key. For rows in the user's own database, use /turbo-builder. For a Turbo dataset name, use /datasets. For JSON-RPC, use /edge or /boost./mirrorUse this skill when the user asks about Goldsky Mirror pipelines — creating, deploying, operating, or troubleshooting Mirror. Triggers on: 'Mirror pipeline', 'goldsky pipeline apply', 'sync subgraph to database', 'mirror vs turbo', 'direct indexing', 'mirror pipeline YAML', 'mirror pipeline pause/stop/restart'. Also use this skill when the user wants to sync a Goldsky subgraph into a database or message queue — Mirror is the only pipeline product that supports subgraph sources. For new pipelines that don't need a subgraph source, the turbo-builder skill is usually a better fit. Do NOT trigger on 'goldsky turbo' commands or generic 'build a pipeline' requests without subgraph context — those belong to the turbo skills.Other plugins' skills for the same job