Command Palette

Search for a command to run...

Back to skills
skill № 68097

blockchain-data-indexing

Blockchain indexing covering The Graph subgraphs, Dune Analytics, Goldsky pipelines, ChainIndex custom indexers, and ETL event-warehousing patterns for…

FreeNo executable scripts
j4flmaoby j4flmao★ 47 GitHub stars

Install blockchain-data-indexing in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Blockchain Data Indexing

Purpose

Guide the selection and implementation of blockchain data indexing solutions. Covers The Graph subgraphs, Dune Analytics queries, Goldsky pipelines, and custom indexer architecture for transforming raw on-chain data into queryable formats.

Agent Protocol

Trigger Keywords

"blockchain indexer", "subgraph", "The Graph", "Dune Analytics", "Dune", "Goldsky", "ChainIndex", "indexer architecture", "event indexing", "event handler", "call handler", "block handler", "data source template", "dynamic data source", "spellbook", "decoded table", "pipeline", "mirror", "ETL blockchain", "reorg handling", "chain reorg", "log polling", "event-driven indexing", "fromBlock", "toBlock", "healing"

Input Context

  • Blockchain and chain(s) to index
  • Data to extract (events, calls, state, traces)
  • Query patterns (analytical, real-time, historical)
  • Infrastructure preferences (managed service vs self-hosted)
  • Budget constraints (gas costs, infrastructure costs)
  • Reorg tolerance (confirmation depth)

Output Artifact

Indexing architecture recommendation with configuration, schema design, and production operational plan.

Response Format

  1. Recommendation: tool/protocol fitting the use case (The Graph, Dune, Goldsky, ChainIndex, hybrid)
  2. Architecture: indexing pipeline (source chain → data source → transformation → storage → query layer)
  3. Configuration snippet: YAML/SQL/AssemblyScript excerpt (subgraph.yaml, Dune query, Goldsky pipeline, event handler)
  4. Reorg & safety: how design handles reorgs, missing blocks, data consistency
  5. Alternatives/trade-offs: when another approach is better and why

Completion Criteria

  • Indexing tool selected with justification against alternatives
  • Event schema designed with all indexed fields for efficient filtering
  • Reorg handling modeled with confirmation depth and unwind logic
  • Query patterns optimized (time-range filters, pagination, aggregations)
  • Monitoring metrics defined (indexing lag, reorgs, error rate)

Max Response Length

4000 tokens

Decision Trees

Indexing Tool Selection

Indexing needs:
├── Standard EVM event/call/block indexing?
│   ├── YES → The Graph (subgraphs)
│   │   ├── Public subgraph → Use hosted service or decentralized network
│   │   └── Private subgraph → Self-hosted graph-node
│   └── NO → Evaluate alternatives
├── SQL-based data exploration?
│   ├── YES → Dune Analytics
│   │   ├── Pre-decoded contracts → Use spellbook / crypto_ tables
│   │   └── Custom contracts → Submit decoded contract request
│   └── NO → Consider other tools
├── Real-time + complex transformations?
│   ├── YES → Goldsky
│   │   ├── Simple pipelines → Goldsky Pipeline (YAML declarative)
│   │   └── Complex joins/aggregation → Goldsky Mirror (SQL)
│   └── NO → The Graph or Dune
├── Full control over schema and storage?
│   ├── YES → ChainIndex or custom indexer
│   │   ├── ChainIndex → Go-based custom indexer framework
│   │   └── Custom → Any stack (Rust, Python, Node) + any DB (Postgres, ClickHouse)
│   └── NO → Managed service (The Graph, Goldsky)
└── Multi-chain aggregation needed?
    ├── YES → Goldsky Mirror or custom (subgraphs per chain + aggregation layer)
    └── NO → Single-chain subgraph or Dune query

Indexing Strategy

Data freshness requirements:
├── Real-time (< 1 min latency) → Event-driven indexing, 1 confirmation
├── Near real-time (< 5 min) → Event-driven, 6 confirmations
├── Batch (hourly) → Block-based polling, full confirmation
└── Historical (one-time) → fromBlock scan with batch processing

Reorg handling:
├── 0-1 confirmation → Unwind + reindex on reorg (high risk)
├── 6 confirmations → Standard safe zone, minimal reorgs
├── 12+ confirmations → Very safe, rare reorgs (Ethereum)
└── Finality gadget → No reorg risk (Cosmos, Solana)

Data volume:
├── < 100 events/day → Subgraph or Dune query (free tier)
├── 100-10K events/day → Subgraph (hosted), Goldsky Pipeline
├── 10K-1M events/day → Goldsky Mirror, self-hosted graph-node
└── 1M+ events/day → Custom indexer (Rust/Python + ClickHouse)

Subgraph Architecture (The Graph)

subgraph.yaml

specVersion: 0.0.5
schema:
  file: ./schema.graphql
dataSources:
  - kind: ethereum
    name: UniswapV3Factory
    network: mainnet
    source:
      address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
      abi: Factory
      startBlock: 12369621  # Pin to deployment block
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.7
      language: wasm/assemblyscript
      entities:
        - Pool
        - Token
      abis:
        - name: Factory
          file: ./abis/Factory.json
      eventHandlers:
        - event: PoolCreated(indexed address,indexed address,indexed uint24,int24,address)
          handler: handlePoolCreated
      file: ./src/mapping.ts

Schema Design (schema.graphql)

type Pool @entity {
  id: ID!
  token0: Token!
  token1: Token!
  feeTier: BigInt!
  liquidi
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • references/blockchain-data-indexing-advanced.md
  • references/blockchain-data-indexing-fundamentals.md
  • references/blockchain-data-query.md
  • references/dune-analytics.md
  • references/event-processing.md
  • references/goldsky-chainindex.md
  • references/indexer-architecture.md
  • references/subgraph_mapping_handlers.md
  • references/the-graph-subgraph.md
  • references/the_graph_graphql_schemas.md

FAQ

What does the blockchain-data-indexing skill do?

Blockchain indexing covering The Graph subgraphs, Dune Analytics, Goldsky pipelines, ChainIndex custom indexers, and ETL event-warehousing patterns for blockchain data. Covers event-driven indexing, reorg handling, data source templates, and multi-chain data aggregation. Do NOT use for: web3 frontend data fetching (use blockchain-web3), smart contract development (use blockchain-application), or general ETL (out of scope).

How do I install the blockchain-data-indexing skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the blockchain-data-indexing skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare blockchain-data-indexing with