adobe-performance-tuning
Optimize Adobe API performance with token caching, async job batching, connection pooling, and response caching for Firefly, PDF Services, and Photoshop API workflows. Trigger with phrases like "adobe performance", "optimize adobe", "adobe latency", "adobe caching", "adobe slow", "adobe batch".
Best use case
adobe-performance-tuning is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Optimize Adobe API performance with token caching, async job batching, connection pooling, and response caching for Firefly, PDF Services, and Photoshop API workflows. Trigger with phrases like "adobe performance", "optimize adobe", "adobe latency", "adobe caching", "adobe slow", "adobe batch".
Teams using adobe-performance-tuning should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/adobe-performance-tuning/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How adobe-performance-tuning Compares
| Feature / Agent | adobe-performance-tuning | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Optimize Adobe API performance with token caching, async job batching, connection pooling, and response caching for Firefly, PDF Services, and Photoshop API workflows. Trigger with phrases like "adobe performance", "optimize adobe", "adobe latency", "adobe caching", "adobe slow", "adobe batch".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Adobe Performance Tuning
## Overview
Optimize 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.
## Prerequisites
- Adobe SDK installed and functional
- Understanding of which APIs your app uses most
- Redis or in-memory cache available (optional)
- Performance monitoring in place
## Latency Benchmarks (Real-World)
| Operation | P50 | P95 | P99 |
|-----------|-----|-----|-----|
| IMS Token Generation | 200ms | 500ms | 1s |
| Firefly Text-to-Image (sync) | 5s | 12s | 20s |
| Firefly Text-to-Image (async poll) | 8s | 15s | 25s |
| PDF Extract (10-page doc) | 3s | 8s | 15s |
| PDF Create from HTML | 2s | 5s | 10s |
| Photoshop Remove Background | 4s | 10s | 18s |
| Lightroom Auto Tone | 3s | 8s | 15s |
## Instructions
### Optimization 1: Cache IMS Access Tokens (Biggest Win)
The IMS token endpoint returns tokens valid for 24 hours. Never re-generate per request:
```typescript
// WRONG: generates new token every call (adds 200-500ms each time)
async function makeRequest() {
const token = await getAccessToken(); // hits IMS every time
}
// RIGHT: cache token and only refresh when expiring
let tokenCache: { token: string; expiresAt: number } | null = null;
async function getCachedToken(): Promise<string> {
if (tokenCache && tokenCache.expiresAt > Date.now() + 300_000) {
return tokenCache.token; // Cache hit — 0ms
}
const res = await fetch('https://ims-na1.adobelogin.com/ims/token/v3', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
client_id: process.env.ADOBE_CLIENT_ID!,
client_secret: process.env.ADOBE_CLIENT_SECRET!,
grant_type: 'client_credentials',
scope: process.env.ADOBE_SCOPES!,
}),
});
const data = await res.json();
tokenCache = { token: data.access_token, expiresAt: Date.now() + data.expires_in * 1000 };
return tokenCache.token;
}
```
### Optimization 2: Parallel Async Job Submission
Firefly and Photoshop APIs are async — submit all jobs first, then poll all:
```typescript
// SLOW: sequential (total = sum of all job times)
for (const prompt of prompts) {
const result = await generateImageSync(prompt); // 5-20s each
}
// FAST: parallel submit + parallel poll (total = max job time)
async function batchFireflyGenerate(prompts: string[]) {
const token = await getCachedToken();
// 1. Submit all jobs simultaneously
const jobSubmissions = await Promise.all(
prompts.map(prompt =>
fetch('https://firefly-api.adobe.io/v3/images/generate-async', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'x-api-key': process.env.ADOBE_CLIENT_ID!,
'Content-Type': 'application/json',
},
body: JSON.stringify({ prompt, n: 1, size: { width: 1024, height: 1024 } }),
}).then(r => r.json())
)
);
// 2. Poll all jobs in parallel
const results = await Promise.all(
jobSubmissions.map(job => pollUntilDone(job.statusUrl, token))
);
return results;
}
```
### Optimization 3: Response Caching for Repeated Operations
```typescript
import { LRUCache } from 'lru-cache';
// Cache PDF extraction results (same PDF = same output)
const extractionCache = new LRUCache<string, any>({
max: 100,
ttl: 3600_000, // 1 hour
});
async function cachedPdfExtract(pdfHash: string, pdfPath: string) {
const cached = extractionCache.get(pdfHash);
if (cached) {
console.log('PDF extraction cache hit');
return cached;
}
const result = await extractPdfContent(pdfPath);
extractionCache.set(pdfHash, result);
return result;
}
```
### Optimization 4: Connection Keep-Alive
```typescript
import { Agent } from 'https';
// Reuse TCP connections to Adobe endpoints
const adobeAgent = new Agent({
keepAlive: true,
maxSockets: 10,
maxFreeSockets: 5,
timeout: 60_000,
});
// Use with node-fetch or undici
const response = await fetch(url, {
// @ts-ignore — agent option supported by node-fetch
agent: adobeAgent,
headers: { ... },
});
```
### Optimization 5: Smart Polling Intervals
```typescript
// Adaptive polling: start fast, slow down over time
async function adaptivePoll(statusUrl: string, token: string) {
const intervals = [1000, 2000, 3000, 5000, 5000, 10000]; // ms
let attempt = 0;
while (true) {
const res = await fetch(statusUrl, {
headers: {
'Authorization': `Bearer ${token}`,
'x-api-key': process.env.ADOBE_CLIENT_ID!,
},
});
const status = await res.json();
if (status.status === 'succeeded') return status;
if (status.status === 'failed') throw new Error(status.error?.message);
const delay = intervals[Math.min(attempt, intervals.length - 1)];
await new Promise(r => setTimeout(r, delay));
attempt++;
}
}
```
## Output
- IMS token cached for 24h (eliminates 200-500ms per request)
- Parallel job submission for batch operations
- LRU response caching for repeated extractions
- Connection keep-alive reducing TLS handshake overhead
- Adaptive polling reducing unnecessary API calls
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Stale cached token | Token revoked mid-lifecycle | Catch 401, clear cache, retry once |
| Parallel rate limiting | Too many concurrent jobs | Add p-queue concurrency limit |
| Cache memory pressure | Too many cached results | Set LRU max size |
| Connection pool exhaustion | Too many parallel requests | Limit maxSockets to 10-20 |
## Resources
- [Firefly Async API Guide](https://developer.adobe.com/firefly-services/docs/firefly-api/guides/how-tos/using-async-apis)
- [PDF Services Quickstart](https://developer.adobe.com/document-services/docs/overview/pdf-services-api/quickstarts/nodejs/)
- [LRU Cache npm](https://github.com/isaacs/node-lru-cache)
## Next Steps
For cost optimization, see `adobe-cost-tuning`.Related Skills
running-performance-tests
Execute load testing, stress testing, and performance benchmarking. Use when performing specialized testing. Trigger with phrases like "run load tests", "test performance", or "benchmark the system".
workhuman-performance-tuning
Workhuman performance tuning for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman performance tuning".
workhuman-cost-tuning
Workhuman cost tuning for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman cost tuning".
wispr-performance-tuning
Wispr Flow performance tuning for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr performance tuning".
wispr-cost-tuning
Wispr Flow cost tuning for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr cost tuning".
windsurf-performance-tuning
Optimize Windsurf IDE performance: indexing speed, Cascade responsiveness, and memory usage. Use when Windsurf is slow, indexing takes too long, Cascade times out, or the IDE uses too much memory. Trigger with phrases like "windsurf slow", "windsurf performance", "optimize windsurf", "windsurf memory", "cascade slow", "indexing slow".
windsurf-cost-tuning
Optimize Windsurf licensing costs through seat management, tier selection, and credit monitoring. Use when analyzing Windsurf billing, reducing per-seat costs, or implementing usage monitoring and budget controls. Trigger with phrases like "windsurf cost", "windsurf billing", "reduce windsurf costs", "windsurf pricing", "windsurf budget".
webflow-performance-tuning
Optimize Webflow API performance with response caching, bulk endpoint batching, CDN-cached live item reads, pagination optimization, and connection pooling. Use when experiencing slow API responses or optimizing request throughput. Trigger with phrases like "webflow performance", "optimize webflow", "webflow latency", "webflow caching", "webflow slow", "webflow batch".
webflow-cost-tuning
Optimize Webflow costs through plan selection, CDN read optimization, bulk endpoint usage, and API usage monitoring with budget alerts. Use when analyzing Webflow billing, reducing API costs, or implementing usage monitoring for Webflow integrations. Trigger with phrases like "webflow cost", "webflow billing", "reduce webflow costs", "webflow pricing", "webflow budget".
vercel-performance-tuning
Optimize Vercel deployment performance with caching, bundle optimization, and cold start reduction. Use when experiencing slow page loads, optimizing Core Web Vitals, or reducing serverless function cold start times. Trigger with phrases like "vercel performance", "optimize vercel", "vercel latency", "vercel caching", "vercel slow", "vercel cold start".
vercel-cost-tuning
Optimize Vercel costs through plan selection, function efficiency, and usage monitoring. Use when analyzing Vercel billing, reducing function execution costs, or implementing spend management and budget alerts. Trigger with phrases like "vercel cost", "vercel billing", "reduce vercel costs", "vercel pricing", "vercel expensive", "vercel budget".
veeva-performance-tuning
Veeva Vault performance tuning for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva performance tuning".