CommunityImagegithub.com

AI Product Image Diff

Compare AI-generated vs real product photos, enlarge and compare issues per image per person with numbered overlays. Upon user specification, automatically select and apply localized fixes, then show post-repair review. Suitable for apparel, footwear, bags, etc.; checks person consistency only upon explicit user request, not for background evaluation or pixel-level differencing.

What is AI Product Image Diff?

This skill provides a comprehensive workflow for detecting, documenting, and repairing visual discrepancies between AI-generated product images and real reference photos. It systematically identifies issues such as structural errors, texture differences, logo inaccuracies, and quality problems (blur, moiré patterns) across multiple images and multiple subjects (e.g., models wearing different items). The first round generates an interactive comparison preview with stable identifiers for each issue (e.g., D01 for confirmed product differences, Q02 for quality optimizations). The user then specifies which items to fix by number, and the skill auto-selects the most appropriate repair method based on available references, tool capabilities, and error type, without requiring the user to choose technical parameters. After repair, the skill automatically re-checks the fixed areas against the original AI and reference images, reports status for each item (fixed, improved, insufficient evidence, not executed, false positive), and generates versioned output files with a repair record. It supports platforms like Codex and follows a strict rule of not modifying unselected issues, not creating false positives, and only requiring additional reference materials necessary to resolve the specific user-selected problems. The skill respects user-specified tools or methods when provided, and explicitly notes limitations when a requested fix is not feasible.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/ssjsjdjj/codex-image-skills/tree/HEAD/kkc/skills/ai-product-image-diff

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

AI Product Image Diff: Check, Click-to-Repair, and Review

Workflow and Scope

Default flow: Detect issue → Show enlarged comparison with number → User specifies modifications → Codex auto-selects repair method → Show post-repair comparison and review results.

  • First round only detects and displays issues; does not retouch automatically. When the user says "fix D01, Q02," that authorizes repair of those items only, and the skill directly selects the method and executes it without requiring the user to pick tools, repair approaches, or give repeated approval. Previously granted clear authorization carries over to subsequent rounds.
  • When the user has already specified the problem and scope of modification, the skill supplements necessary positioning and reference material, then proceeds directly to repair without forcing a full re-selection process. When the user only asks for inspection, evaluation of the skill, or discussion of a plan, no retouching is initiated.
  • "Fix only D01" does not expand to other items; "fix all" applies to currently shown, repairable items that have sufficient evidence, not to unconfirmed suspicions. If a reference is unclear or cannot be located, only the single item affected by that ambiguity is clarified; all other clear work continues.
  • By default, only specified products are inspected. Accessory items, model appearance, or background are not automatically included. When the user explicitly requests face changes or model likeness restoration, a dedicated person-consistency check is added; once a request has been made, the skill does not ask again.
  • Before performing a repair, the skill reads references/repair-workflow.md. If the user specifies a tool or method, that takes precedence. The auto-selected method is based on available references and actual tool capabilities; the skill does not promise that any method will yield the best possible result.

Input and Reference Identification

Primary input: AI-generated image to inspect + corresponding studio flat shot; same-product images, fabric details, standard logos, and same-model approximate-angle real shots can assist verification.

Reference identity is determined by user labeling and purpose, not by white background, transparent background, file order, or a directory named "generated." Multi-style, multi-color, multi-person references must be matched separately; mixing is prohibited. When identity is unclear and affects conclusions, ask for the critical missing information; do not auto-verify the reference's authenticity.

  • Studio flat shots are used to confirm changes before vs. after AI generation, and also to rule out pre-existing color casts, blur, lighting, and obstructions. When references conflict, list the conflicts; if unexplained, mark for re-review.
  • When no corresponding input flat shot exists, report visible differences versus the same-style reference but do not assert that all differences are caused by AI.
  • Same pose, slight pose change, and major pose change are noted separately. For pose changes, only compare structures and visual impressions that are mutually visible and locatable; do not require every fold to be identical, and do not infer details of newly exposed or obstructed areas.
  • Supplementary evidence is requested for specific doubts; do not request the full set of materials uniformly. If the AI image itself is low resolution, prioritize reading the high-resolution AI original or a local crop; a newly added real shot can only prove detailed real-world existence, not independently prove that a blurry AI image retained or deleted that detail. While supplementary evidence is being gathered, continue processing items with sufficient evidence.

Per-Image, Per-Person Inspection

First list all files and target subjects, then inspect each one by one; after finding one issue, still complete the inspection of that image's other target subjects.

  • For group photos, assign each target subject a number based on position (e.g., left/center/right) and record style, color, reference image, angle, occlusions, and visible clarity. Leave a conclusion for each person, including "no confirmed differences in currently visible area," "normal bokeh," "occluded," or "insufficient evidence."
  • Inspection items are selected by product type: silhouette, parts and connections, seams and stitching, openings and edges, fasteners and zippers, straps and handles, soles and laces, brim and adjustment elements, logos and text/patterns, localized color and texture. Do not infer material composition, performance, or hidden structures.
  • Image quality and texture are listed separately: detail retention, stitching clarity, fold layering, gloss, localized blur, chromatic aberration/moiré. Changes that can be reasonably explained by lighting, exposure, color temperature, perspective, and wearing deformation are not directly judged as product errors.
  • When determining abnormal blur, consider actual focal point, nearby stitching/weave with the same depth of field, motion blur, and original image performance; do not mechanically apply "nearby is always sharp, distant is always blurry." Blur does not equal content error, and unseeable does not equal missing. Do not guess logo text.
  • Do not automatically flip logos because of model orientation or different left/right legs. First verify the left/right side design, shooting angle, and whether the entire image is mirrored; any flipped copy used only for easier observation must clearly indicate the direction change, and the unflipped original must be preserved.
  • When the user requests a face check, compare visible facial features per person; expression, angle, and lighting changes are not directly judged as face changes. When a reference from the target angle is missing, note the limitation; do not promise to accurately reproduce an unseen facial angle.

First Round: Show Issues Enlarged to the User

First inspect the image directly; when necessary, read original size and crop local areas. Deliver chat-visible comparison preview and a short candidate list by default; do not hand over only a text repair request.

  1. Overview and Coverage: State which files and target subjects were inspected; if sampling was performed, clearly indicate sampling and do not represent a small area as a batch-wide per-person verification.
  2. Numbered Enlarged Comparison: Assign a stable number to each candidate (e.g., D for confirmed product difference, Q for image quality/texture optimization, R for re-review; person-specific items can use F). Indicate file, person position, part, and reference image number. AI on the left, reference on the right.
  3. Brief Explanation: Reference appearance → AI-visible change | Certainty and severity level | Suggested repair method and limitations. Severity: High = structural/brand/logo/key component error; Medium = obvious localized appearance error; Low = minor detail discrepancy; image quality suggestions are listed separately and not automatically escalated to product errors. Suggested repair method is Codex's judgment; do not ask the user to choose from technical options.
  4. Collect Modification Scope: Let the user directly provide numbers or describe which areas need fixing. After the first round display, wait for their selection; do not default to modifying. When clear modification authorization is already obtained, proceed per the rules above.

The preview should show mutually comparable areas and enough context to locate the issue. Display sizes should be comparable to the product; note obvious resolution differences. Normal cropping, non-generative scaling, layout, and labeling are allowed. Do not use sharpening, denoising, generative detail filling, or automatic differencing to fabricate detection evidence. Original-size crops must be traceable; do not claim interpolated magnification as added real detail.

For confirmed differences, use identical numbers and same-color bounding boxes for localization. Use explicit labels for doubts, occlusions, and reasonable lighting variations; do not draw them as confirmed errors. When no confirmed difference exists, do not force issues or claim "perfect match."

Post-User-Selection Auto Repair

Read the repair reference, then select the method based on original pixel availability, pose/angle changes, error type, and actual tool capabilities. Modify only the user-selected issues and necessary blending edges; keep the original file and output a versioned copy.

No need for the user to re-select the repair method. Give a brief explanation of the method and its purpose before execution. When supplementary materials are needed, request only the specific references that can resolve the selected issues; continue working on items that can still be completed. If a tool is unavailable or evidence for repair is insufficient, explain the limitation; do not present textual suggestions as fixed results.

Post-Repair Display and Review

After repair, automatically review without requiring the user to initiate another "inspection." Reuse the original numbering; compare original AI, repaired image, and real reference: both confirm whether target issues have improved and check whether adjacent areas have introduced new differences.

  • Output enlarged views of selected parts as "before repair / after repair / reference" plus a full repaired preview. When generative repair has been applied to people or clothing, check logos, boundaries, occlusions, and other previously passed areas.
  • Per-item status: Fixed and passed review / Improved but not passed / Insufficient evidence / Not executed / False positive withdrawn. When user judgment on aesthetics or similarity is required, clearly state it; do not fabricate human acceptance.
  • If the same item shows no significant improvement after the first repair, try one additional method with supporting evidence; if still unsuccessful, keep the better copy and note the limitation; do not infinitely regenerate or repeatedly change areas that have already passed. When the user adds further requests, proceed separately.
  • Unselected issues remain pending; do not automatically close them just because other items in this round have been repaired. Record reasons for existing lighting variations, reasonable occlusions, and other items not requiring modification.
  • When new evidence or human feedback appears, update the original item and note the basis for the judgment change; do not skip review because the user says "it's fixed." Passing technical review does not equal final user adoption.

Files and Records

Follow the output location requirements of the current environment. Do not overwrite references, original AI images, or user source PSDs; do not place business images inside the skill distribution package.

  • First round preview: diff_result.png; multiple images can use separate files. If the report needs to be saved, use diff_report.md with a file–person–issue index, noting whether it is a full or sample inspection.
  • Repair record: repair_record.md, recording selected numbers, original image and reference, repair method, output version, review status, and unresolved items. Generative repairs should note the generated area, not claim it as restored original pixels.
  • Post-repair comparison: repair_preview.png; for closure or archiving, use closure_record.md, storing a final image copy with version evidence, and recording only user-confirmed human acceptance or adoption.
  • End of report: State "This is a model visual judgment; manual review is recommended."

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Related Skills