image-compare
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "image-compare" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-8f1a89e74f534d4e55e9b376de548ce96ac1dc674c5d18abbf4b62c866ea847d. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Image-compare: Uses visual AI to compare two images to identify differences, similarities, and changes. Suitable for comparing designs to implementations, visual regression testing, or detecting changes between two versions.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: image-compare
description: >-
Compare two images visually using Vision AI to identify differences, similarities, and
changes. Use when: comparing design mockups vs implementation, visual regression testing,
identifying what changed between two versions.
license: MIT
compatibility: "Node.js 18+"
metadata:
author: terminal-skills
version: "1.0.0"
category: design
tags: [image-compare, visual-regression, design, testing, diff]Image Compare
Overview
Compare two images pixel-by-pixel. Returns a diff count, mismatch percentage, and generates a diff image highlighting the differences in red.
- Comparing an implementation screenshot against the original design
- Spotting visual regressions between two versions of a page
- Verifying that a UI matches a Figma export
Instructions
- Both images are loaded and resized to match dimensions (uses the smaller of the two)
pixelmatchcompares every pixel and flags differences above a configurable threshold- Returns mismatch stats and writes a diff image showing changes in red
Run the comparison script:
bash <skill-path>/scripts/image-compare.sh <image1> <image2> [diff-output.png] [threshold]
Arguments:
image1— First image path (required)image2— Second image path (required)diff-output.png— Path to write the diff image (optional, defaults to./diff.png)threshold— Pixel matching threshold 0-1, lower is stricter (optional, defaults to0.1)
The script outputs JSON with comparison results:
{
"totalPixels": 921600,
"differentPixels": 4523,
"mismatchPercentage": 0.49,
"dimensions": { "width": 1280, "height": 720 },
"diffImage": "./diff.png",
"threshold": 0.1
}
Interpret the mismatch percentage:
- < 0.1% — Essentially identical
- 0.1% - 1% — Minor differences, likely anti-aliasing or sub-pixel rendering
- 1% - 5% — Noticeable differences, worth reviewing
- > 5% — Significant visual changes
Examples
Example 1: Compare a Figma design against the implemented page
bash <skill-path>/scripts/image-compare.sh design.png screenshot.png
Output:
Comparison: design.png vs screenshot.png
Mismatch: 0.49% (4,523 pixels out of 921,600)
Diff image saved to: ./diff.png
The images are nearly identical. Differences are highlighted in red in the diff image.
Example 2: Visual regression test with strict threshold
bash <skill-path>/scripts/image-compare.sh before.png after.png ./changes.png 0.05
Using a stricter threshold of 0.05 catches even subtle rendering differences between deployments. The diff image at ./changes.png highlights all detected changes in red.
Guidelines
- The script automatically resizes both images to the smaller dimensions. For best results, use images of the same size.
- If you see too many false positives, increase the threshold (e.g.,
0.2). Anti-aliasing differences are common between browsers. - For CI/CD visual regression, set a mismatch threshold (e.g., fail if > 1%) and compare screenshots taken with the same viewport size.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供图像视觉比较功能,适用于设计稿对比、视觉回归测试等工程场景
- 具有明确的实用价值和广泛受众
Highlights
- 触发描述清晰覆盖设计稿对比、视觉回归测试等核心场景
- 边界定义明确,不易误触
Areas to improve
-
缺少显式 When to Use 章节 Reported severity: Minor
文档未设置显式的 When to Use 章节,但 frontmatter 的 description 已覆盖使用场景
Recommendation: 建议在正文中添加显式的 When to Use 章节以提升可读性
Highlights
- 文档结构完整,包含清晰的执行步骤和端到端示例
- frontmatter 信息完整,参数说明详尽
Areas to improve
-
异常处理覆盖不足 Reported severity: Minor
脚本未显式处理文件不存在、图像格式错误等常见异常情况
Recommendation: 建议在脚本中添加基本的文件存在性检查和错误处理逻辑
Highlights
- 调用方式明确,参数有默认值处理
- 输出格式标准化,便于程序解析
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.