adobe-hello-world
Create minimal working examples for Adobe APIs: Firefly image generation, PDF extraction, and Photoshop background removal. Use when starting a new Adobe integration, testing your setup, or learning basic Adobe API patterns. Trigger with phrases like "adobe hello world", "adobe example", "adobe quick start", "simple adobe code", "first adobe API call".
What this skill does
# Adobe Hello World
## Overview
Three minimal working examples covering Adobe's core API surfaces: Firefly AI image generation, PDF content extraction, and Photoshop background removal.
## Prerequisites
- Completed `adobe-install-auth` setup
- Valid OAuth Server-to-Server credentials
- Node.js 18+ with `@adobe/firefly-apis` or `@adobe/pdfservices-node-sdk` installed
## Instructions
### Example 1: Firefly Text-to-Image Generation
```typescript
// hello-firefly.ts
import 'dotenv/config';
import { getAdobeAccessToken } from './adobe/auth';
async function generateImage() {
const token = await getAdobeAccessToken();
const response = await fetch(
'https://firefly-api.adobe.io/v3/images/generate',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'x-api-key': process.env.ADOBE_CLIENT_ID!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt: 'A futuristic cityscape at sunset with flying cars',
n: 1, // number of images
size: {
width: 1024,
height: 1024,
},
contentClass: 'art', // "art" or "photo"
}),
}
);
if (!response.ok) {
throw new Error(`Firefly API error: ${response.status} ${await response.text()}`);
}
const result = await response.json();
console.log('Generated image URL:', result.outputs[0].image.url);
return result;
}
generateImage().catch(console.error);
```
### Example 2: PDF Text Extraction
```typescript
// hello-pdf.ts
import {
ServicePrincipalCredentials,
PDFServices,
MimeType,
ExtractPDFParams,
ExtractElementType,
ExtractPDFJob,
ExtractPDFResult,
} from '@adobe/pdfservices-node-sdk';
import * as fs from 'fs';
async function extractPDF() {
const credentials = new ServicePrincipalCredentials({
clientId: process.env.ADOBE_CLIENT_ID!,
clientSecret: process.env.ADOBE_CLIENT_SECRET!,
});
const pdfServices = new PDFServices({ credentials });
// Upload the PDF
const inputStream = fs.createReadStream('./sample.pdf');
const inputAsset = await pdfServices.upload({
readStream: inputStream,
mimeType: MimeType.PDF,
});
// Configure extraction (text + tables)
const params = new ExtractPDFParams({
elementsToExtract: [ExtractElementType.TEXT, ExtractElementType.TABLES],
});
// Run extraction job
const job = new ExtractPDFJob({ inputAsset, params });
const pollingURL = await pdfServices.submit({ job });
const result = await pdfServices.getJobResult({
pollingURL,
resultType: ExtractPDFResult,
});
// Download result ZIP containing structuredData.json
const resultAsset = result.result!.resource;
const streamAsset = await pdfServices.getContent({ asset: resultAsset });
const outputStream = fs.createWriteStream('./extracted-output.zip');
streamAsset.readStream.pipe(outputStream);
console.log('Extraction complete: ./extracted-output.zip');
}
extractPDF().catch(console.error);
```
### Example 3: Photoshop Remove Background
```typescript
// hello-photoshop.ts
import 'dotenv/config';
import { getAdobeAccessToken } from './adobe/auth';
async function removeBackground() {
const token = await getAdobeAccessToken();
// Input/output must be pre-signed URLs (S3, Azure Blob, Dropbox)
const response = await fetch(
'https://image.adobe.io/sensei/cutout',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'x-api-key': process.env.ADOBE_CLIENT_ID!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
input: {
href: 'https://your-bucket.s3.amazonaws.com/input-photo.jpg',
storage: 'external',
},
output: {
href: 'https://your-bucket.s3.amazonaws.com/output-cutout.png',
storage: 'external',
type: 'image/png',
},
}),
}
);
const result = await response.json();
console.log('Job status URL:', result._links.self.href);
// Poll for completion
let status = result;
while (status.status !== 'succeeded' && status.status !== 'failed') {
await new Promise(r => setTimeout(r, 2000));
const poll = await fetch(status._links.self.href, {
headers: {
'Authorization': `Bearer ${token}`,
'x-api-key': process.env.ADOBE_CLIENT_ID!,
},
});
status = await poll.json();
}
console.log('Background removal:', status.status);
}
removeBackground().catch(console.error);
```
## Output
- Generated AI image URL from Firefly API
- Extracted PDF text/tables in structured JSON format
- Background-removed PNG from Photoshop API
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `403 Forbidden` | Missing API entitlement | Enable the API in Developer Console project |
| `400 Bad Request` on Firefly | Invalid prompt or parameters | Check content policy; prompts cannot request trademarks or people |
| `invalid_content_type` on PDF | Wrong MimeType | Ensure input is actually a PDF, not a renamed file |
| `InputValidationError` on Photoshop | Invalid storage URL | Use pre-signed URLs with read/write permissions |
| `429 Too Many Requests` | Rate limit exceeded | Implement backoff; see `adobe-rate-limits` |
## Resources
- [Firefly API Quickstart](https://developer.adobe.com/firefly-services/docs/firefly-api/guides/)
- [PDF Services Node.js Quickstart](https://developer.adobe.com/document-services/docs/overview/pdf-services-api/quickstarts/nodejs/)
- Photoshop API Getting Started
## Next Steps
Proceed to `adobe-local-dev-loop` for development workflow setup.
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.