dsh-screenshot-diff
Manifest validDSH plugin: pixel-diff two screenshots into diff.png + triptych (pixelmatch) — 像素对比工具
dsh-screenshot-diff
DeepSeek Harness 插件 · 像素对比 / DSH plugin for pixel-diffing screenshots
对两张已截图做像素 diff,输出 diff.png(差异标红)和 compare-triple.png(左 A / 中 B / 右 diff 三联图,各自左上角带标签)。不做截图采集——输入是你已有的两张图。
Pixel-diff two existing screenshots into diff.png (differences in red) plus a labeled triptych compare-triple.png (A | B | diff). It does not capture screenshots — you supply the two images.
使用 Usage
bash scripts/diff.sh /abs/path/imgA.png /abs/path/imgB.png \
--label-a before \
--label-b after \
--sensitivity high \
--out /tmp/diff-out
| 参数 | 说明 |
|---|---|
--out DIR | 输出目录,默认第一张图所在目录 |
--label-a/--label-b TEXT | 左右图标签,默认 a / b |
--sensitivity LEVEL | normal(灰度+阈值0.1+忽略抗锯齿,稳)/ high(彩色+阈值0.02+计入抗锯齿)/ ultra(阈值0.01,最灵敏、噪点多) |
--threshold N | pixelmatch 阈值,显式传入覆盖灵敏度预设 |
--crop-top PX | 两图同时裁掉顶部物理像素 |
--compare-tool DIR | sharp/pngjs/pixelmatch 依赖目录,或设 COMPARE_TOOL_ENV |
依赖自动发现:--compare-tool > COMPARE_TOOL_ENV > 仓库内 scripts/compare-tool。依赖为 sharp / pngjs / pixelmatch。
输出 Output
<out>/diff.png 差异标红([255,0,0])
<out>/compare-triple.png 三联图:左 A | 中 B | 右 diff <相似度>
stdout 输出 JSON:similarity、numDiffPixels、total、sensitivity、threshold。
判读 Judgment
- 相似度 ≠ 结论:90% 以上的"大体一致"也要人工看 diff 区是否集中在应改位置。
- 先用
normal跑一版;要抓淡灰/白渐变这类低对比差异再升high;ultra噪点最多,慎用。 - 尺寸不一致直接失败,不会被拉伸掩盖布局问题——这是刻意设计。
- 两张图必须同一视口/分辨率、同一页面状态(滚动位置、弹窗、加载态),否则 diff 无意义。
安装 Install
# 发布到 npm 后
dsh plugin --profile demo add dsh-screenshot-diff
# 或从 GitHub 安装
dsh plugin --profile demo add github:PangYiMing/dsh-screenshot-diff
许可证 License
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
| 0.1.1 | — | — |
Comments
Loading…
Similar plugins
by dong2007-png
DSH plugin: generate images via a New API relay (tools: generate_image, list_image_models)
★ 0
MIT
JavaScript
Oct 1, 2026
dsh plugin --profile web add dsh-imagegenby daftAI2026
DeepSeek Harness plugin for sidebar masking, display aliases, and local screenshot editing. No session isolation.
★ 0
MIT
TypeScript
Oct 10, 2026
dsh plugin --profile web add @daftai/pdshby lehhair
DSH Web GUI PiUI-style diff viewer plugin: replaces the stock DiffBlock for write/edit tool calls via ui-tool diff-card chain slots (host patch included). Private.
★ 26
JavaScript
Sep 6, 2026
dsh plugin --profile web add @dsh-external/dsh-diff-viewerby better-er
dsh·去重复 diff 展示插件
★ 12
↓ 480/wk
MIT
TypeScript
Oct 2, 2026
dsh plugin --profile web add dsh-edit-diffby jing-hy
DSH plugin: pixel-to-text image reading for text-only models. image_scan/image_ocr/image_sample tools + image-reading skill (34-image trained methodology). Pure local, optional PaddleOCR.
★ 36
MIT
JavaScript
Sep 30, 2026
dsh plugin --profile web add picturereaderby 123cdxcc
A DeepSeek Harness plugin that lets DeepSeek see screenshots and local images via MindSee. DeepSeek Harness 插件:通过 MindSee 把截图和本地图片转成文字,让 DeepSeek 能看图作答。
★ 0
MIT
TypeScript
Aug 17, 2026
dsh plugin --profile web add dsh-mindsee