Skip to content

Add cloudinary-image-picker skill - #27

Draft
carlevison wants to merge 6 commits into
mainfrom
hackathon/cloudinary-image-picker
Draft

carlevison wants to merge 6 commits into
mainfrom
hackathon/cloudinary-image-picker

Conversation

@carlevison

Copy link
Copy Markdown
Collaborator

Adds cloudinary-image-picker, a new use-case skill built at the hackathon. It picks images for every image slot on a website from a Cloudinary product environment, and edits or generates images when nothing in the library fits.

It triggers when an agent builds a website that needs images, fills empty or placeholder image slots, or refreshes existing images (for example, a seasonal hero).

What the skill does

  1. Inventories each image slot: purpose, nearby copy, display size, aspect ratio per breakpoint, minimum source size, and text overlays.
  2. Asks up front about scope, write permission, and an optional visible AI label.
  3. Finds candidates with the best available method: Visual Search, browsing a small scope with contact sheets, or the Search API on tags and captions.
  4. Views and scores every candidate against a 20-point rubric (subject, resolution, crop fit, composition, tone, clean).
  5. Adapts near-misses and fixable flaws with generative AI edits (fill, remove, replace, background replace, recolor, upscale, image_to_image).
  6. Generates new images when nothing fits, within a quota budget. It caps generation at 2K, upscales with c_limit, and makes matching sets from one reference image.
  7. Saves edited and generated images as new assets with ai_generated=true, and optionally adds a conditional "AI" label overlay, choosing one of four versions per crop.
  8. Delivers slot-sized URLs with f_auto/q_auto, a 2x srcset, and separate g_auto crops per breakpoint.
  9. Checks the rendered page at desktop and phone width, then reports a slot table.

Testing

Tested on a claimable cloud seeded with 80 random CC0 images from the demo account, in three scenarios:

  • Filling 13 empty and placeholder slots on an existing site
  • Swapping a summer hero for autumn
  • Building a coffee roastery site from scratch

Each run's findings fed back into the skill, from version 0.1.0 to 0.5.1.

Two scenarios weren't run, because the Image Generation quota ran out: a forced generation case, and a forced edit (generative fill and background replace) case.

Known limitations

  • Unpredictable cost: the cost of image_to_image varied between runs (1 unit in one run, 6 in another), so the matching-set guidance may need a preference: economy setting.
  • No Visual Search in testing: Visual Search returned no results in the test cloud, so that path is untested.
  • Internal: metadata.internal: true is set, so the skill stays out of the default install until it's ready.

🤖 Generated with Claude Code

carlevison and others added 6 commits October 28, 2026 11:28
Hackathon draft of a use-case skill that picks images for website slots
from a Cloudinary product environment: discovers candidates (Visual Search,
browse, or Search API on tags and captions), scores them, adapts near-misses
with generative AI edits, generates new images when needed, and self-checks
the rendered page. Marked internal while in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Always ask for write permission before editing, generating, or saving
- Treat empty Visual Search results as unavailable
- Add a generation budget check using limits.addons_quota
- Send accepted images with fixable flaws (logos, mismatched backgrounds) to step 6
- Guide resolution choice for wide slots
- Self-check over local HTTP, not file://, at desktop and phone widths
- Browse small scopes with contact sheets

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record each aspect ratio a slot uses across breakpoints, and deliver a
separate g_auto crop per ratio with picture/source instead of relying on
CSS object-fit center cropping, which cut the subject out of a phone hero
in testing. Check crops at desktop and phone width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generate one reference image for a set of similar slots, then make the
rest with image_to_image using it as the reference. In testing this kept
product cards consistent and cost far less per image than text_to_image.
Also tell agents to read used_by_request rather than assume a fixed cost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ask whether to label AI-generated and AI-edited images. If yes, upload
the four AI label variants when missing, pick one per crop from the
brightness and busyness of its bottom-right corner, and apply it as a
conditional overlay on cld_ai_generated after the crop. Always save AI
images with ai_generated=true so the flag is set, and mention the
disclosure in alt text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 4K hero cost 19 Image Generation units in testing. Generate wide
images at 2K instead, and when upscaling with e_upscale (always 4x),
follow it with c_limit at the slot's minimum source size before saving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ranrub

ranrub commented Oct 28, 2026

Copy link
Copy Markdown
Member

should this skill suggest installing and configuring the cloudinary mcp / plugin in order to get access to the account via OAUTH rather than requiring apikey/secret?

@carlevison

Copy link
Copy Markdown
Collaborator Author

should this skill suggest installing and configuring the cloudinary mcp / plugin in order to get access to the account via OAUTH rather than requiring apikey/secret?

Thanks for asking, @ranrub . Yes, we can certainly do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants