Agent Skills › software-mansion/argent › argent-screenshot-diff

argent-screenshot-diff

GitHub

用于UI视觉回归测试的截图对比工具,支持基线与当前截图比对,检测布局、颜色、排版等像素级变化。

packages/skills/skills/argent-screenshot-diff/SKILL.md software-mansion/argent

触发场景

视觉回归测试 UI前后对比 截图差异检查

安装

npx skills add software-mansion/argent --skill argent-screenshot-diff -g -y
更多选项

非标准路径

npx skills add https://github.com/software-mansion/argent/tree/main/packages/skills/skills/argent-screenshot-diff -g -y

不安装直接使用

npx skills use software-mansion/argent@argent-screenshot-diff

指定 Agent (Claude Code)

npx skills add software-mansion/argent --skill argent-screenshot-diff -a claude-code -g -y

安装 repo 全部 skill

npx skills add software-mansion/argent --all -g -y

预览 repo 内 skill

npx skills add software-mansion/argent --list

SKILL.md

Frontmatter
{
    "name": "argent-screenshot-diff",
    "description": "Compare saved or live app screenshots with the argent screenshot-diff tool. Use when testing visual regressions, before\/after UI comparisons, screenshot diff checks, visible layout, spacing, color, typography, clipping, overflow, text rendering, or image\/icon rendering changes."
}

1. Role

Use screenshot-diff as supporting visual evidence for UI QA and visual regression checks. It highlights pixel-visible change or stability; it does not replace visual inspection, accessibility/component-tree state, frame/attribute checks, logs, network evidence, or app behavior. Its description covers the input combinations, physical-iPhone captures and the result.

Do not use screenshot diffing for tap-coordinate discovery. Use describe or native-describe-screen to find targets first.

2. When To Use

  • Required for explicit "UI regression test", "visual regression test", "screenshot diff", "compare screenshots", or "before/after visual comparison" requests, unless stable comparable screenshots cannot be produced.
  • Good fit when the expected result is pixel-visible, or when the risk is an unintended visual regression outside the exact element changed.
  • Poor fit when the result is better verified structurally: state changes, navigation existence, accessibility tree contents, console/network behavior, or unit tests.
  • Poor fit when dynamic content, unpausable animation, timestamps, ads, random data, or missing baseline/current screenshots would make the comparison noisy or meaningless.

3. Deterministic Flow

  1. Navigate to the known-good state. Capture the baseline before the relevant interaction or before editing whenever feasible.
  2. Save a baseline PNG with screenshot using scale: 1.0 and includeImageInContext: false, so the full-size image stays out of context; keep the returned path. Use normal downscaled screenshots for everything else.
  3. Perform the interaction, apply the code change and navigate to the state under test, after the app reloads or rebuilds.
  4. Call screenshot-diff with that baselinePath, captureCurrent: true, udid, and outputDir. If both images are already saved, pass currentPath instead of captureCurrent.
  5. Inspect the summary and artifact paths, then combine the diff with normal visual inspection and any structural/runtime evidence needed for the assertion.

版本历史

  • b965c94 当前 2026-11-07 15:13
  • b6576ef 2026-09-09 02:11

    新增对物理 iOS 设备的支持,包括 UDID 发现、应用启动及全分辨率截图捕获功能。

  • bc04c3b 2026-07-06 19:59

同 Skill 集合

packages/skills/skills/argent-android-emulator-setup/SKILL.md
packages/skills/skills/argent-create-e2e/SKILL.md
packages/skills/skills/argent-create-flow/SKILL.md
packages/skills/skills/argent-device-interact/SKILL.md
packages/skills/skills/argent-ios-device-interact/SKILL.md
packages/skills/skills/argent-ios-device-setup/SKILL.md
packages/skills/skills/argent-ios-simulator-setup/SKILL.md
packages/skills/skills/argent-lens/SKILL.md
packages/skills/skills/argent-metro-debugger/SKILL.md
packages/skills/skills/argent-native-profiler/SKILL.md
packages/skills/skills/argent-react-native-app-workflow/SKILL.md
packages/skills/skills/argent-react-native-optimization/SKILL.md
packages/skills/skills/argent-react-native-profiler/SKILL.md
packages/skills/skills/argent-screen-recording/SKILL.md
packages/skills/skills/argent-test-ui-flow/SKILL.md
packages/skills/skills/argent-tv-interact/SKILL.md
packages/skills/skills/argent-qa-e2e/SKILL.md
packages/skills/skills/argent-qa-flows/SKILL.md
packages/skills/skills/argent-settings-permissions/SKILL.md

元信息

文件数
0
版本
b965c94
Hash
10dd761a
收录时间
2026-07-06 19:59

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-10 09:12
浙ICP备14020137号-1