onchain-patterns

Community

Index on-chain events, handle reorgs safely.

Authorprapanch
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you avoid inconsistent or broken Web3 indexing and dApp state by teaching reliable on-chain data architecture that survives immutability and chain reorganizations.

Core Features & Use Cases

  • Events-first indexing: treat emitted events as the canonical source of truth for deriving state and building reliable indexers.
  • Reorg-aware design: implement confirmation thresholds, track block hashes, and design idempotent handlers to prevent corrupted off-chain data.
  • Subgraph/indexer architecture: choose between The Graph, custom indexers, direct RPC reads, or third-party APIs with clear trade-offs and operational constraints.
  • On-chain/off-chain bridging discipline: store CIDs on-chain correctly, pin content, and use secure off-chain signature patterns (e.g., EIP-712 with domain, nonce, expiry, and explicit action types).
  • Composability and contract integration readiness: design contract interfaces and behaviors that work cleanly with other contracts and external callers.

Quick Start

Use the onchain-patterns skill to plan an event-driven indexer that derives state from logs while implementing a confirmation window and reorg rollback handling for your target chain.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: onchain-patterns
Download link: https://github.com/prapanch/agent-coda/archive/main.zip#onchain-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.