Mode d’emploi
- Copiez la commande et examinez le paquet avant de l’installer dans votre environnement agent.
- Consultez le document original pour les outils, identifiants et environnements requis.
- Décrivez les entrées et le livrable souhaité ; comparez la sortie aux sources.
npx skills add https://github.com/software-mansion/argent --skill argent-screenshot-diffAvant de commencer
- L’installation n’inclut ni abonnement au modèle, ni quota API, ni accès aux fichiers.
- Étoiles et installations reflètent l’activité, pas un test indépendant de qualité ou de sécurité.
Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.
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 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
- Navigate to the known-good state. Capture the baseline before the relevant interaction or before editing whenever feasible.
- Save a baseline PNG with
screenshotusingscale: 1.0andincludeImageInContext: false, so the full-size image stays out of context; keep the returnedpath. Use normal downscaled screenshots for everything else. - Perform the interaction, apply the code change and navigate to the state under test, after the app reloads or rebuilds.
- Call
screenshot-diffwith thatbaselinePath,captureCurrent: true,udid, andoutputDir. If both images are already saved, passcurrentPathinstead ofcaptureCurrent. - Inspect the summary and artifact paths, then combine the diff with normal visual inspection and any structural/runtime evidence needed for the assertion.