/figma-visual-reviewer:pixel-difffrom figma-visual-reviewer
Compares two screenshots pixel-by-pixel and generates a visual diff overlay. Useful for detecting visual regressions between Figma designs and web implementations.
Ships in figma-visual-reviewer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
兩張截圖的像素級比對,產出差異視覺化圖。
Pillow 和 numpy:pip install Pillow numpypython "${CLAUDE_PLUGIN_ROOT}/scripts/pixel-diff.py" <image_a> <image_b> --output diff.png \
[--threshold 10] [--pass-below 5] [--block-above 15] [--ignore-region x,y,w,h]
腳本在 plugin 目錄裡,不在使用者專案裡——路徑一定要用 ${CLAUDE_PLUGIN_ROOT},寫相對路徑會找不到檔案。
| 參數 | 必填 | 說明 |
|---|---|---|
image_a | 是 | 參考圖(設計稿) |
image_b | 是 | 比對圖(網頁截圖) |
--output | 否 | 差異圖輸出路徑(預設 diff.png) |
--threshold | 否 | 每像素色差敏感度 0-100(預設 10,值越低越嚴格)。這是「色差多大才算不同」,不是整體容許比例 |
--pass-below | 否 | 整體差異低於此百分比判 PASS(預設 5) |
--block-above | 否 | 整體差異高於此百分比判 BLOCK(預設 15),之間為 WARNING |
--ignore-region | 否 | 忽略區域 x,y,w,h,可重複——遮掉時鐘、輪播等動態內容 |
--background | 否 | 透明圖層合成的背景色(預設 white) |
--highlight-color | 否 | 差異標記顏色(預設 red) |
{
"total_pixels": 2073600,
"diff_pixels": 12450,
"diff_percentage": 0.60,
"diff_regions": [
{"x": 100, "y": 200, "width": 300, "height": 50, "label": "region_1"}
]
}
--scale 跟網頁截圖的 device pixel ratio 要一致--threshold 是每像素色差的敏感度:預設 10 會濾掉字型反鋸齒、瀏覽器渲染那類細微色差;降到 5 會抓得更細,但假差異也會變多--background 改)What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
npx claudepluginhub mukiwu/muki-ai-plugins --plugin figma-visual-reviewerOther plugins' skills for the same job