Skip to content
blockchain-integration-builder logo

Blockchain Integration Builder

blockchain-integration-builder

Design and implement blockchain integrations across chains and frameworks with emphasis on patterns over specific technologies. Use when building Web3 applications, smart contract systems, token mechanics, decentralized identity, or blockchain-verified data. Triggers on blockchain architecture, s...

SKILL.md

Full skill instructions

Blockchain Integration Builder

Design blockchain systems using universal patterns applicable across chains.

Core Abstractions

Blockchain-agnostic thinking: focus on what you're trying to achieve, then select chain/​framework.

Fundamental Primitives

PrimitiveWhat It IsChain Examples
AccountIdentity with balanceEOA (Eth), Wallet (Solana), Account (Near)
TransactionState change requestSigned message + gas
BlockBatch of transactionsTime-ordered, immutable
ContractOn-chain programSolidity, Rust, Move
Event/​LogIndexed side-effectEmitted by contracts, queryable
StatePersistent dataMappings, storage slots

Selection Criteria

NeedConsiderWhy
ProgrammabilityEthereum, Arbitrum, BaseMature tooling, EVM ecosystem
Speed/​CostSolana, Sui, AptosHigh throughput, low fees
PrivacyAztec, ZcashZero-knowledge proofs
InteroperabilityCosmos, PolkadotCross-chain communication
SimplicityBitcoin, LitecoinLimited scripting, proven security

Pattern Library

Identity Patterns

Wallet-Based Identity

User → Wallet → Sign Message → Verify Signature → Authenticated
  • No passwords stored
  • User controls identity
  • Works across applications

Soul-Bound Tokens (SBTs)

Issuer → Mint SBT → User Wallet (non-transferable)
  • Credentials, achievements, reputation
  • Cannot be sold or transferred
  • Revocable by issuer (optionally)

Decentralized Identifiers (DIDs)

did:method:identifier → Resolve → DID Document → Public Keys, Services
  • Self-sovereign identity
  • Cross-chain portable
  • W3C standard

Token Patterns

Fungible Tokens (ERC-20 pattern)

// Universal interface
balanceOf(address) → uint256
transfer(to, amount) → bool
approve(spender, amount) → bool
transferFrom(from, to, amount) → bool

Non-Fungible Tokens (ERC-721 pattern)

// Universal interface
ownerOf(tokenId) → address
transferFrom(from, to, tokenId)
tokenURI(tokenId) → string (metadata)

Semi-Fungible (ERC-1155 pattern)

// Batch operations, mixed fungible/​non-fungible
balanceOf(account, id) → uint256
balanceOfBatch(accounts[], ids[]) → uint256[]
safeTransferFrom(from, to, id, amount, data)

Governance Patterns

Token Voting

Proposal → Snapshot Balances → Vote Period → Tally → Execute (if passed)

Quadratic Voting

Cost of N votes = N² tokens
Reduces plutocratic dominance

Optimistic Governance

Proposal → Challenge Period → Execute if unchallenged

Economic Patterns

Bonding Curves

Price = f(Supply)
Buy: Price increases with supply
Sell: Price decreases with supply
Creates automatic market making

Staking/​Slashing

Stake tokens → Perform duties → Earn rewards
Misbehave → Lose stake (slashing)

Streaming Payments

Deposit → Linear unlock over time → Recipient claims

Architecture Patterns

On-Chain vs Off-Chain

AspectOn-ChainOff-Chain
CostHigh (gas fees)Low/​free
SpeedSlow (block time)Fast
TrustTrustlessRequires trust
PrivacyPublicCan be private
StorageExpensiveCheap

Hybrid approach:

Off-chain: Computation, storage, user experience
On-chain: Verification, settlement, ownership
Bridge: Oracles, merkle proofs, signatures

Indexing Pattern

Blockchain data is hard to query directly. Use indexers:

Blockchain → Events → Indexer → Database → API → Frontend

Tools: The Graph, Goldsky, custom indexers

Oracle Pattern

Bring external data on-chain:

External Data → Oracle Network → Consensus → On-chain Value

Use cases: Price feeds, random numbers, API data

Security Principles

Smart Contract Security

  1. Check-Effects-Interactions: Update state before external calls
  2. Reentrancy Guards: Prevent recursive calls
  3. Access Control: Verify caller permissions
  4. Input Validation: Never trust user input
  5. Upgrade Patterns: Plan for bug fixes (proxies, migrations)

Common Vulnerabilities

VulnerabilityDescriptionPrevention
ReentrancyRecursive calls drain fundsChecks-effects-interactions
Integer overflowMath wraps aroundSafeMath or Solidity 0.8+
Front-runningMiners/​validators see pending txsCommit-reveal, flashbots
Oracle manipulationFake price dataMultiple oracles, TWAP
Access controlMissing permission checksRole-based access

Integration Workflow

1. Define Requirements

  • What needs to be trustless?
  • What can stay off-chain?
  • Who are the actors?
  • What are the assets?

2. Select Chain

Based on: throughput needs, cost constraints, ecosystem fit, team expertise

3. Design Contracts

  • Keep contracts simple and focused
  • Separate concerns into multiple contracts
  • Plan upgrade path

4. Build Indexing

  • Determine query patterns
  • Index relevant events
  • Build API layer

5. Create Frontend

  • Wallet connection
  • Transaction signing
  • State display
  • Error handling

6. Test & Audit

  • Unit tests
  • Integration tests
  • Formal verification (for critical contracts)
  • Third-party audit

References

  • references/​contract-patterns.md - Common smart contract patterns
  • references/​chain-comparison.md - Chain-specific considerations

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View