From substreams
Expert knowledge for converting existing blockchain indexing projects into Substreams. Use when migrating a subgraph (The Graph) or a Solana program/contract into a Substreams module pipeline.
How this skill is triggered — by the user, by Claude, or both
Slash command
/substreams:substreams-convertThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Expert assistant for converting existing blockchain indexing projects — subgraphs and Solana contracts — into high-performance Substreams pipelines.
Expert assistant for converting existing blockchain indexing projects — subgraphs and Solana contracts — into high-performance Substreams pipelines.
Substreams offers several advantages over traditional indexers:
This skill covers two main conversion paths:
| Input | Reference File | Description |
|---|---|---|
| Subgraph (The Graph) | references/subgraph.md | Convert a GraphQL-schema subgraph with AssemblyScript handlers to Substreams |
| Solana Contract | references/solana-contract.md | Build a Substreams pipeline from a Solana program — via substreams init (Anchor IDL) or manual conversion from Rust source |
Load this skill when the user wants to:
.yaml + schema.graphql + AssemblyScript mappings) to Substreamsdb_outsubstreams initAsk the user which type of project they are converting:
subgraph.yaml, schema.graphql, AssemblyScript mappings)?substreams init) or Rust source (manual conversion)?Convert the source schema into Substreams protobuf types (.proto files).
Translate the source handlers (AssemblyScript or Anchor/native Rust) into Substreams map and store modules.
Wire modules together in substreams.yaml, referencing initialBlock from the original data source definition.
Also load
substreams-devfor Cargo.toml setup, build commands,initialBlockguidance, and general Rust module development patterns. Also loadsubstreams-sinkorsubstreams-sqlwhen the target output is a SQL sink (db_out→ Postgres or ClickHouse). Also loadsubstreams-sink-deploywhen ready to run the converted substreams against a live sink (Postgres, ClickHouse, etc.).
substreams build
substreams run ./substreams.yaml <output_module> -s <start_block> -t +100 -o jsonl
| Concept | Subgraph / Traditional | Substreams |
|---|---|---|
| Language | AssemblyScript / JavaScript | Rust (compiled to WASM) |
| Schema | GraphQL SDL | Protobuf (internal) + SQL schema (persistence) |
| Handler trigger | Event / call template | Block-level map module |
| State persistence | Entity store (auto-managed) | SQL sink via db_out + Postgres / ClickHouse |
| Intermediate state | Entity store | Explicit store modules (dynamic contract tracking) |
| Output | GraphQL API | SQL database, Kafka, custom — any sink |
| Reorg handling | Automatic (graph-node) | Cursor-based, explicit |
| Backfill speed | Sequential | Parallel (up to 100×) |
npx claudepluginhub streamingfast/substreams-skills --plugin substreams-devProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.