/substreams-evm:substreams-packfrom substreams-evm
Builds, packs, and distributes Substreams packages (.spkg) in a substreams-evm monorepo. Guides through protobuf regeneration, Rust crate compilation, and bottom-up packing of leaf and DB crates.
Ships in substreams-evm. 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.
None: SKILL.md is the whole skill.
Instructions for building, packing, and copying .spkg files in this monorepo.
The ./spkg/ directory is the central distribution point for all Substreams packages. Downstream modules import their dependencies from ../spkg/*.spkg, so packages must be copied there after packing.
Packages must be built bottom-up — a package's .spkg dependencies must exist in ./spkg/ before it can be packed.
Level 0 — Leaf crates (event extraction, no in-repo .spkg dependencies):
├── erc20/ → erc20-v*.spkg
├── erc1155/ → erc1155-v*.spkg
├── native/ → native-v*.spkg
├── blocks/ → blocks-v*.spkg
├── dex/ → dex-v*.spkg
└── dex-nfts/ → dex-nfts-v*.spkg
Level 1 — DB crates (imports Level 0 .spkg files, outputs DatabaseChanges):
├── evm-transfers/ → evm-transfers-v*.spkg
├── evm-balances/ → evm-balances-v*.spkg
├── evm-contracts/ → evm-contracts-v*.spkg
├── evm-dex/ → evm-dex-v*.spkg
├── evm-nfts/ → evm-nfts-v*.spkg
└── evm-supply/ → evm-supply-v*.spkg
Note: There are no separate ClickHouse/PostgreSQL directories. Sink configuration (SQL schemas, engine selection) is defined in the
substreams.yamlwithin each DB crate.
cd proto && make protogen
This runs substreams protogen --exclude-paths sf/substreams,google to regenerate proto/src/pb/*.rs from proto/v1/*.proto.
cargo build --target wasm32-unknown-unknown --release
Or build specific crates:
cargo build --target wasm32-unknown-unknown --release \
-p erc20 \
-p db-evm-transfers \
-p db-evm-balances
cd erc20 && substreams pack && cp erc20-v*.spkg ../spkg/
cd erc1155 && substreams pack && cp erc1155-v*.spkg ../spkg/
cd native && substreams pack && cp native-v*.spkg ../spkg/
cd blocks && substreams pack && cp blocks-v*.spkg ../spkg/
cd dex && substreams pack && cp dex-v*.spkg ../spkg/
These import Level 0 .spkg files from ../spkg/, so Level 0 must be packed first.
cd evm-transfers && substreams pack && cp evm-transfers-v*.spkg ../spkg/
cd evm-balances && substreams pack && cp evm-balances-v*.spkg ../spkg/
cd evm-contracts && substreams pack && cp evm-contracts-v*.spkg ../spkg/
cd evm-dex && substreams pack && cp evm-dex-v*.spkg ../spkg/
cd evm-nfts && substreams pack && cp evm-nfts-v*.spkg ../spkg/
cd evm-supply && substreams pack && cp evm-supply-v*.spkg ../spkg/
| Directory | Package Name | .spkg Filename |
|---|---|---|
erc20/ | erc20 | erc20-v*.spkg |
erc1155/ | erc1155 | erc1155-v*.spkg |
native/ | native | native-v*.spkg |
blocks/ | blocks | blocks-v*.spkg |
dex/ | dex | dex-v*.spkg |
dex-nfts/ | dex_nfts | dex-nfts-v*.spkg |
evm-transfers/ | evm_transfers | evm-transfers-v*.spkg |
evm-balances/ | evm_balances | evm-balances-v*.spkg |
evm-contracts/ | evm_contracts | evm-contracts-v*.spkg |
evm-dex/ | evm_dex | evm-dex-v*.spkg |
evm-nfts/ | evm_nfts | evm-nfts-v*.spkg |
evm-supply/ | evm_supply | evm-supply-v*.spkg |
Rebuild everything from proto down:
cd proto && make protogen
cargo build --target wasm32-unknown-unknown --release
# Then pack Level 0 → copy → Level 1 → copy → Level 2 → copy
cargo build --target wasm32-unknown-unknown --release -p erc20 -p db-evm-transfers -p db-evm-balances
cd erc20 && substreams pack && cp erc20-v*.spkg ../spkg/
cd evm-transfers && substreams pack && cp evm-transfers-v*.spkg ../spkg/
cd evm-balances && substreams pack && cp evm-balances-v*.spkg ../spkg/
cargo build --target wasm32-unknown-unknown --release -p db-evm-transfers
cd evm-transfers && substreams pack && cp evm-transfers-v*.spkg ../spkg/
Versions are defined in each substreams.yaml under package.version. When bumping:
substreams.yaml of the changed packagesubstreams.yaml that references itWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub pinax-network/substreams-evm --plugin substreams-evm6 skills in this plugin
/release-conventionsNaming conventions for tags, releases, and SPKGs in the substreams-evm monorepo. Use when creating releases, tagging versions, or publishing packages./substreams-devExpert knowledge for developing, building, and debugging Substreams projects on any blockchain. Use when working with substreams.yaml manifests, Rust modules, protobuf schemas, or blockchain data processing./substreams-sinkExpert knowledge for consuming Substreams data in applications. Use when building sinks, real-time data pipelines, or integrating Substreams outputs into Go, JavaScript, Python, or Rust applications./substreams-sqlExpert knowledge for building SQL database sinks from Substreams. Covers database changes (CDC), relational mappings, PostgreSQL, ClickHouse, and materialized views./substreams-testingExpert knowledge for testing Substreams applications. Covers unit testing, integration testing, performance testing, and FireCode tools usage.