[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78WR7MHNF8K37E45XB0NGMX":3,"skill-same:01M78WR7MHNF8K37E45XB0NGMX":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M78WR7MHNF8K37E45XB0NGMX","alchemy-sdk-patterns",null,"Apply production-ready Alchemy SDK patterns for Web3 applications.\nUse when building reusable blockchain clients, implementing caching,\nmulti-chain abstractions, or type-safe contract interactions.\nTrigger: \"alchemy SDK patterns\", \"alchemy best practices\", \"alchemy code patterns\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--alchemy-pack--alchemy-sdk-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: alchemy-sdk-patterns\ndescription: |\n  Apply production-ready Alchemy SDK patterns for Web3 applications.\n  Use when building reusable blockchain clients, implementing caching,\n  multi-chain abstractions, or type-safe contract interactions.\n  Trigger: \"alchemy SDK patterns\", \"alchemy best practices\", \"alchemy code patterns\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, blockchain, web3, alchemy, patterns]\ncompatible-with: claude-code\n---\n\n# Alchemy SDK Patterns\n\n## Overview\n\nProduction patterns for the `alchemy-sdk` package: singleton clients, multi-chain factories, response caching, and type-safe contract wrappers.\n\n## Instructions\n\n### Step 1: Multi-Chain Client Factory\n\n```typescript\n\u002F\u002F src\u002Falchemy\u002Fclient-factory.ts\nimport { Alchemy, Network } from 'alchemy-sdk';\n\ntype ChainName = 'ethereum' | 'polygon' | 'arbitrum' | 'optimism' | 'base';\n\nconst NETWORK_MAP: Record\u003CChainName, Network> = {\n  ethereum: Network.ETH_MAINNET,\n  polygon: Network.MATIC_MAINNET,\n  arbitrum: Network.ARB_MAINNET,\n  optimism: Network.OPT_MAINNET,\n  base: Network.BASE_MAINNET,\n};\n\nclass AlchemyClientFactory {\n  private static clients = new Map\u003Cstring, Alchemy>();\n\n  static getClient(chain: ChainName): Alchemy {\n    if (!this.clients.has(chain)) {\n      this.clients.set(chain, new Alchemy({\n        apiKey: process.env.ALCHEMY_API_KEY,\n        network: NETWORK_MAP[chain],\n        maxRetries: 3,\n      }));\n    }\n    return this.clients.get(chain)!;\n  }\n\n  static getAllClients(): Map\u003CChainName, Alchemy> {\n    for (const chain of Object.keys(NETWORK_MAP) as ChainName[]) {\n      this.getClient(chain);\n    }\n    return this.clients as Map\u003CChainName, Alchemy>;\n  }\n}\n\nexport { AlchemyClientFactory, ChainName };\n```\n\n### Step 2: Response Caching Layer\n\n```typescript\n\u002F\u002F src\u002Falchemy\u002Fcache.ts\ninterface CacheEntry\u003CT> { data: T; expiresAt: number; }\n\nclass AlchemyCache {\n  private cache = new Map\u003Cstring, CacheEntry\u003Cany>>();\n  private defaultTtlMs: number;\n\n  constructor(defaultTtlMs: number = 30000) { \u002F\u002F 30s default\n    this.defaultTtlMs = defaultTtlMs;\n  }\n\n  async getOrFetch\u003CT>(key: string, fetcher: () => Promise\u003CT>, ttlMs?: number): Promise\u003CT> {\n    const cached = this.cache.get(key);\n    if (cached && cached.expiresAt > Date.now()) return cached.data;\n\n    const data = await fetcher();\n    this.cache.set(key, { data, expiresAt: Date.now() + (ttlMs || this.defaultTtlMs) });\n    return data;\n  }\n\n  invalidate(keyPrefix: string): void {\n    for (const key of this.cache.keys()) {\n      if (key.startsWith(keyPrefix)) this.cache.delete(key);\n    }\n  }\n}\n\n\u002F\u002F Usage with Alchemy\nconst cache = new AlchemyCache();\n\nasync function getCachedBalance(alchemy: Alchemy, address: string): Promise\u003Cstring> {\n  return cache.getOrFetch(\n    `balance:${address}`,\n    async () => {\n      const balance = await alchemy.core.getBalance(address);\n      return (parseInt(balance.toString()) \u002F 1e18).toFixed(6);\n    },\n    15000 \u002F\u002F 15s cache for balances\n  );\n}\n\nexport { AlchemyCache, getCachedBalance };\n```\n\n### Step 3: Typed NFT Query Builder\n\n```typescript\n\u002F\u002F src\u002Falchemy\u002Fnft-query.ts\nimport { Alchemy, NftOrdering } from 'alchemy-sdk';\n\nclass NftQueryBuilder {\n  private alchemy: Alchemy;\n  private _owner?: string;\n  private _contracts: string[] = [];\n  private _pageSize = 20;\n  private _excludeFilters: string[] = [];\n\n  constructor(alchemy: Alchemy) { this.alchemy = alchemy; }\n\n  forOwner(address: string): this { this._owner = address; return this; }\n  inCollection(contractAddress: string): this { this._contracts.push(contractAddress); return this; }\n  pageSize(size: number): this { this._pageSize = size; return this; }\n  excludeSpam(): this { this._excludeFilters.push('SPAM'); return this; }\n\n  async execute() {\n    if (!this._owner) throw new Error('Owner address required');\n\n    return this.alchemy.nft.getNftsForOwner(this._owner, {\n      contractAddresses: this._contracts.length > 0 ? this._contracts : undefined,\n      pageSize: this._pageSize,\n      excludeFilters: this._excludeFilters as any[],\n    });\n  }\n}\n\n\u002F\u002F Usage:\n\u002F\u002F const nfts = await new NftQueryBuilder(alchemy)\n\u002F\u002F   .forOwner('vitalik.eth')\n\u002F\u002F   .excludeSpam()\n\u002F\u002F   .pageSize(50)\n\u002F\u002F   .execute();\n```\n\n### Step 4: Error Classification\n\n```typescript\n\u002F\u002F src\u002Falchemy\u002Ferrors.ts\ntype AlchemyErrorType = 'rate_limit' | 'auth' | 'network' | 'invalid_params' | 'server' | 'unknown';\n\nfunction classifyError(error: any): { type: AlchemyErrorType; retryable: boolean; message: string } {\n  const status = error.response?.status || error.code;\n\n  if (status === 429) return { type: 'rate_limit', retryable: true, message: 'Rate limit exceeded' };\n  if (status === 401 || status === 403) return { type: 'auth', retryable: false, message: 'Invalid API key' };\n  if (status >= 500) return { type: 'server', retryable: true, message: 'Alchemy server error' };\n  if (error.code === 'ECONNREFUSED' || error.code === 'ETIMEDOUT') return { type: 'network', retryable: true, message: 'Network error' };\n  if (error.message?.includes('invalid params')) return { type: 'invalid_params', retryable: false, message: error.message };\n  return { type: 'unknown', retryable: false, message: error.message };\n}\n\nexport { classifyError, AlchemyErrorType };\n```\n\n## Output\n\n- Multi-chain client factory with lazy initialization\n- Response cache with configurable TTL\n- Type-safe NFT query builder pattern\n- Structured error classification for retry decisions\n\n## Resources\n\n- [Alchemy SDK GitHub](https:\u002F\u002Fgithub.com\u002Falchemyplatform\u002Falchemy-sdk-js)\n- [Alchemy Docs](https:\u002F\u002Fwww.alchemy.com\u002Fdocs)\n\n## Next Steps\n\nApply patterns in `alchemy-core-workflow-a` for real portfolio tracking.\n","# Alchemy SDK Patterns\n\n## Overview\n\nProduction patterns for the `alchemy-sdk` package: singleton clients, multi-chain factories, response caching, and type-safe contract wrappers.\n\n## Instructions\n\n### Step 1: Multi-Chain Client Factory\n\n```typescript\n\u002F\u002F src\u002Falchemy\u002Fclient-factory.ts\nimport { Alchemy, Network } from 'alchemy-sdk';\n\ntype ChainName = 'ethereum' | 'polygon' | 'arbitrum' | 'optimism' | 'base';\n\nconst NETWORK_MAP: Record\u003CChainName, Network> = {\n  ethereum: Network.ETH_MAINNET,\n  polygon: Network.MATIC_MAINNET,\n  arbitrum: Network.ARB_MAINNET,\n  optimism: Network.OPT_MAINNET,\n  base: Network.BASE_MAINNET,\n};\n\nclass AlchemyClientFactory {\n  private static clients = new Map\u003Cstring, Alchemy>();\n\n  static getClient(chain: ChainName): Alchemy {\n    if (!this.clients.has(chain)) {\n      this.clients.set(chain, new Alchemy({\n        apiKey: process.env.ALCHEMY_API_KEY,\n        network: NETWORK_MAP[chain],\n        maxRetries: 3,\n      }));\n    }\n    return this.clients.get(chain)!;\n  }\n\n  static getAllClients(): Map\u003CChainName, Alchemy> {\n    for (const chain of Object.keys(NETWORK_MAP) as ChainName[]) {\n      this.getClient(chain);\n    }\n    return this.clients as Map\u003CChainName, Alchemy>;\n  }\n}\n\nexport { AlchemyClientFactory, ChainName };\n```\n\n### Step 2: Response Caching Layer\n\n```typescript\n\u002F\u002F src\u002Falchemy\u002Fcache.ts\ninterface CacheEntry\u003CT> { data: T; expiresAt: number; }\n\nclass AlchemyCache {\n  private cache = new Map\u003Cstring, CacheEntry\u003Cany>>();\n  private defaultTtlMs: number;\n\n  constructor(defaultTtlMs: number = 30000) { \u002F\u002F 30s default\n    this.defaultTtlMs = defaultTtlMs;\n  }\n\n  async getOrFetch\u003CT>(key: string, fetcher: () => Promise\u003CT>, ttlMs?: number): Promise\u003CT> {\n    const cached = this.cache.get(key);\n    if (cached && cached.expiresAt > Date.now()) return cached.data;\n\n    const data = await fetcher();\n    this.cache.set(key, { data, expiresAt: Date.now() + (ttlMs || this.defaultTtlMs) });\n    return data;\n  }\n\n  invalidate(keyPrefix: string): void {\n    for (const key of this.cache.keys()) {\n      if (key.startsWith(keyPrefix)) this.cache.delete(key);\n    }\n  }\n}\n\n\u002F\u002F Usage with Alchemy\nconst cache = new AlchemyCache();\n\nasync function getCachedBalance(alchemy: Alchemy, address: string): Promise\u003Cstring> {\n  return cache.getOrFetch(\n    `balance:${address}`,\n    async () => {\n      const balance = await alchemy.core.getBalance(address);\n      return (parseInt(balance.toString()) \u002F 1e18).toFixed(6);\n    },\n    15000 \u002F\u002F 15s cache for balances\n  );\n}\n\nexport { AlchemyCache, getCachedBalance };\n```\n\n### Step 3: Typed NFT Query Builder\n\n```typescript\n\u002F\u002F src\u002Falchemy\u002Fnft-query.ts\nimport { Alchemy, NftOrdering } from 'alchemy-sdk';\n\nclass NftQueryBuilder {\n  private alchemy: Alchemy;\n  private _owner?: string;\n  private _contracts: string[] = [];\n  private _pageSize = 20;\n  private _excludeFilters: string[] = [];\n\n  constructor(alchemy: Alchemy) { this.alchemy = alchemy; }\n\n  forOwner(address: string): this { this._owner = address; return this; }\n  inCollection(contractAddress: string): this { this._contracts.push(contractAddress); return this; }\n  pageSize(size: number): this { this._pageSize = size; return this; }\n  excludeSpam(): this { this._excludeFilters.push('SPAM'); return this; }\n\n  async execute() {\n    if (!this._owner) throw new Error('Owner address required');\n\n    return this.alchemy.nft.getNftsForOwner(this._owner, {\n      contractAddresses: this._contracts.length > 0 ? this._contracts : undefined,\n      pageSize: this._pageSize,\n      excludeFilters: this._excludeFilters as any[],\n    });\n  }\n}\n\n\u002F\u002F Usage:\n\u002F\u002F const nfts = await new NftQueryBuilder(alchemy)\n\u002F\u002F   .forOwner('vitalik.eth')\n\u002F\u002F   .excludeSpam()\n\u002F\u002F   .pageSize(50)\n\u002F\u002F   .execute();\n```\n\n### Step 4: Error Classification\n\n```typescript\n\u002F\u002F src\u002Falchemy\u002Ferrors.ts\ntype AlchemyErrorType = 'rate_limit' | 'auth' | 'network' | 'invalid_params' | 'server' | 'unknown';\n\nfunction classifyError(error: any): { type: AlchemyErrorType; retryable: boolean; message: string } {\n  const status = error.response?.status || error.code;\n\n  if (status === 429) return { type: 'rate_limit', retryable: true, message: 'Rate limit exceeded' };\n  if (status === 401 || status === 403) return { type: 'auth', retryable: false, message: 'Invalid API key' };\n  if (status >= 500) return { type: 'server', retryable: true, message: 'Alchemy server error' };\n  if (error.code === 'ECONNREFUSED' || error.code === 'ETIMEDOUT') return { type: 'network', retryable: true, message: 'Network error' };\n  if (error.message?.includes('invalid params')) return { type: 'invalid_params', retryable: false, message: error.message };\n  return { type: 'unknown', retryable: false, message: error.message };\n}\n\nexport { classifyError, AlchemyErrorType };\n```\n\n## Output\n\n- Multi-chain client factory with lazy initialization\n- Response cache with configurable TTL\n- Type-safe NFT query builder pattern\n- Structured error classification for retry decisions\n\n## Resources\n\n- [Alchemy SDK GitHub](https:\u002F\u002Fgithub.com\u002Falchemyplatform\u002Falchemy-sdk-js)\n- [Alchemy Docs](https:\u002F\u002Fwww.alchemy.com\u002Fdocs)\n\n## Next Steps\n\nApply patterns in `alchemy-core-workflow-a` for real portfolio tracking.\n",{"name":5,"tags":24,"author":30,"license":15,"version":31,"description":32,"allowed-tools":33,"compatible-with":34},[25,26,27,28,29],"saas","blockchain","web3","alchemy","patterns","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Apply production-ready Alchemy SDK patterns for Web3 applications.\nUse when building reusable blockchain clients, implementing caching,\nmulti-chain abstractions, or type-safe contract interactions.\nTrigger: \"alchemy SDK patterns\", \"alchemy best practices\", \"alchemy code patterns\".\n","Read, Write, Edit","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--alchemy-pack--alchemy-sdk-patterns",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill alchemy-sdk-patterns",{"tool":50,"command":51},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill alchemy-sdk-patterns",{"tool":53,"command":54},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill alchemy-sdk-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--alchemy-pack--alchemy-sdk-patterns\u002FSKILL.md",true,[],[59,66,73,80,87,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]