MCPInstall

subgraph-builder

Build, author, and deploy Goldsky Subgraphs — hosted GraphQL APIs over onchain data. Use when the user wants to create, scaffold, write, or deploy a subgraph; design a schema/entities; write or fix AssemblyScript mapping handlers; configure subgraph.yaml (handlers, templates, instant/no-code from ABI); set up GraphQL endpoints, tags, or webhooks; optimize a slow subgraph (ethcalls, immutable entities); or pause/resume a subgraph. Triggers on: 'build/deploy/scaffold a subgraph', 'write a mapping', 'design a schema', 'subgraph.yaml', 'instant subgraph', 'combine/compose/merge multiple subgraphs', 'cross-chain subgraph', 'optimize indexing speed', 'too many ethcalls', 'pause/resume subgraph'. For a subgraph that is failing, stalled, erroring, or won't deploy, use /subgraph-doctor (optimizing a healthy subgraph belongs here, not the doctor). For migrating off The Graph, use /subgraph-migrate. For streaming raw chain data to a DB without GraphQL, use /turbo-builder.

Installs
3.7K
Last 24h
+235
Trending rank
#1154
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/goldsky-io/goldsky-agent --skill subgraph-builder
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads subgraph-builder automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Subgraph Builder

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.

Boundaries

  • Build and author NEW subgraphs (schema, mappings, manifest, deploy, endpoints, tags, webhooks).
  • Do not diagnose broken/stalled subgraphs — use /subgraph-doctor.
  • Do not run The Graph migrations — use /subgraph-migrate.
  • For exhaustive goldsky subgraph flags, use goldsky subgraph <cmd> --help — this skill covers the workflow, not a flag dump.

Choose an approach first

You have…ApproachPath
A contract + ABI, want a GraphQL API fast, no custom logicInstant / no-code subgraphStep A
Custom entities, relationships, or business logic in handlersCode-based subgraphStep B

Both deploy to the same hosted endpoint. Start with instant unless the user needs custom logic.

Step 0: Verify Authentication

Run goldsky project list 2>&1. If not logged in, use /auth-setup.

Step A: Instant / no-code subgraph (from ABI)

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
  • The wizard writes a JSON config you can re-deploy and version.
  • Enable contract-call indexing with --enable-call-handlers (only meaningful with --from-abi).
  • For richer instant subgraphs (computed fields, eth_call enrichment, declared calls), see references/schema-and-mappings.md → "Instant subgraph enrichment".

Skip to Step 5: Deploy.

Step B: Code-based subgraph

A code-based subgraph is three files: subgraph.yaml (manifest), schema.graphql (entities), and src/ AssemblyScript mappings.

Step 1: Scaffold

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.

Step 2: Design the schema

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).

Step 3: Configure the manifest

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 apiVersion across all data sources — mixed versions fail validation. Declared eth_calls (a perf win) require specVersion: 1.2.0+ — see references/performance.md.

Step 4: Write mappings and build

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

Step 5: Deploy

Confirm the target project first. deploy uses the CLI's currently-selected project silently, which may not be the one you expect — and every deployment is a billed worker. Run goldsky project list to confirm the active project (or switch it) before deploying, especially when tagging prod.

# 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.

Step 6: Endpoints, tags, and webhooks

Once deployed, wire up access. Full details in references/operations.md:

  • GraphQL endpoint — https://api.goldsky.com/api/public/<project-id>/subgraphs/<name>/<version>/gn; toggle public/private and use API keys for private.
  • Tags — pin prod/staging to a version so the frontend URL never changes on redeploy.
  • Webhooks — push entity changes (INSERT/UPDATE/DELETE) to an HTTP endpoint.
  • Combining / composing multiple subgraphs (incl. cross-chain) — Goldsky has no native subgraph composition; don't point users at 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.

Step 7: Verify

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.

Important Rules

  • Confirm GraphQL is actually needed before building a subgraph. If the user just needs data in a database, steer them to Turbo (/turbo-builder) — faster and more reliable. Don't default to a subgraph.
  • Before proposing or building any pipeline on top of a subgraph, confirm the user needs it. For cross-chain, check whether they want unified queries at all (vs. just two endpoints), and prefer Turbo over Mirror. Don't delete, redeploy, or stand up a database/pipeline until they've chosen.
  • Subgraphs are EVM-only. For Solana/Sui/other non-EVM, use /turbo-builder (Turbo indexes non-EVM chains; subgraphs can't).
  • Every version is billed separately (worker + entity storage). Delete old versions you no longer query.
  • Redeploying creates a new immutable version — use tags so the frontend URL is stable.
  • Verify the contract address exists on the target chain and use the correct chain slug (a wrong network indexes blocks that don't exist — the #1 silent failure; see /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.
  • Goldsky has a permanent RPC call cache, so re-syncs of the same/similar subgraph are much faster.
  • Prefer instant subgraphs when there's no custom logic; reach for code-based only when entity modeling or handler logic requires it.

Reference files

  • references/schema-and-mappings.md — schema design, scalar types, relationships, manifest, AssemblyScript idioms, instant-subgraph enrichment, protocol recipes
  • references/performance.md — declared eth_calls, immutable entities, @derivedFrom, timeseries/aggregations, pruning, grafting, call cache
  • references/operations.md — GraphQL endpoints, public/private + API keys, rate limits, tags, webhooks, lifecycle, cross-chain, when-to-use
  • references/testing.md — Matchstick unit tests, mock library, the Subgraph Linter

Related

  • /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)

FAQ

What does the subgraph-builder skill do?

Build, author, and deploy Goldsky Subgraphs — hosted GraphQL APIs over onchain data. Use when the user wants to create, scaffold, write, or deploy a subgraph; design a schema/entities; write or fix AssemblyScript mapping handlers; configure subgraph.yaml (handlers, templates, instant/no-code from ABI); set up GraphQL endpoints, tags, or webhooks; optimize a slow subgraph (ethcalls, immutable entities); or pause/resume a subgraph. Triggers on: 'build/deploy/scaffold a subgraph', 'write a mapping', 'design a schema', 'subgraph.yaml', 'instant subgraph', 'combine/compose/merge multiple subgraphs', 'cross-chain subgraph', 'optimize indexing speed', 'too many ethcalls', 'pause/resume subgraph'. For a subgraph that is failing, stalled, erroring, or won't deploy, use /subgraph-doctor (optimizing a healthy subgraph belongs here, not the doctor). For migrating off The Graph, use /subgraph-migrate. For streaming raw chain data to a DB without GraphQL, use /turbo-builder.

How do I install subgraph-builder?

Run npx skills add https://github.com/goldsky-io/goldsky-agent --skill subgraph-builder in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/subgraph-builder/ (personal) or .claude/skills/subgraph-builder/ (project).

Which AI agents can use subgraph-builder?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is subgraph-builder safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains subgraph-builder?

It is published by goldsky-io in goldsky-io/goldsky-agent. It has 3,711 recorded installs.

More from goldsky-io/goldsky-agent

View all →

turbo-pipelines

goldsky-io/goldsky-agent

Turbo pipeline YAML reference and architecture guide. Covers: YAML field syntax (startat, from, version, primarykey), source/transform/sink configuration, validation errors, resource sizing (xs–xxl), architecture decisions (dataset vs kafka, streaming vs job, fan-out vs fan-in, sink selection, pipeline splitting). Triggers on: 'what does field X do', 'what fields does a postgres sink need', 'what resource size', 'should I use kafka or dataset', 'how to structure my pipeline'. For writing transforms, use /turbo-transforms. For end-to-end building, use /turbo-builder.

Data & Databases3.8K installs

turbo-transforms

goldsky-io/goldsky-agent

Write SQL, TypeScript, and dynamic table transforms for Turbo pipelines. Covers: decoding EVM logs with gslogdecode, filtering/casting blockchain data, UNION ALL for combining events, TypeScript/WASM transforms (invoke function), dynamic lookup tables (dynamictablecheck), transform chaining, and Solana decoding. Triggers on: 'decode Transfer events', 'write a SQL transform', 'filter by contract', 'TypeScript transform', 'dynamic table', 'UNION ALL'. For pipeline YAML structure, use /turbo-pipelines. For end-to-end building, use /turbo-builder.

turbo-doctor

goldsky-io/goldsky-agent

Diagnose and fix broken Goldsky Turbo pipelines interactively. Triggers on: pipeline in error state, stuck starting, connection refused, not getting data, duplicate rows, missing fields, slow backfill, or any named pipeline misbehaving. Runs logs/status commands, identifies root cause, and offers fixes. For CLI syntax or error pattern lookup without an active problem, use /turbo-operations instead.

3.8K installs

turbo-builder

goldsky-io/goldsky-agent

Build and deploy new Goldsky Turbo pipelines: requirements, dataset selection, YAML, validation, and deployment. Use for 'build a pipeline', 'index X on Y chain', or moving chain/contract data into Postgres, MySQL, ClickHouse, Kafka, Pub/Sub, S3, SQS, or webhooks. Also use for data goals such as Polymarket fills/positions/PnL, prediction markets, stablecoin or circulating supply, proof of reserves, sanctions/AML transfer monitoring, deposit detection, CCTP burns/mints, cross-chain settlement, payment reconciliation, wallet history streamed into the user's own database, token holder registries, tokenized equities/RWA, and wash-trading detection. A REST lookup of one wallet's balances or transfers is /feeds, not a pipeline, and so is a read of Polymarket activity, positions or balances. Debug existing pipelines with /turbo-doctor; look up syntax with /turbo-pipelines.

Data & Databases3.8K installs

datasets

goldsky-io/goldsky-agent

Use 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. Wallet Feeds API queries are /

Data & Databases3.8K installs

auth-setup

goldsky-io/goldsky-agent

Set 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.

Backend & APIs3.8K installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs