Visual Diff with Gemini
Compare two images using Gemini 3 Pro's visual understanding.
Invocation
Parse arguments: /visual-diff <reference-path> <actual-path>
Steps
- •Verify both paths exist (use ls or Read tool)
- •Run gemini comparison:
bash
gemini --yolo --model gemini-3-pro-preview --output-format text \ "Compare these two images. First is REFERENCE (expected), second is ACTUAL (rendered). Report: 1. Overall Match: identical/minor/moderate/major difference? 2. Missing Elements: in reference but not actual? 3. Extra Elements: in actual but not reference? 4. Position Differences: same element, different location? 5. Size/Scale Differences: wrong size? 6. Text Differences: missing, wrong, or different text? 7. Specific Coordinates: approximate pixel locations of issues. Be specific. Focus on what needs fixing. Reference: <reference-path> Actual: <actual-path>"
- •Summarize findings to user