/voltaire-effect:voltaire-effect-streamingfrom voltaire-effect
This skill should be used when the user asks about "voltaire-effect streaming", "watchBlocks", "block streaming", "event streaming", "reorg detection", "BlockStream", "TransactionStream", "subscribe", "real-time blockchain", or needs to understand how voltaire-effect handles real-time blockchain data.
Ships in voltaire-effect. 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.
voltaire-effect provides streaming services for real-time blockchain monitoring with built-in reorg detection, typed errors, and Effect composition. Two primary streams are available: block streaming and event/transaction streaming.
Watch for new blocks in real time:
import { watchBlocks } from 'voltaire-effect'
const program = Effect.gen(function* () {
const unsubscribe = yield* watchBlocks((block) => {
console.log(`New block: ${block.number}`)
})
// Later: unsubscribe to stop watching
return unsubscribe
})
Query and stream contract events:
import { getLogs } from 'voltaire-effect'
// Historical query
const logs = yield* getLogs({
fromBlock: 18000000n,
toBlock: 'latest',
address: contractAddress,
topics: [transferEventTopic]
})
Five typed errors for streaming operations:
| Error | When | Properties |
|---|---|---|
StreamAbortedError | AbortSignal triggered | - |
EventStreamAbortedError | Event stream aborted | - |
BlockStreamAbortedError | Block stream aborted | - |
BlockRangeTooLargeError | RPC rejects range | fromBlock, toBlock |
UnrecoverableReorgError | Deep chain reorg | reorgDepth, trackedDepth |
const program = streamEvents(config).pipe(
Effect.catchTag('BlockRangeTooLargeError', (e) => {
// Retry with smaller range
const midBlock = (e.fromBlock + e.toBlock) / 2n
return Effect.all([
streamEvents({ ...config, toBlock: midBlock }),
streamEvents({ ...config, fromBlock: midBlock + 1n })
])
})
)
import { Match } from 'effect'
const handled = streamProgram.pipe(
Effect.catchAll(
Match.value.pipe(
Match.tag('BlockStreamAbortedError', () => reconnect()),
Match.tag('BlockRangeTooLargeError', () => reduceRange()),
Match.tag('UnrecoverableReorgError', () => resetFromSafeBlock()),
Match.exhaustive
)
)
)
The UnrecoverableReorgError fires when a chain reorganization exceeds the tracked history depth:
Normal operation:
Block 100 → 101 → 102 → 103 (sequential, no reorg)
Shallow reorg (handled automatically):
Block 100 → 101 → 102 → 101' → 102' → 103'
↑ reorgDepth = 2
Deep reorg (UnrecoverableReorgError):
Block 100 → 101 → ... → 110 → 95' → 96' → ...
↑ reorgDepth > trackedDepth
For lower-latency streaming, use WebSocket transport:
import { WebSocketTransport, Provider } from 'voltaire-effect'
const WsProvider = Provider.pipe(
Layer.provide(WebSocketTransport('wss://eth.llamarpc.com'))
)
// subscribe/unsubscribe for raw JSON-RPC subscriptions
const program = Effect.gen(function* () {
const subId = yield* subscribe('newHeads')
// ... handle subscription messages
yield* unsubscribe(subId)
})
Leverage Effect's concurrency primitives:
// Run multiple streams concurrently
const program = Effect.all({
blocks: watchBlocks(handleBlock),
events: streamEvents(eventConfig),
txs: streamTransactions(txConfig)
})
// With timeout
watchBlocks(handler).pipe(withTimeout("30 seconds"))
// With retry on disconnect
watchBlocks(handler).pipe(
withRetrySchedule(Schedule.exponential("1 second").pipe(
Schedule.jittered,
Schedule.compose(Schedule.recurs(10))
))
)
What SKILL.md sets; muted values are Claude Code's defaults
voltaire-effect@cyotee is listed by cyotee/cyotee-claude-plugins — review the source before installing
npx claudepluginhub cyotee/cyotee-claude-plugins --plugin voltaire-effect8 skills in this plugin
/voltaire-effect-architectureVoltaire Effect ArchitectureThis skill should be used when the user asks about "voltaire-effect architecture", "voltaire-effect overview", "how does voltaire-effect work", "what is voltaire-effect", "Effect.ts Ethereum library", "Voltaire Effect layers", "decode use provide pattern", "voltaire-effect vs viem", "voltaire-effect vs ethers", "voltaire-effect getting started", or needs a high-level understanding of how voltaire-effect integrates Voltaire Ethereum primitives with Effect.ts./voltaire-effect-contractsVoltaire Effect Contract InteractionsThis skill should be used when the user asks about "voltaire-effect contract", "Contract factory", "readContract", "writeContract", "simulateContract", "type-safe ABI", "ERC-20 Effect", "contract read write", "contract events", "voltaire-effect multicall", or needs to understand how voltaire-effect interacts with smart contracts./voltaire-effect-cryptoVoltaire Effect Crypto ServicesThis skill should be used when the user asks about "voltaire-effect crypto", "KeccakService", "Secp256k1", "BLS12-381", "AES-GCM", "HDWallet", "BIP-39", "CryptoLive", "CryptoTest", "keccak256 Effect", "ECDSA Effect", "voltaire hashing", "voltaire signing", or needs to understand the cryptographic services in voltaire-effect.Other plugins' skills for the same job