alchemy-sdk-patterns

Featured

Apply production-ready Alchemy SDK patterns for Web3 applications. Use when building reusable blockchain clients, implementing caching, multi-chain abstractions, or type-safe contract interactions. Trigger: "alchemy SDK patterns", "alchemy best practices", "alchemy code patterns".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Alchemy SDK Patterns ## Overview Production patterns for the `alchemy-sdk` package: singleton clients, multi-chain factories, response caching, and type-safe contract wrappers. ## Instructions ### Step 1: Multi-Chain Client Factory ```typescript // src/alchemy/client-factory.ts import { Alchemy, Network } from 'alchemy-sdk'; type ChainName = 'ethereum' | 'polygon' | 'arbitrum' | 'optimism' | 'base'; const NETWORK_MAP: Record<ChainName, Network> = { ethereum: Network.ETH_MAINNET, polygon: Network.MATIC_MAINNET, arbitrum: Network.ARB_MAINNET, optimism: Network.OPT_MAINNET, base: Network.BASE_MAINNET, }; class AlchemyClientFactory { private static clients = new Map<string, Alchemy>(); static getClient(chain: ChainName): Alchemy { if (!this.clients.has(chain)) { this.clients.set(chain, new Alchemy({ apiKey: process.env.ALCHEMY_API_KEY, network: NETWORK_MAP[chain], maxRetries: 3, })); } return this.clients.get(chain)!; } static getAllClients(): Map<ChainName, Alchemy> { for (const chain of Object.keys(NETWORK_MAP) as ChainName[]) { this.getClient(chain); } return this.clients as Map<ChainName, Alchemy>; } } export { AlchemyClientFactory, ChainName }; ``` ### Step 2: Response Caching Layer ```typescript // src/alchemy/cache.ts interface CacheEntry<T> { data: T; expiresAt: number; } class AlchemyCache { private cache = new Map<string, CacheEntry<any>>(); private defaultTtlMs: nu...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

alchemy-performance-tuning

Optimize Alchemy SDK performance with caching, batching, and multi-chain parallelism. Use when reducing latency for blockchain queries, optimizing CU consumption, or scaling dApps for high request volumes. Trigger: "alchemy performance", "alchemy slow", "alchemy optimization", "alchemy caching", "alchemy batch requests".

2,266 Updated today
jeremylongshore
AI & Automation Featured

alchemy-reference-architecture

Implement reference architecture for Alchemy-powered Web3 applications. Use when designing dApp infrastructure, planning multi-chain deployments, or structuring a production blockchain application. Trigger: "alchemy architecture", "dApp architecture", "alchemy project structure", "web3 system design", "alchemy multi-chain design".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anima-sdk-patterns

Apply production-ready patterns for the Anima SDK design-to-code pipeline. Use when building reusable Anima client wrappers, implementing output caching, or establishing team standards for design-to-code automation. Trigger: "anima SDK patterns", "anima best practices", "anima code patterns".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-sdk-patterns

Apply production-ready LangChain SDK patterns for structured output, fallbacks, batch processing, streaming, and caching. Trigger: "langchain SDK patterns", "langchain best practices", "idiomatic langchain", "langchain architecture", "withStructuredOutput", "withFallbacks", "abatch".

2,266 Updated today
jeremylongshore
AI & Automation Featured

alchemy-hello-world

Create a minimal Alchemy Web3 example: get ETH balance, fetch NFTs, read token balances. Use when starting blockchain development, testing Alchemy setup, or learning basic blockchain query patterns. Trigger: "alchemy hello world", "alchemy example", "alchemy quick start", "get ETH balance", "fetch NFTs alchemy".

2,266 Updated today
jeremylongshore