Agent skill

Economical Visual Tests

by igrlk in igrlk/storybook-addon-test-codegen

Author economical visual tests — full visual coverage in the fewest billable snapshots.

MITAuto-check passedTesting & QA

Install Economical Visual Tests

skills CLI
$ npx skills add igrlk/storybook-addon-test-codegen --skill economical-visual-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install igrlk/storybook-addon-test-codegen economical-visual-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/igrlk/storybook-addon-test-codegen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/economical-visual-tests .claude/skills/economical-visual-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
economical-visual-tests
GitHub stars
154
Used in
1 other repo
Token cost
~1.1k tokens
SKILL.md length
395 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Author economical visual tests — full visual coverage in the fewest billable snapshots.

  • A components variants/states are exploding into one snapshot per combination
  • SKILL.md covers Move 1 — one "all variants"…, Move 2 — drive states from…, The tradeoff — say it out… and Estimate the win, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • The visual-testing bill

What it does

Economical Visual Tests is an agent skill from igrlk/storybook-addon-test-codegen. Author economical visual tests — full visual coverage in the fewest billable snapshots. Applies to any per-snapshot visual tool (UI Verify, Chromatic, Percy, Playwright screenshots), which all bill and diff per rendered story/test. Use when a component's variants/states are exploding into one snapshot per combination, when the visual-testing bill or noise is driven by snapshot count, or when writing new stories/captures and you want the cheapest layout that still covers every variant. Covers gallery/matrix…

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Visual regression testing and Browser testing. It works with Playwright and Storybook. The repository describes itself as: Addon for Storybook that generates test code for your stories. The licence is MIT.

When your agent uses it

  • A components variants/states are exploding into one snapshot per combination
  • The visual-testing bill
  • Noise is driven by snapshot count
  • Writing new stories/captures and you want the cheapest layout that still covers every variant

Example prompts

  • “/economical-visual-tests”

What it can do on your machine

Read from SKILL.md and the folder at commit cdfbf4e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Economical Visual Tests loads about 1.1k tokens when it runs. Until then it costs about 150 tokens; SKILL.md has 395 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~150
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from igrlk/storybook-addon-test-codegen at commit cdfbf4e, republished under its MIT licence (© igrlk). 395 words, ~1,064 tokens.

Download SKILL.mdSave it as .claude/skills/economical-visual-tests/SKILL.md (or your agent's skills folder).
name
economical-visual-tests
description
Author economical visual tests — full visual coverage in the fewest billable snapshots. Applies to any per-snapshot visual tool (UI Verify, Chromatic, Percy, Playwright screenshots), which all bill and diff per rendered story/test. Use when a component's variants/states are exploding into one snapshot per combination, when the visual-testing bill or noise is driven by snapshot count, or when writing new stories/captures and you want the cheapest layout that still covers every variant. Covers gallery/matrix stories, data-driven states, and the coarse-granularity tradeoff.

Author economical visual tests

Every per-snapshot visual tool — UI Verify, Chromatic, Percy, Playwright screenshots — renders and bills per story. So the number of stories is the cost and the noise surface. The naive pattern (one story per variant × state × theme) multiplies both fast: a component with 5 sizes × 3 states × 2 themes is 30 snapshots the naive way. This skill collapses that to a handful while keeping full coverage.

The technique is tool-agnostic; the payoff (fewer billed shots, fewer places to flake) is the same everywhere.

Move 1 — one "all variants" gallery story, not N stories

Render the whole matrix together in a single story: a grid of every size/state side by side. One snapshot then covers the entire matrix.

tsx
// Button.stories.tsx — ONE story covers every size × variant
export const AllVariants = () => (
  <div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(3, max-content)' }}>
    {(['sm', 'md', 'lg'] as const).flatMap((size) =>
      (['primary', 'secondary', 'danger'] as const).map((variant) => (
        <Button key={`${size}-${variant}`} size={size} variant={variant}>
          {size}/{variant}
        </Button>
      )),
    )}
  </div>
);

9 buttons, 1 snapshot instead of 9.

Move 2 — drive states from data/props, not from N stories

For a component that normally fetches, don't write a story per response state. Render each state from a fixed fixture — a table of props/mock-responses — in one story. Deterministic input in, deterministic pixels out, many states, few shots.

tsx
const CASES = [
  { label: 'empty',   items: [] },
  { label: 'one',     items: [fixtures.one] },
  { label: 'many',    items: fixtures.many },
  { label: 'error',   error: 'Failed to load' },
];

export const AllStates = () => (
  <div style={{ display: 'grid', gap: 24 }}>
    {CASES.map((c) => (
      <section key={c.label}>
        <h4>{c.label}</h4>
        <List items={c.items} error={c.error} />
      </section>
    ))}
  </div>
);

(If the component fetches internally rather than taking props, mock the request instead — see storybook-visual-testing, "mock data." The point is the same: fixtures, not N stories.)

Show full SKILL.md (195 more words)Show less

The tradeoff — say it out loud, don't just merge everything

Consolidating into one snapshot is coarser granularity: a diff anywhere in the gallery flags the whole story, and you lose the per-variant baseline/accept. So this is a balance, not "merge everything":

  • Merge variants that change together and share one component — a pure component matrix (sizes, states, themes of one Button). This is where consolidation wins cleanly.
  • Keep separate genuinely independent surfaces — different pages, different flows, things that evolve on their own timelines. Collapsing those just couples unrelated diffs.
  • UI Verify's AI review + per-region diff soften the coarse-granularity cost (it can tell you which cell in the gallery moved), so lean toward consolidation for component matrices.

Estimate the win

When you refactor, state the delta so the value is legible:

This collapses 28 stories → 2 snapshots (the size×variant×theme matrix into one gallery, the four data states into one story). ~93% fewer billed shots, same coverage.

Anti-patterns

  • One story per prop combination → gallery story (move 1).
  • One story per fetch state (Loading, Empty, Error, Loaded as four stories) → one data-driven story (move 2).
  • Merging independent pages into one snapshot → over-consolidation; you've coupled unrelated diffs. Keep those separate.

© igrlk, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/economical-visual-tests of igrlk/storybook-addon-test-codegen.

Open the folder on GitHubat commit cdfbf4e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in igrlk/storybook-addon-test-codegen, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Economical Visual Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Economical Visual Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Economical Visual Tests this skilligrlk/storybook-addon-test-codegen1541 repos~1.1kAutomated safety check: PassMIT
Computed Stylesbitovi/ai-enablement-prompts121—~2.4kAutomated safety check: PassMIT
Sanity Visual Regressionsanity-io/sanity6.4k—~3.4kAutomated safety check: PassMIT
Smartui Skillsickn33/agentic-awesome-skills47k1 repos~1.1kAutomated safety check: PassMIT
Triaging Visual Review RunsPostHog/posthog40k—~9.1kAutomated safety check: PassCustom licence
Visual Testingpetrkindlmann/qa-skills168—~4.5kAutomated safety check: PassMIT

Similar skills

  • Computed Styles

    bitovi/ai-enablement-prompts

    Extract and compare computed CSS styles between a baseline URL and a dev/Storybook URL using Playwright MCP evaluate calls.

    121 GitHub stars~2.4k tokensUpdated 29 days ago
    Testing & QAAuto-check passed
  • Sanity Visual Regression

    sanity-io/sanity

    Official

    Add, review, and maintain Chromatic visual regression coverage in the Sanity monorepo via dev/storybook stories, the vitest browser-mode suite, and Playwright e2e snapshots.

    6.4k GitHub stars~3.4k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Smartui Skill

    sickn33/agentic-awesome-skills

    Generates SmartUI visual regression test configurations for screenshot comparison on TestMu AI cloud.

    47k GitHub starsUsed in 1 repo~1.1k tokens
    Testing & QAAuto-check passed
  • Official

    Inspects PostHog Visual Review (VR) runs that gate PR merges with screenshot regression checks.

    40k GitHub stars~9.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Visual Testing

    petrkindlmann/qa-skills

    Implement visual regression testing with Playwright screenshots, Chromatic, Percy, and Argos CI.

    168 GitHub stars~4.5k tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Visual Diff

    bitovi/ai-enablement-prompts

    Compare a baseline URL against a dev or Storybook URL by taking Playwright screenshots at multiple breakpoints, running a pixel-level image diff, and reporting results to guide style and HTML…

    121 GitHub stars~2.9k tokensUpdated 29 days ago
    Frontend & DesignAuto-check passed

More from igrlk/storybook-addon-test-codegen

  • Check Visual Changes

    igrlk/storybook-addon-test-codegen

    Check the visual impact of an edit mid-task with uiverify check — render just the components you're touching on the UI Verify fleet and diff them against the real CI baseline, without opening a PR…

    154 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Triage Visual Changes

    igrlk/storybook-addon-test-codegen

    Triage a UI Verify build from your coding agent via the UI Verify MCP — bucket a build's changed stories into real regressions vs cosmetic reflow vs rendering noise, summarize the real regressions…

    154 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Storybook Visual Testing

    igrlk/storybook-addon-test-codegen

    Make Storybook stories deterministic for UI Verify so captures stop coming back "changed" without a real change (flaky diffs).

    154 GitHub stars~1.9k tokensUpdated 26 days ago
    Auto-check passed
  • Making UI Changes

    igrlk/storybook-addon-test-codegen

    Read before changing any component, page, or styles. An agent skill from igrlk/storybook-addon-test-codegen.

    154 GitHub starsUsed in 1 repo~493 tokens
    Auto-check passed

Categories

Questions about Economical Visual Tests

What does Economical Visual Tests do?

Author economical visual tests — full visual coverage in the fewest billable snapshots. Economical Visual Tests is an agent skill from igrlk/storybook-addon-test-codegen. Author economical visual tests — full visual coverage in the fewest billable snapshots.

When should I use Economical Visual Tests?

Economical Visual Tests fits situations like: A components variants/states are exploding into one snapshot per combination; the visual-testing bill; noise is driven by snapshot count; writing new stories/captures and you want the cheapest layout that still covers every variant.

How do I install Economical Visual Tests in Claude Code?

Run `npx skills add igrlk/storybook-addon-test-codegen --skill economical-visual-tests -a claude-code`. Or copy the skill folder (.agents/skills/economical-visual-tests in igrlk/storybook-addon-test-codegen) into .claude/skills/economical-visual-tests in your project. Claude Code loads it when a task matches its description.

How do I install Economical Visual Tests in Codex?

Run `npx skills add igrlk/storybook-addon-test-codegen --skill economical-visual-tests -a codex`. Or copy the skill folder (.agents/skills/economical-visual-tests in igrlk/storybook-addon-test-codegen) into .agents/skills/economical-visual-tests in your project. Codex loads it when a task matches its description.

Can I use Economical Visual Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add igrlk/storybook-addon-test-codegen --skill economical-visual-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/economical-visual-tests, .gemini/skills/economical-visual-tests, .github/skills/economical-visual-tests and .opencode/skills/economical-visual-tests in your project.

What does Economical Visual Tests need to run?

SKILL.md names no scripts, command-line tools or credentials: Economical Visual Tests is instructions for the agent only.

Does Economical Visual Tests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Economical Visual Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Economical Visual Tests use?

Economical Visual Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Economical Visual Tests use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Economical Visual Tests?

Skills that share tags, products or a category with Economical Visual Tests: Computed Styles (bitovi/ai-enablement-prompts, 121 stars), Sanity Visual Regression (sanity-io/sanity, 6.4k stars), Smartui Skill (sickn33/agentic-awesome-skills, 47k stars) and Triaging Visual Review Runs (PostHog/posthog, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Economical Visual Tests?

igrlk (a GitHub user) maintains it in igrlk/storybook-addon-test-codegen, which has 154 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 13, 2026.

Source: igrlk/storybook-addon-test-codegen on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.