skills/vrt/SKILL.md
Run visual regression testing using Grantiva's diff pipeline. Capture screenshots, compare against baselines, and report visual differences. Use for catching unintended UI changes.
npx skillsauth add grantiva/swift-assist vrtInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run Grantiva's visual regression testing pipeline locally - capture screenshots of every defined screen, compare them against stored baselines, and report differences.
/swift-assist:vrt
/swift-assist:vrt --baseline
/swift-assist:vrt --compare
/swift-assist:vrt --threshold=5
/swift-assist:vrt --json
--baseline: Capture new baselines (first run or intentional reset)--compare: Compare current state against existing baselines (default behavior)--threshold=<percent>: Pixel difference threshold percentage (default: 2, from grantiva.yml)--json: Output results as JSONgrantiva.yml must exist with screen definitions (run /swift-assist:init and /swift-assist:make-tests)--compare: baselines must exist in .grantiva/ (run --baseline first)Run Grantiva's capture pipeline:
grantiva diff capture --scheme=<SCHEME> --simulator="<SIMULATOR>" --no-build
This navigates to each screen defined in grantiva.yml and captures a screenshot.
If --baseline or no baselines exist:
Approve all current captures as the new baselines:
grantiva diff approve
Tell the user:
Baselines set for X screens. Future runs will compare against these.
Run /swift-assist:vrt to check for visual regressions.
If --compare or baselines exist (default):
Compare captures against baselines:
grantiva diff compare
For any screens that show differences, use computer use to:
Visual Regression Report
========================
Screens tested: 12
Passed: 10 | Changed: 2 | New: 0
login PASS (0.1% diff)
login-filled PASS (0.0% diff)
home PASS (0.3% diff)
home-search PASS (0.1% diff)
settings CHANGED (8.4% diff, threshold: 2%)
-> Toggle layout shifted down 12px
-> Font weight changed on section headers
profile PASS (0.2% diff)
profile-edit PASS (0.1% diff)
checkout CHANGED (4.1% diff, threshold: 2%)
-> New "Apply Coupon" button added below subtotal
-> Price text alignment changed
checkout-confirm PASS (0.5% diff)
onboarding-1 PASS (0.0% diff)
onboarding-2 PASS (0.0% diff)
onboarding-3 PASS (0.1% diff)
To approve these changes as the new baseline:
/swift-assist:vrt-approve
/swift-assist:vrt-approve settings checkout (selective)
For cloud VRT with GitHub PR integration:
grantiva ci run
Results appear as a GitHub Check on your PR.
See: https://grantiva.io
If differences appear unintentional, offer to help:
--no-build since the app should already be built and runninggrantiva ci run for cloud integration - it uploads results to the Grantiva dashboardtesting
Approve current VRT captures as new baselines. Can approve all or specific screens selectively. Use after reviewing /swift-assist:vrt results.
testing
Run generated test flows against the app in the simulator using Grantiva. Use after /swift-assist:make-tests to execute and validate your user flows.
development
Add the UI_TESTING / .mock services pattern to the app entry point so Grantiva can run tests with deterministic data and no live server. Use before make-tests when the app talks to an API.
testing
Generate a GitHub Actions workflow that runs Grantiva VRT in CI on every pull request. Use to add cloud visual regression testing with GitHub Check integration to your project.