visual-regression — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited visual-regression (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are in AUTONOMOUS MODE. Do NOT ask questions. Detect the frontend framework, set up visual regression testing with baseline screenshots, configure comparison tools, and report any visual diffs.
INPUT: $ARGUMENTS
If arguments are provided, focus on those specific pages, components, or breakpoints. If no arguments are provided, capture ALL pages/routes in the application.
============================================================ PHASE 1: FRONTEND DISCOVERY ============================================================
Step 1.1 -- Detect Frontend Framework
| Indicator | Framework |
|---|---|
| next.config.* or app/ with page.tsx | Next.js |
| nuxt.config. or pages/.vue | Nuxt |
| angular.json | Angular |
| svelte.config.* | SvelteKit |
| vite.config.* + src/App.tsx | React + Vite |
| vite.config.* + src/App.vue | Vue + Vite |
| package.json with react-scripts | Create React App |
| pubspec.yaml with flutter | Flutter |
| package.json with expo | React Native (Expo) |
| .storybook/ directory | Storybook (component library) |
| astro.config.* | Astro |
Step 1.2 -- Detect Existing Visual Testing Tools
| Indicator | Tool |
|---|---|
| .percy.yml or percy in package.json | Percy |
| chromatic in package.json | Chromatic |
| backstop.json or backstop/ directory | BackstopJS |
| playwright.config.* with toHaveScreenshot | Playwright screenshots |
| cypress/ with matchImageSnapshot | Cypress image snapshot |
| .loki/ or loki in package.json | Loki |
| reg-suit.json or reg-suit in package.json | reg-suit |
If no visual testing tool exists, select based on stack:
Step 1.3 -- Discover All Pages and Routes
Build the page inventory by scanning route definitions, page components, and navigation config.
| # | Route | Page Name | Auth Required | Dynamic Content | Priority |
|---|
Priority classification:
============================================================ PHASE 2: TOOL SETUP ============================================================
Step 2.1 -- Install and Configure
FOR PLAYWRIGHT (preferred for web):
Install if needed: npm init playwright@latest
Create or update playwright.config.ts to include:
FOR BACKSTOPJS:
Install: npm install -D backstopjs && npx backstop init
Configure backstop.json:
FOR FLUTTER GOLDEN TESTS:
No extra installation needed. Uses flutter_test matchesGoldenFile.
Configure test/golden/ directory for baseline images.
FOR CHROMATIC (Storybook projects):
Install: npm install -D chromatic Configure: add chromatic script to package.json Set up: CHROMATIC_PROJECT_TOKEN environment variable
Step 2.2 -- Handle Dynamic Content
Dynamic content causes false positive diffs. Set up stabilization:
FREEZE TIME:
MOCK DATA:
HIDE DYNAMIC ELEMENTS:
WAIT FOR STABILITY:
============================================================ PHASE 3: TEST GENERATION ============================================================
Step 3.1 -- Generate Screenshot Tests
FOR PLAYWRIGHT:
Create visual-tests/ directory with one test file per page group:
For each page in the inventory, generate a test that:
Generate tests for EACH breakpoint:
Generate tests for interactive states:
FOR FLUTTER GOLDEN TESTS:
Create test/golden/ directory:
For each widget/screen, generate a test that:
FOR BACKSTOPJS:
Add scenarios to backstop.json for each page with:
Step 3.2 -- Generate Baseline
Run the tests in update mode to create baseline screenshots:
| Tool | Command |
|---|---|
| Playwright | npx playwright test --update-snapshots |
| BackstopJS | npx backstop reference |
| Flutter | flutter test --update-goldens test/golden/ |
| Chromatic | npx chromatic (first run creates baseline) |
Verify baselines are created and look correct. Commit baseline images.
============================================================ PHASE 4: EXECUTION AND COMPARISON ============================================================
Step 4.1 -- Run Comparison Tests
Execute the visual tests against the baselines:
| Tool | Command |
|---|---|
| Playwright | npx playwright test visual-tests/ --reporter=html |
| BackstopJS | npx backstop test |
| Flutter | flutter test test/golden/ |
| Chromatic | npx chromatic |
Step 4.2 -- Analyze Diffs
For each failed comparison:
Step 4.3 -- Handle Results
FOR REGRESSIONS: Note the file and visual difference for the developer to fix. FOR FALSE POSITIVES: Improve stabilization (add masks, increase thresholds). FOR INTENTIONAL CHANGES: Update baselines.
============================================================ SELF-HEALING VALIDATION (max 3 iterations) ============================================================
After generating and running tests, validate:
IF STILL FAILING after 3 iterations:
============================================================ OUTPUT ============================================================
| Page | Route | Mobile | Tablet | Desktop | States Captured |
|---|---|---|---|---|---|
| [name] | [route] | PASS/FAIL | PASS/FAIL | PASS/FAIL | [hover, error, empty, etc.] |
| Page | Breakpoint | Diff % | Category | Description |
|---|
Add to your CI pipeline:
[generated CI config snippet for the detected CI system]NEXT STEPS:
/visual-regression to update baselines."/accessibility-test to check WCAG compliance on the same pages."/e2e to verify functional correctness alongside visual correctness."/test-suite to see overall test health with visual regression coverage."DO NOT:
============================================================ SELF-EVOLUTION TELEMETRY ============================================================
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
~/.claude/projects/skill-telemetry.md in that memory directoryEntry format:
### /visual-regression — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.