CommunityImagegithub.com

Reference Decoder

Turn a reference photo or ad into a paste-ready prompt for GPT Image, Nano Banana, Seedream, or Midjourney. It decides what to keep, what to change, and which few choices make the picture work.

What is Reference Decoder?

Decode a client reference into a model-specific image prompt, naming what must stay and what should change.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/kim-m-lee/reference-decoder/tree/HEAD

Installed? Explore more Image skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does Reference Decoder do?

Turns a reference image into a prompt that gets the same result from an AI image model. Built for real client work: a brand hands over an ad they own and want to test with AI creative, or a designer needs a new image that matches an existing look.

Built for photographs: ads, product shots, portraits, interiors, food, fashion, lifestyle. If the reference is an illustration, a 3D render, a graphic layout or a collage, say that this version is made for photos. Then do your best by describing the medium, palette, texture and layout instead of lens and light, and flag the result as less precise.

Write for creatives and marketers, not engineers. Use plain words, and explain any photography term the first time it appears.

The flow

  1. Look at the image properly before asking anything.
  2. Check rights, but only if it looks like a real ad or someone else's photo.
  3. Ask one combined question, with your suggested answers filled in.
  4. Write the prompt in one paste-ready block, formatted for the model.
  5. Explain why it works in three lines, plus one tip for that model.

1. Look at the image

Read the image in this order. It's the order a photographer sets up a shot, and it's also the order the prompt follows.

PartWhat to work out
ShotFraming (close-up, medium, wide), camera height and angle, likely lens (wide and close, or long and compressed), depth of field (what's sharp, what's soft)
SubjectWho or what. Pose, gesture, expression, where they're looking, clothing. For products: shape, material, finish, any visible text.
SetLocation, background, surfaces, props, what's in the foreground
LightWhere it comes from, hard or soft, warm or cool, how many sources, how bright the background is compared to the subject
FinishColour grade, contrast, saturation, film or digital look, grain, sharpness
FormatAspect ratio, and where the space sits for text or a logo

Rules for looking:

  • If the image is small or blurry and you can't read important details (which hand, what's in a window, a badge), say so and ask for a bigger file. Meanwhile, work from what you can see.
  • Spot what the product really is. In many ads the product isn't the person. It's the setting (a seat, a room, a car interior) or something they're holding. If the client is likely the brand behind the setting, say that a generated version will look generic. Suggest attaching a photo of the real product, and a model that's good at placing real products (see references/models.md).
  • Framing in proportions, not just shot names. "Medium close-up" isn't enough, because models default to a wider, safer shot with lots of headroom. Say how much of the frame each thing fills: "her face and shoulders fill the left half, the top of her head almost touches the top edge, a blurred coffee cup fills the bottom-right corner in the foreground". Say how close the camera feels (an arm's length away, or across a room).
  • Give directions as frame left and frame right. Never "his left" or "camera left": they're easy to mix up, and the model mixes them up too. Write "looking towards frame right", "hand on the frame-right earcup". Check every direction against the image before writing the prompt.
  • Read the light where it lands on the subject, not just the room. Which side of the face is brighter? Is the light on the skin warm or cool? Is the background brighter or darker than the face? Rooms and faces are often lit differently (a cool grey room and a warm, sunlit face), so describe both.
  • Pin colours: hue first, then soften. One colour name ("sage green") gets saturated by the model. But an over-strong correction ("much greyer") can wipe out the hue completely, turning a pale blue into plain grey. So lead with the hue, then adjust it gently, and compare it to something in the frame: "a soft sage green, slightly greyed, a little darker than the leaves behind her".
  • Describe what you can see. If you're working something out from clues (like the lens from how the background is compressed), say "about" or "likely". Never invent detail.
  • Turn feelings into instructions. A model can follow an instruction, but it can't follow a feeling. If the image feels "dreamy", work out what's making it feel that way (maybe the light is behind the subject, the shadows are lifted and the contrast is low) and write those down instead.
  • Don't use "stock" words in the prompt: "clean", "modern", "commercial", "bright", "evenly lit", "professional". They pull every model towards a generic stock-photo look. Describe the actual light and grade instead. If the reference is moody or cinematic, say what makes it so (darker surroundings, warm light on the face, deeper shadows).
  • Find the two or three things doing the heavy lifting. In most strong ads it's the light, the framing and one styling choice. These go in "Why it works".
  • Note any text, logos or brand marks. Don't reproduce a brand's logo in the prompt. Describe the space it sits in, so the real one can be added afterwards.

2. Check rights (only for real ads or someone else's photo)

If the image looks like a published ad, a campaign or a photographer's work, ask one line:

"Do you or your client have the rights to this image?"

  • Yes: go ahead with a close recreation. Say nothing more about it.
  • No or not sure: still help, but suggest changing at least two elements (angle, set, props, styling) so the result is inspired by the reference, not a copy of someone else's work.

Skip this step for the user's own photos, mood board snapshots they've made, or anything that clearly isn't someone else's published work.

3. Ask one combined question

Ask everything in one message, with your suggestions filled in, so the user can just say yes or change one thing. If step 2 applies, put the rights question at the top of this same message, so it's only one back-and-forth.

Before I write it:

  • Keep: low close-up on the stone ledge, hard late sun from the right, warm grade with deep shadows
  • Change: the bottle (your perfume), the dried flowers (lemon leaves)
  • Format: 4:5? (the reference looks cropped, so tell me the size you need)
  • Model: Nano Banana Pro? (or GPT Image, Seedream, Midjourney)
  • Attaching the reference image when you generate? (I'll assume not)
  • Any other images you'll attach, like a product photo or a face? (I'll assume none)

How to suggest each one:

  • Keep and Change: base these on the user's request. "Recreate this" means keep almost everything. "This look for my product" means keep the shot, light and finish, and change the subject.
  • Model: suggest one using references/models.md, e.g. GPT Image if there's text that must be right.
  • Attaching the reference: assume no, so the prompt carries everything. If they say yes, write the short version (see below).
  • Other images: assume none. If the subject is a real product or a specific person, suggest attaching a photo of it, because the model can't invent the real thing from words.

If their first message already answers something ("Nano Banana, same look for my perfume"), don't ask it again.

4. Write the prompt

Follow the same order as step 1: Shot → Subject → Set → Light → Finish → Format.

  • Be specific and physical. "Hard late-afternoon sun from camera right, casting long shadows" works better than "beautiful natural light".
  • Name colours and materials precisely: "honed travertine, warm cream with small pits", not "stone".
  • Leave out what doesn't matter. If the background just needs to be "a blurred Mediterranean garden", don't describe every plant.
  • Changed elements go in clearly, e.g. "a woman in her 30s", or "[your product]" as a placeholder if the user will attach a product image.
  • Format it for the model. Each model wants something different, so read references/models.md before writing.

Full version (the default, no reference attached): describe everything that matters, in order.

Short version (the reference is attached): don't describe what the image already shows. Say what the reference is for ("use the reference for framing and light only"), then cover only what changes and what the image can't make clear: materials, exact colours, the new subject.

Image labels (if any images are attached): start the prompt with one line per image, saying what the model should take from it and nothing else. Number them in the order the user will upload them:

Image 1: use for the bottle's shape and label only. Image 2: use for the woman's face only.

Then don't describe in words what those images already show (the label, the face). Describe only what changes and what the images can't show.

Settings line (if needed): anything that goes in the tool's settings rather than the prompt sits in one line above the prompt block, e.g. "Settings: aspect ratio 4:5, resolution 2K. Don't leave the ratio on auto."

People:

  • Keeping a specific person (the user has their photo): don't describe their face. Say "use the reference for the person's face". Describing features makes the face drift.
  • Casting a new person "of the same type": describe what a casting brief would say: age range, build, skin tone, hair, facial hair, expression. Don't name an ethnicity unless the user does.

Put the prompt in a single code block, so it's easy to copy.

5. Why it works, plus a model tip

Under the prompt, add:

Why it works (three lines at most): the two or three choices that make the image land, and why. For example:

  • Hard low sun throws a long shadow from the bottle, which makes a small product feel sculptural.
  • The camera sits almost at ledge height, so the bottle looks taller and more heroic than it is.
  • Everything is warm except the liquid, so the eye goes straight to the product.

Model tip (one line), from references/models.md, for what this model tends to get wrong with this kind of image. Example: "There's small print on the label. Nano Banana Pro may garble it, so use GPT Image, or add the real label afterwards."

Switching model: if the user asks for the same prompt for another model, rewrite only the prompt and the model tip. Don't repeat "Why it works", because the image hasn't changed.

If the result drifts

When the user comes back with "it changed the face" or "the light's wrong":

  • Fix one thing at a time. Change only the part of the prompt that controls the problem, and leave the rest alone.
  • Don't keep editing an edited image. Each AI edit redraws the whole picture and loses quality. Go back to the original references and run it again.
  • If a model keeps making the same mistake, suggest switching model (see references/models.md) rather than piling on "don't" instructions.

Related Skills