--- name: stock-image-assets description: Add properly licensed Adobe Stock photos to the Images palette library (e.g. the Touch hand group) via the Adobe MCP — search free-tier Stock, license through the user's account, remove backgrounds, install as trimmed PNGs, update imageLibrary.ts and the license record. Use when asked to add more stock images/photos to the image library, expand the Touch group, or add a new photographic asset group. metadata: # Contributor tooling for this repository, not a skill anyone installs. # `npx skills add` walks .claude/skills as a priority container, so without # this flag every person installing the published skills would be offered # our internal harnesses too, including scripts that shell a hardcoded # Windows Edge path. Set INSTALL_INTERNAL_SKILLS=1 to see them anyway. internal: true --- # Licensed Stock Images for the Images Palette Adds photographic assets to the app's **Images** tab (`src/lib/imageLibrary.ts` + `public/elements/images//`) using Adobe Stock, licensed through the user's connected Adobe account so there is a real license record on file. **Hard rules (user requirement — copyright):** - NEVER crop assets out of reference screenshots the user shares — those only define what *kind* of asset to find. - NEVER download artwork from the web (Wikimedia, official brand SVGs, etc.). - Openverse/Wikimedia CC0+CC-BY were verified to have NO usable isolated studio photos — don't retry that route. - Every shipped asset must trace to an Adobe Stock license; keep `docs/image-asset-licenses.md` up to date in the same change. ## Pipeline 1. **Init Adobe MCP** — call `adobe_mandatory_init` once, then load schemas via ToolSearch: `asset_search`, `asset_license_and_download_stock`, `image_remove_background` (+ `asset_inline_preview` if needed). 2. **Search free-tier Stock** — `asset_search({entityScope: "StockAsset", query: "...", filters: {pricing: "free", contentType: "Photo"}, limit: 30})`. - Queries like "hand pointing index finger isolated on white background" work well; "isolated on white" is the key phrase for cutout-friendly shots. - Combining `pricing` + `contentType` + `orientation` can return 0 hits — drop `orientation` if that happens. - `renditionURL` is a public CDN thumbnail (t3/t4.ftcdn.net) — safe to download with curl for curation; never ship it. 3. **Curate visually** — download rendition thumbnails, build a labeled contact sheet (`scripts/contact-sheet.js`), and pick a consistent set (varied poses and skin tones; avoid busy clothing/backgrounds, gimmick shots, and `isGenTech: true` results if real photos are wanted). 4. **License** — `asset_license_and_download_stock({assetId})` per asset. - Free-tier assets license without consuming paid credits (`state: "just_purchased"`). - Returned `downloadUrl` is a presigned S3 URL valid **1 hour**; re-calling refreshes the URL without consuming another license. - **Download the originals immediately after licensing.** The Adobe MCP session token can expire mid-batch ("Your session token is about to expire") and only the user can re-authenticate (claude.ai connector settings). Licenses are permanent, but locally saved originals let work continue (e.g. local keying) while Adobe is unavailable. 5. **Remove backgrounds** — `image_remove_background({imageURI: downloadUrl})` (default transparent-PNG cutout mode; no options needed). Output keeps full resolution up to 8192px (larger inputs are downscaled — fine). Download each `outputUrl` with `curl -L`. Occasional `HTTP 504` — retry once. - Fallback for crisp objects on plain white (food, products — NOT hair/people): local keying with `scripts/white-key.js `. 6. **Trim + install** — `node .claude/skills/stock-image-assets/scripts/trim-install.js ` trims transparent borders (alpha > 8, 6px pad), caps the longest side at 1000px, and writes `-as.png`. The Stock ID in the filename is the provenance link — keep that convention. 7. **Update `src/lib/imageLibrary.ts`** — add items with: - `id`: filename without extension (`touch-as453449839`) - `label`: short human label ("Pointing up", "Side point · deep tone") - `defaultSize`: scale so the longest side ≈ 430 canvas units, preserving the PNG's aspect ratio. A new group only needs a new entry in `IMAGE_CATEGORIES`; the palette (`ElementPalette.tsx` Images tab) renders groups generically. 8. **Update the license record** — append rows to `docs/image-asset-licenses.md` (file, Stock ID, exact Stock title, license date). The user's full history lives at stock.adobe.com/license-history. 9. **Verify** — use the `app-screenshots` skill: Images tab → Browse → screenshot the grid → click a tile (`button[title="Add