visual-regression

visual-regression is a skill for Claude Code, Codex from jnPiyush/AgentX. It costs 73 tokens per session (2,134 once invoked), scanned A, original, Apache-2.0.

A screenshot comparison process that detects unintended visual differences between versions of a prototype or web app.

In plain words
What is it for?
Use it to compare key screens at standard viewport sizes during iteration or before approving changes to an interface.
Why use it?
It catches layout, styling, or shared-component changes that may break other screens even when the code still builds and functional tests pass.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to compare key screens at standard viewport sizes during iteration or before approving changes to an interface.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jnpiyush/agentx/visual-regression
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jnPiyush/AgentX --skill visual-regression
Clone the repo
git clone --depth 1 https://github.com/jnPiyush/AgentX

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for visual-regression

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnpiyush/agentx/visual-regression/github.svg)](https://agentmods.dev/skills/jnpiyush/agentx/visual-regression)
Your own site
<a href="https://agentmods.dev/skills/jnpiyush/agentx/visual-regression"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/visual-regression/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for visual-regression

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnpiyush/agentx/visual-regression"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/visual-regression.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,134 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 7 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 50
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 129
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 130
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 160
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 164
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 128
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 162
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.02134
Opus 5.5 $0.00029 $0.00854
Sonnet 5.5 $0.00015 $0.00427
Haiku 4.5 $0.00007 $0.00213

Measured 1mo ago against content hash 8f73c828b62e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

visual-regression scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/design/visual-regression/SKILL.md · 243 lines

How it starts

The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Visual Regression

WHEN: A prototype is iterated more than once, or before declaring a prototype review-ready. This skill snapshots the key screens at the canonical breakpoints, diffs new builds against an approved baseline, and fails the audit if drift is unintended. Default engine is Playwright; managed services (Chromatic, Percy, Applitools) are listed for teams that prefer hosted review queues.

When to Use This Skill

  • Iterating a prototype where each change can shift unrelated screens
  • Hardening a working SPA prototype that will inform a production build
  • Catching CSS regressions from token or theme changes
  • Reviewing a PR that touches global styles or shared components

Visual regression complements axe (a11y) and Lighthouse (performance). It does not replace either.

Authoritative Sources

Source What it covers
Playwright Test, Visual comparisons toHaveScreenshot, masking, threshold
Storybook + Chromatic docs Component-level visual review
BrowserStack Percy docs Hosted DOM snapshot + diff
Applitools Eyes docs AI-driven layout-aware diff
Microsoft accessibility-insights and reflect.run Adjacent tooling

Default Engine: Playwright

Reasoning:

  • Already required by development/browser-automation for the axe pass.
  • Free and runs locally and in CI.
  • Deterministic with explicit threshold and animation handling.

Install (per prototype)

npm install --save-dev @playwright/test
npx playwright install --with-deps chromium

Project layout

docs/ux/prototypes/<feature>/
  __screenshots__/
    chromium-darwin/         # baseline images, committed to git
  tests/
    visual.spec.ts
  playwright.config.ts

Baselines live next to the prototype, not in tests/ at the repo root, because they are tied to the prototype version.

Minimal config

playwright.config.ts:

import { defineConfig } from "@playwright/test";

export default defineConfig({
  testDir: "./tests",
  use: {
    baseURL: "http://localhost:4173",
    screenshot: "only-on-failure",
    trace: "retain-on-failure",
  },
  expect: {
    toHaveScreenshot: {
      maxDiffPixelRatio: 0.01,
      animations: "disabled",
      caret: "hide",
      scale: "css",
    },
  },
  projects: [
    { name: "mobile",  use: { viewport: { width: 360,  height: 800  } } },
    { name: "tablet",  use: { viewport: { width: 768,  height: 1024 } } },
    { name: "desktop", use: { viewport: { width: 1440, height: 900  } } },
  ],
});

Read the full file on GitHub · 243 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed 8f73c828b62e
  2. 1mo ago First seen · 243 lines · 73 tokens per session scan A 71284b5999b3

Subscribe to this mod's changes

visual-regression is a skill published in the GitHub repository jnPiyush/AgentX (17 stars, last pushed 2d ago), licensed Apache-2.0. It adds 73 tokens to every session and 2,134 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

a11y-ally

Use when running comprehensive WCAG accessibility audits with axe-core + pa11y + Lighthouse, generating context-aware remediation, or testing video accessibility. Supports 3-tier browser cascade with graceful degradation.

proffesor-for-testing/agentic-qe · 44 tokens

accessibility-testing

WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification. Use when ensuring legal compliance (ADA, Section 508), testing for disabilities, or building accessible applications for 1 billion disabled users globally.

proffesor-for-testing/agentic-qe · 50 tokens

image-compare

Compare two image files on disk and report what changed, region by region. Trigger on "what changed between these two images", "diff these PNGs", "did this render drift", "compare screenshots/exports/renders".

teimurjan/blazediff · 49 tokens

frontend-manual-testing

Use when the task changes anything a user sees in a web app - booting it, driving flows with the browser tools, the four-width check, console/network/keyboard checks and the visual checklist.

makifbaysal/tasktrooper · 44 tokens

visual-proof

Capture before/after screenshot evidence of a web page at real breakpoints (375, 768, 1440) in both light and dark themes, using Playwright against a local dev server or a deployed URL. Use before starting any visual change to capture the current state, and again after to prove the delta. Also use when asked to "show…

frankxai/claude-skills-library · 116 tokens

playwright-scanner

Internal helper: behavioral scans via Playwright for keyboard and state.

Community-Access/accessibility-agents · 18 tokens