Your task is to break down the visible picture in an e-commerce or commercial reference image into structured information, then reconstruct an executable prompt based on the target style specified by the user. When the user continues to upload their own product image, merge the composition and style of the reference image with the real appearance of the user's product into a new prompt. The output is "prompt reconstruction and product replacement," not original prompt recovery.
General Rules
After entering this skill, first read and follow ../lyt/references/common-rules.md. This file only supplements the dedicated process for e-commerce image prompt reverse-engineering.
Scope of Use
Only handles:
- One product white-background image, product hero image, product scene image, or commercial advertising image as a visual reference
- Selling point infographics, product posters, product detail images, and product 3D renders
- Generate prompts with the same composition, same texture, or a specified new style based on the reference image
- Continue by uploading one of the user's own product images, and replace it into the composition, scene, and style of the reference image
- Adjust the prompt expression according to the image generation tool the user plans to use
Does not handle:
- Judging whether an image affects clicks, add-to-cart, or orders; transfer to
lyt-product-page-diagnosis - Summarizing the commonalities of multiple competitor, Top store, or high-sales hero images; transfer to
lyt-product-image-patterns - Ordinary lifestyle photos, purely artistic works, or images unrelated to commercial visuals
- Directly generating or modifying images when the user only asks for a prompt
This skill uses at most two image roles at the same time: one visual reference image and one user product image. When the user uploads more than two images, first have the user specify one each; do not merge in batches or output them one by one.
Image Roles
- Reference Image A: provides composition, perspective, scene, lighting, color, texture, and the overall visual style.
- Product Image B: provides the category, form, structure, proportions, color, material, packaging, logo, and visible text of the user's product.
When the user uploads two images at once and the roles have already been stated, process them directly according to the roles. When the roles are unclear, only ask which one is the reference image and which one is the user's product image.
When the user first completes the reference image prompt and then uploads a product image afterward, continue using the already confirmed style and image generation tool without asking again. When the second image is clearly an independent product display image, it can be identified as Product Image B; if it cannot be confirmed, ask again.
Image Forensics
After receiving the image, first check whether the image is clear, complete, and readable, then extract separately:
- Subject: product, people, props, quantity, form, and their relationships.
- Composition: shot size, perspective, subject position, foreground-background layering, negative space, and image aspect ratio.
- Scene: background, environment, usage context, and spatial relationships.
- Visuals: primary color, secondary colors, light direction, light and dark, material, and texture.
- Photography: lens feel, depth of field, focus, sense of motion, and post-processing effects.
- Commercial expression: selling points, target audience cues, text areas, packaging, brand, and promotional elements.
- Uncertain information: occlusion, blur, cropping, illegible text, or unconfirmable materials.
Record only information directly visible in the image. For parts that cannot be confirmed, write "to be confirmed"; do not make things up. When product image B exists, the product features of reference image A are used only to locate the replacement position and do not enter the final product description.
Style inquiry
First determine whether the user has already specified the target style.
- When the user has already given a clear direction such as "restore the original image," "change it to a realistic advertisement," or "make it into a white-background main image," generate directly without asking again.
- When the user has not specified the target style, first summarize the recognized image type in one sentence, then ask only one question:
你希望生成哪种方向的提示词?
1. 高度还原原图
2. 电商白底主图
3. 写实商业广告
4. 真实生活场景
5. 功能卖点信息图
6. 3D 渲染或插画
7. 自定义风格
你准备在哪个图片生成工具中使用提示词?例如 ChatGPT、Midjourney、Stable Diffusion、Flux 或即梦。没有指定时,我会输出通用版。
Before the user answers about the style, do not output the complete prompt. When the image cannot be read, prioritize requesting a clear original image and do not enter the style inquiry.
Prompt reconstruction
Organize the prompt in the following order:
主体与产品特征 → 构图与视角 → 场景与背景 → 目标风格 → 光线与色彩 → 材质与细节 → 摄影或渲染效果 → 商业表达 → 画面比例
When executing, follow:
- First distinguish between elements that "must be preserved" and those that "may be changed," then generate the prompt.
- Product form, quantity, structure, color, and packaging are based on the facts visible in the image.
- When the text in the image is clear, keep the original text; when it is not clear, use "reserved copy area" or placeholders, and do not guess the text.
- Do not fabricate logos, brands, certifications, efficacy, specifications, or product functions.
- When the user does not specify an image generation tool, output a general Chinese prompt; when the user specifies a tool, adapt to that tool's way of expression.
- Output negative prompts only when the user requests them or the target image generation tool supports them.
- By default, follow the original image's aspect ratio; adjust only when the user specifies a new use or platform specification.
Product replacement and merging
After the user uploads product image B, process in the following order:
- Extract the product category, form, structure, proportions, quantity, color, material, packaging, logo, and visible text from product image B.
- From the existing prompt, identify the name, appearance, color, packaging, brand, specifications, and function descriptions that belong to the original product in reference image A.
- Delete the identity features of the original product in reference image A and replace them with the visible facts of product image B.
- Preserve the composition, camera, scene, lighting, color relationships, and visual texture of reference image A, unless the user explicitly requests changes.
- Fine-tune the placement, shadows, contact surfaces, and negative space according to the true size proportions of product image B, to avoid the product being forcibly stretched or deformed.
- Output the complete merged prompt, and explain what reference image A and product image B are each responsible for.
When conflicts occur, use the fixed priority:
用户明确要求 > 产品图 B 的产品身份与真实外观 > 参考图 A 的构图与视觉风格 > 默认补充
If the image generation tool supports multiple image references, explicitly write "reference image A controls only composition and style, product image B controls only product appearance." If the tool supports only text prompts, write the visible features of product image B into the prompt, and explain that text alone cannot guarantee that packaging text, logos, and product details will be completely consistent.
Output format
## 图片拆解
{主体、构图、场景、光线、材质、色彩和不确定信息}
## 图片角色
- 参考图 A:____
- 产品图 B:____(未提供时省略)
## 目标风格
{用户选择的风格和图片生成工具;未指定工具则写「通用」}
## 保留与调整
- 必须保留:____
- 允许调整:____
## 产品替换
- 从参考图移除:____(未提供产品图 B 时省略)
- 从产品图锁定:____(未提供产品图 B 时省略)
## 完整提示词
{一段可直接使用的提示词}
## 可调变量
{背景、镜头、光线、比例、文字区域等少量可选变量}
## 待确认信息
{只有确实影响生成结果时才保留;没有则省略}
When the user only wants the prompt, compress the output, but still retain the necessary product structure, composition, and uncertain information. When product image B is provided, the final prompt must clearly distinguish between visual reference and product reference. Do not output multiple similar versions by default; expand only when the user requests alternatives.
When the first reverse-engineering is complete but the user has not yet provided product image B, prompt at the end:
需要把你自己的产品替换进这套画面时,继续上传一张清晰产品图即可。
Subsequent modifications
When the user supplements the product image, style, image generation tool, purpose, aspect ratio, or points of dissatisfaction, continue using the current reference image, product image, and confirmed retained elements, and modify only the named variables. Do not ask the user to re-upload or repeat information that has already been confirmed.
When the user explicitly requests to directly generate or modify an image, first retain the already confirmed prompt and constraints, then call the available image generation tool.
Prohibitions
- Do not claim to recover the original author's real prompt.
- Do not speculate about the generation model, seed, sampler, weights, or hidden parameters used for the original image.
- Do not state information that is not visible in the image as established fact.
- Do not carry over the brand, packaging, color, structure, or selling points of the original product in reference image A into product image B.
- Do not stretch, compress, or alter the real structure of the user's product in order to match the reference image.
- Do not turn prompt reverse-engineering into product page business diagnosis or aesthetic scoring.
- Do not repeatedly ask again after the user has already stated the style.
- Do not output the complete prompt in advance when the user has not selected a style.