DeepSeek Harness plugin

dsh-screenshot-diff

Pixel-diff two screenshots into diff.png + a labeled triptych (pixelmatch)

Jump to install

Source facts

Repository
PangYiMing/dsh-screenshot-diff
Latest update
Aug 14, 2026
Category
Vision & Multimodal
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/PangYiMing/dsh-screenshot-diff
Plugin: dsh-screenshot-diff
Author: PangYiMing

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

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 LEVELnormal(灰度+阈值0.1+忽略抗锯齿,稳)/ high(彩色+阈值0.02+计入抗锯齿)/ ultra(阈值0.01,最灵敏、噪点多)
--threshold Npixelmatch 阈值,显式传入覆盖灵敏度预设
--crop-top PX两图同时裁掉顶部物理像素
--compare-tool DIRsharp/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:similaritynumDiffPixelstotalsensitivitythreshold

判读 Judgment

  • 相似度 ≠ 结论:90% 以上的"大体一致"也要人工看 diff 区是否集中在应改位置。
  • 先用 normal 跑一版;要抓淡灰/白渐变这类低对比差异再升 highultra 噪点最多,慎用。
  • 尺寸不一致直接失败,不会被拉伸掩盖布局问题——这是刻意设计。
  • 两张图必须同一视口/分辨率、同一页面状态(滚动位置、弹窗、加载态),否则 diff 无意义。

安装 Install

# 发布到 npm 后
dsh plugin --profile demo add dsh-screenshot-diff

# 或从 GitHub 安装
dsh plugin --profile demo add github:PangYiMing/dsh-screenshot-diff

许可证 License

[MIT](./LICENSE)