[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F6G4WE2AZ43D8F59QP6F6R":3,"skill-same:01M6F6G4WE2AZ43D8F59QP6F6R":74},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6F6G4WE2AZ43D8F59QP6F6R","adobe-performance-tuning",null,"Optimize Adobe API performance with token caching, async job batching,\nconnection pooling, and response caching for Firefly, PDF Services,\nand Photoshop API workflows.\nTrigger with phrases like \"adobe performance\", \"optimize adobe\",\n\"adobe latency\", \"adobe caching\", \"adobe slow\", \"adobe batch\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fadobe-performance-tuning\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"adobe performance tuning","performance","adobe","performance tuning","tuning","write","io","connection pooling","token","caching","optimize","edit","PDF","read","api workflows","api","batch","code","workflows","design","2026-11-10 10:12:30",false,"---\nname: adobe-performance-tuning\ndescription: |\n  Optimize Adobe API performance with token caching, async job batching,\n  connection pooling, and response caching for Firefly, PDF Services,\n  and Photoshop API workflows.\n  Trigger with phrases like \"adobe performance\", \"optimize adobe\",\n  \"adobe latency\", \"adobe caching\", \"adobe slow\", \"adobe batch\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, design, adobe]\ncompatible-with: claude-code\n---\n\n# Adobe Performance Tuning\n\n## Overview\n\nOptimize Adobe API performance across Firefly Services, PDF Services, and Photoshop APIs. Key bottlenecks include IMS token generation, async job polling overhead, and cold-start latency on serverless platforms.\n\n## Prerequisites\n\n- Adobe SDK installed and functional\n- Understanding of which APIs your app uses most\n- Redis or in-memory cache available (optional)\n- Performance monitoring in place\n\n## Latency Benchmarks (Real-World)\n\n| Operation | P50 | P95 | P99 |\n|-----------|-----|-----|-----|\n| IMS Token Generation | 200ms | 500ms | 1s |\n| Firefly Text-to-Image (sync) | 5s | 12s | 20s |\n| Firefly Text-to-Image (async poll) | 8s | 15s | 25s |\n| PDF Extract (10-page doc) | 3s | 8s | 15s |\n| PDF Create from HTML | 2s | 5s | 10s |\n| Photoshop Remove Background | 4s | 10s | 18s |\n| Lightroom Auto Tone | 3s | 8s | 15s |\n\n## Instructions\n\n### Optimization 1: Cache IMS Access Tokens (Biggest Win)\n\nThe IMS token endpoint returns tokens valid for 24 hours. Never re-generate per request:\n\n```typescript\n\u002F\u002F WRONG: generates new token every call (adds 200-500ms each time)\nasync function makeRequest() {\n  const token = await getAccessToken(); \u002F\u002F hits IMS every time\n}\n\n\u002F\u002F RIGHT: cache token and only refresh when expiring\nlet tokenCache: { token: string; expiresAt: number } | null = null;\n\nasync function getCachedToken(): Promise\u003Cstring> {\n  if (tokenCache && tokenCache.expiresAt > Date.now() + 300_000) {\n    return tokenCache.token; \u002F\u002F Cache hit — 0ms\n  }\n  const res = await fetch('https:\u002F\u002Fims-na1.adobelogin.com\u002Fims\u002Ftoken\u002Fv3', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fx-www-form-urlencoded' },\n    body: new URLSearchParams({\n      client_id: process.env.ADOBE_CLIENT_ID!,\n      client_secret: process.env.ADOBE_CLIENT_SECRET!,\n      grant_type: 'client_credentials',\n      scope: process.env.ADOBE_SCOPES!,\n    }),\n  });\n  const data = await res.json();\n  tokenCache = { token: data.access_token, expiresAt: Date.now() + data.expires_in * 1000 };\n  return tokenCache.token;\n}\n```\n\n### Optimization 2: Parallel Async Job Submission\n\nFirefly and Photoshop APIs are async — submit all jobs first, then poll all:\n\n```typescript\n\u002F\u002F SLOW: sequential (total = sum of all job times)\nfor (const prompt of prompts) {\n  const result = await generateImageSync(prompt); \u002F\u002F 5-20s each\n}\n\n\u002F\u002F FAST: parallel submit + parallel poll (total = max job time)\nasync function batchFireflyGenerate(prompts: string[]) {\n  const token = await getCachedToken();\n\n  \u002F\u002F 1. Submit all jobs simultaneously\n  const jobSubmissions = await Promise.all(\n    prompts.map(prompt =>\n      fetch('https:\u002F\u002Ffirefly-api.adobe.io\u002Fv3\u002Fimages\u002Fgenerate-async', {\n        method: 'POST',\n        headers: {\n          'Authorization': `Bearer ${token}`,\n          'x-api-key': process.env.ADOBE_CLIENT_ID!,\n          'Content-Type': 'application\u002Fjson',\n        },\n        body: JSON.stringify({ prompt, n: 1, size: { width: 1024, height: 1024 } }),\n      }).then(r => r.json())\n    )\n  );\n\n  \u002F\u002F 2. Poll all jobs in parallel\n  const results = await Promise.all(\n    jobSubmissions.map(job => pollUntilDone(job.statusUrl, token))\n  );\n\n  return results;\n}\n```\n\n### Optimization 3: Response Caching for Repeated Operations\n\n```typescript\nimport { LRUCache } from 'lru-cache';\n\n\u002F\u002F Cache PDF extraction results (same PDF = same output)\nconst extractionCache = new LRUCache\u003Cstring, any>({\n  max: 100,\n  ttl: 3600_000, \u002F\u002F 1 hour\n});\n\nasync function cachedPdfExtract(pdfHash: string, pdfPath: string) {\n  const cached = extractionCache.get(pdfHash);\n  if (cached) {\n    console.log('PDF extraction cache hit');\n    return cached;\n  }\n\n  const result = await extractPdfContent(pdfPath);\n  extractionCache.set(pdfHash, result);\n  return result;\n}\n```\n\n### Optimization 4: Connection Keep-Alive\n\n```typescript\nimport { Agent } from 'https';\n\n\u002F\u002F Reuse TCP connections to Adobe endpoints\nconst adobeAgent = new Agent({\n  keepAlive: true,\n  maxSockets: 10,\n  maxFreeSockets: 5,\n  timeout: 60_000,\n});\n\n\u002F\u002F Use with node-fetch or undici\nconst response = await fetch(url, {\n  \u002F\u002F @ts-ignore — agent option supported by node-fetch\n  agent: adobeAgent,\n  headers: { ... },\n});\n```\n\n### Optimization 5: Smart Polling Intervals\n\n```typescript\n\u002F\u002F Adaptive polling: start fast, slow down over time\nasync function adaptivePoll(statusUrl: string, token: string) {\n  const intervals = [1000, 2000, 3000, 5000, 5000, 10000]; \u002F\u002F ms\n  let attempt = 0;\n\n  while (true) {\n    const res = await fetch(statusUrl, {\n      headers: {\n        'Authorization': `Bearer ${token}`,\n        'x-api-key': process.env.ADOBE_CLIENT_ID!,\n      },\n    });\n    const status = await res.json();\n\n    if (status.status === 'succeeded') return status;\n    if (status.status === 'failed') throw new Error(status.error?.message);\n\n    const delay = intervals[Math.min(attempt, intervals.length - 1)];\n    await new Promise(r => setTimeout(r, delay));\n    attempt++;\n  }\n}\n```\n\n## Output\n\n- IMS token cached for 24h (eliminates 200-500ms per request)\n- Parallel job submission for batch operations\n- LRU response caching for repeated extractions\n- Connection keep-alive reducing TLS handshake overhead\n- Adaptive polling reducing unnecessary API calls\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Stale cached token | Token revoked mid-lifecycle | Catch 401, clear cache, retry once |\n| Parallel rate limiting | Too many concurrent jobs | Add p-queue concurrency limit |\n| Cache memory pressure | Too many cached results | Set LRU max size |\n| Connection pool exhaustion | Too many parallel requests | Limit maxSockets to 10-20 |\n\n## Resources\n\n- [Firefly Async API Guide](https:\u002F\u002Fdeveloper.adobe.com\u002Ffirefly-services\u002Fdocs\u002Ffirefly-api\u002Fguides\u002Fhow-tos\u002Fusing-async-apis)\n- [PDF Services Quickstart](https:\u002F\u002Fdeveloper.adobe.com\u002Fdocument-services\u002Fdocs\u002Foverview\u002Fpdf-services-api\u002Fquickstarts\u002Fnodejs\u002F)\n- [LRU Cache npm](https:\u002F\u002Fgithub.com\u002Fisaacs\u002Fnode-lru-cache)\n\n## Next Steps\n\nFor cost optimization, see `adobe-cost-tuning`.\n\n","# Adobe Performance Tuning\n\n## Overview\n\nOptimize Adobe API performance across Firefly Services, PDF Services, and Photoshop APIs. Key bottlenecks include IMS token generation, async job polling overhead, and cold-start latency on serverless platforms.\n\n## Prerequisites\n\n- Adobe SDK installed and functional\n- Understanding of which APIs your app uses most\n- Redis or in-memory cache available (optional)\n- Performance monitoring in place\n\n## Latency Benchmarks (Real-World)\n\n| Operation | P50 | P95 | P99 |\n|-----------|-----|-----|-----|\n| IMS Token Generation | 200ms | 500ms | 1s |\n| Firefly Text-to-Image (sync) | 5s | 12s | 20s |\n| Firefly Text-to-Image (async poll) | 8s | 15s | 25s |\n| PDF Extract (10-page doc) | 3s | 8s | 15s |\n| PDF Create from HTML | 2s | 5s | 10s |\n| Photoshop Remove Background | 4s | 10s | 18s |\n| Lightroom Auto Tone | 3s | 8s | 15s |\n\n## Instructions\n\n### Optimization 1: Cache IMS Access Tokens (Biggest Win)\n\nThe IMS token endpoint returns tokens valid for 24 hours. Never re-generate per request:\n\n```typescript\n\u002F\u002F WRONG: generates new token every call (adds 200-500ms each time)\nasync function makeRequest() {\n  const token = await getAccessToken(); \u002F\u002F hits IMS every time\n}\n\n\u002F\u002F RIGHT: cache token and only refresh when expiring\nlet tokenCache: { token: string; expiresAt: number } | null = null;\n\nasync function getCachedToken(): Promise\u003Cstring> {\n  if (tokenCache && tokenCache.expiresAt > Date.now() + 300_000) {\n    return tokenCache.token; \u002F\u002F Cache hit — 0ms\n  }\n  const res = await fetch('https:\u002F\u002Fims-na1.adobelogin.com\u002Fims\u002Ftoken\u002Fv3', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fx-www-form-urlencoded' },\n    body: new URLSearchParams({\n      client_id: process.env.ADOBE_CLIENT_ID!,\n      client_secret: process.env.ADOBE_CLIENT_SECRET!,\n      grant_type: 'client_credentials',\n      scope: process.env.ADOBE_SCOPES!,\n    }),\n  });\n  const data = await res.json();\n  tokenCache = { token: data.access_token, expiresAt: Date.now() + data.expires_in * 1000 };\n  return tokenCache.token;\n}\n```\n\n### Optimization 2: Parallel Async Job Submission\n\nFirefly and Photoshop APIs are async — submit all jobs first, then poll all:\n\n```typescript\n\u002F\u002F SLOW: sequential (total = sum of all job times)\nfor (const prompt of prompts) {\n  const result = await generateImageSync(prompt); \u002F\u002F 5-20s each\n}\n\n\u002F\u002F FAST: parallel submit + parallel poll (total = max job time)\nasync function batchFireflyGenerate(prompts: string[]) {\n  const token = await getCachedToken();\n\n  \u002F\u002F 1. Submit all jobs simultaneously\n  const jobSubmissions = await Promise.all(\n    prompts.map(prompt =>\n      fetch('https:\u002F\u002Ffirefly-api.adobe.io\u002Fv3\u002Fimages\u002Fgenerate-async', {\n        method: 'POST',\n        headers: {\n          'Authorization': `Bearer ${token}`,\n          'x-api-key': process.env.ADOBE_CLIENT_ID!,\n          'Content-Type': 'application\u002Fjson',\n        },\n        body: JSON.stringify({ prompt, n: 1, size: { width: 1024, height: 1024 } }),\n      }).then(r => r.json())\n    )\n  );\n\n  \u002F\u002F 2. Poll all jobs in parallel\n  const results = await Promise.all(\n    jobSubmissions.map(job => pollUntilDone(job.statusUrl, token))\n  );\n\n  return results;\n}\n```\n\n### Optimization 3: Response Caching for Repeated Operations\n\n```typescript\nimport { LRUCache } from 'lru-cache';\n\n\u002F\u002F Cache PDF extraction results (same PDF = same output)\nconst extractionCache = new LRUCache\u003Cstring, any>({\n  max: 100,\n  ttl: 3600_000, \u002F\u002F 1 hour\n});\n\nasync function cachedPdfExtract(pdfHash: string, pdfPath: string) {\n  const cached = extractionCache.get(pdfHash);\n  if (cached) {\n    console.log('PDF extraction cache hit');\n    return cached;\n  }\n\n  const result = await extractPdfContent(pdfPath);\n  extractionCache.set(pdfHash, result);\n  return result;\n}\n```\n\n### Optimization 4: Connection Keep-Alive\n\n```typescript\nimport { Agent } from 'https';\n\n\u002F\u002F Reuse TCP connections to Adobe endpoints\nconst adobeAgent = new Agent({\n  keepAlive: true,\n  maxSockets: 10,\n  maxFreeSockets: 5,\n  timeout: 60_000,\n});\n\n\u002F\u002F Use with node-fetch or undici\nconst response = await fetch(url, {\n  \u002F\u002F @ts-ignore — agent option supported by node-fetch\n  agent: adobeAgent,\n  headers: { ... },\n});\n```\n\n### Optimization 5: Smart Polling Intervals\n\n```typescript\n\u002F\u002F Adaptive polling: start fast, slow down over time\nasync function adaptivePoll(statusUrl: string, token: string) {\n  const intervals = [1000, 2000, 3000, 5000, 5000, 10000]; \u002F\u002F ms\n  let attempt = 0;\n\n  while (true) {\n    const res = await fetch(statusUrl, {\n      headers: {\n        'Authorization': `Bearer ${token}`,\n        'x-api-key': process.env.ADOBE_CLIENT_ID!,\n      },\n    });\n    const status = await res.json();\n\n    if (status.status === 'succeeded') return status;\n    if (status.status === 'failed') throw new Error(status.error?.message);\n\n    const delay = intervals[Math.min(attempt, intervals.length - 1)];\n    await new Promise(r => setTimeout(r, delay));\n    attempt++;\n  }\n}\n```\n\n## Output\n\n- IMS token cached for 24h (eliminates 200-500ms per request)\n- Parallel job submission for batch operations\n- LRU response caching for repeated extractions\n- Connection keep-alive reducing TLS handshake overhead\n- Adaptive polling reducing unnecessary API calls\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Stale cached token | Token revoked mid-lifecycle | Catch 401, clear cache, retry once |\n| Parallel rate limiting | Too many concurrent jobs | Add p-queue concurrency limit |\n| Cache memory pressure | Too many cached results | Set LRU max size |\n| Connection pool exhaustion | Too many parallel requests | Limit maxSockets to 10-20 |\n\n## Resources\n\n- [Firefly Async API Guide](https:\u002F\u002Fdeveloper.adobe.com\u002Ffirefly-services\u002Fdocs\u002Ffirefly-api\u002Fguides\u002Fhow-tos\u002Fusing-async-apis)\n- [PDF Services Quickstart](https:\u002F\u002Fdeveloper.adobe.com\u002Fdocument-services\u002Fdocs\u002Foverview\u002Fpdf-services-api\u002Fquickstarts\u002Fnodejs\u002F)\n- [LRU Cache npm](https:\u002F\u002Fgithub.com\u002Fisaacs\u002Fnode-lru-cache)\n\n## Next Steps\n\nFor cost optimization, see `adobe-cost-tuning`.\n\n",{"name":5,"tags":44,"author":46,"license":15,"version":47,"description":48,"allowed-tools":49,"compatible-with":50},[45,38,21],"saas","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Adobe API performance with token caching, async job batching,\nconnection pooling, and response caching for Firefly, PDF Services,\nand Photoshop API workflows.\nTrigger with phrases like \"adobe performance\", \"optimize adobe\",\n\"adobe latency\", \"adobe caching\", \"adobe slow\", \"adobe batch\".\n","Read, Write, Edit","claude-code","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fadobe-performance-tuning",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill adobe-performance-tuning",{"tool":66,"command":67},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill adobe-performance-tuning",{"tool":69,"command":70},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill adobe-performance-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fadobe-performance-tuning\u002FSKILL.md",true,[],[75,84,93,102,108,114],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[81,82,83],"model","model hierarchy","model hierarchy skill",{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[90,91,92],"MCP","zoom","zoom mcp",{"skillNo":94,"name":95,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[99,100,101,91],"sdk","zoom apps sdk","apps",{"skillNo":103,"name":104,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[104],{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[110],{"skillNo":115,"name":116,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[116]]