AgentX: Skill for Claude Code

.github/skills/design/visual-regression/SKILL.md

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.

This is jnPiyush/AgentX's own configuration. It tells Claude Code and Codex how to work on AgentX itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AgentX configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jnPiyush/AgentX. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/jnPiyush/AgentX/master/.github/skills/design/visual-regression/SKILL.md
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 $0.00036 $0.01067
Sonnet 5 $0.00015 $0.00427
Haiku 4.5 $0.00007 $0.00213

Measured 5d ago against content hash 71284b5999b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 5d 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. 5d 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 (15 stars, last pushed yesterday), licensed Apache-2.0. It adds 73 tokens to every session and 2,134 once invoked, about $0.0004 per session on Opus 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.