Reverse Prompt
# Reverse Prompt Engineering Reference
> Load this when the user runs `/create-image reverse` or asks to analyze an image
> and extract a prompt that would recreate it.
## Overview
Reverse prompt engineering takes an existing image and decomposes it into a
structured prompt using the 5-Component Formula. This teaches prompt engineering
by example and enables style recreation across multiple generations.
## How to Analyze an Image
When the user provides an image (file path or upload), analyze it systematically:
### Step 1: Identify the Domain Mode
Look at the image and determine which domain mode best describes it:
Cinema, Product, Portrait, Editorial, UI/Web, Logo, Landscape, Abstract,
Infographic, or Presentation.
### Step 2: Decompose Using the 5-Component Formula
Extract each component from what you observe:
| Component | What to Extract | Weight |
|-----------|----------------|--------|
| **Subject** (30%) | Who/what is the primary focus? Age, appearance, material, species, physical details. | Most important — be specific |
| **Action** (10%) | What is the subject doing? Pose, gesture, movement, state. | Use present-tense verbs |
| **Location** (15%) | Where is the scene? Time of day, weather, atmosphere, environmental details. | Include mood-setting details |
| **Composition** (10%) | Camera perspective, framing, angle, focal length, depth of field. | Estimate the lens and f-stop |
| **Style** (25%) | Visual register, medium, lighting setup, color grading. | Describe the register directly; do NOT name a publication |
### Step 3: Identify Technical Details
- **Camera/lens estimate:** "Looks like an 85mm f/1.4 based on the depth of field and compression"
- **Lighting setup:** "Key light from upper-left, soft fill from right, rim light behind"
- **Color grading:** "Warm tones, slightly desaturated, lifted shadows"
- **Aspect ratio:** Measure or estimate (16:9, 4:5, 1:1, etc.)
### Step 4: Construct the Prompt
Write the prompt as natural narrative prose following the 5-Component Formula.
Describe the visual register directly (lighting, lens, composition, colour
grading). Do NOT name a publication ("Vanity Fair editorial," "National
Geographic cover") -- Gemini renders a literal magazine cover with masthead and
gibberish headlines instead of the image you want.
Apply the same rules as regular prompt construction:
- Cut useless quality keywords ("8K", "masterpiece", "ultra-realistic") -- noise on Gemini 3.1; do NOT swap in publication names
- Use specific camera names and lens specs
- Include micro-details (textures, reflections, atmospheric elements)
- Describe what you SEE, not what it MEANS
## Output Format
Present the analysis with THREE perspectives — how Claude sees it, how Gemini sees it, and a blended best-of-both version. This teaches users how different AI models interpret the same image and how to write better descriptions.
### Step 5: Get Gemini's Perspective
Send the image to Gemini via `gemini_chat` with this prompt:
"Describe this image in precise detail as if writing a prompt to recreate it. Include: subject appearance, action/pose, setting/location, camera angle and framing, lighting setup, color grading, and overall style. Be specific about materials, textures, and atmosphere."
### Step 6: Compare and Blend
Compare Claude's analysis (Steps 2-3) with Gemini's response (Step 5) and create a blended version that takes the best details from each.
## Output Formatwhen to use it
Community prompt sourced from the open-source GitHub repo juliandickie/creators-studio (MIT). A "Reverse Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
juliandickie/creators-studio · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions