regen-baselines

A command that regenerates Linux screenshots used as visual reference images for a pull request. It runs the process in continuous integration, which is the project's automated build environment.

In plain words
What is it for?
Use it when a pull request needs updated visual-test screenshots, passing a branch, pull request number, or pull request URL, with optional modes to limit what is regenerated.
Why use it?
It avoids mismatches caused by creating screenshots on macOS when the visual check compares against Linux images. It also checks that changed screenshots are explained by the branch.

Command for Claude Code

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.

agentmods
npx agentmods add commands/aziontech/webkit/regen-baselines
Clone the repo
git clone --depth 1 https://github.com/aziontech/webkit

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 463 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00463
Opus 5 $0.00000 $0.00231
Sonnet 5 $0.00000 $0.00093
Haiku 4.5 $0.00000 $0.00046

Measured yesterday against content hash 8b464351abca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

regen-baselines 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 yesterday.

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.

.claude/commands/regen-baselines.md · 32 lines

What it actually says

/regen-baselines <branch | pr-number | pr-url> [modes]

Regenerate the Linux visual baselines for a PR branch in CI and land them on the branch. Never generate baselines locally — macOS rendering does not match the linux/ snapshots the PR visual gate (governance.ymltest:visual:ci) compares against.

Run the regen-baselines skill (.claude/skills/regen-baselines/SKILL.md). It:

  1. Resolves the branch (from the PR number/URL when given) and confirms the state to snapshot — e.g. the main merge/rebase — is already pushed to origin.
  2. Triggers Storybook Regenerate Baseline (.github/workflows/app-storybook-generate-baseline.yml) with update_baselines=true, optionally narrowing to a modes subset.
  3. Waits for the run (~5 min with warm caches) and downloads the visual-baselines-linux artifact into a fresh temp dir.
  4. Mirrors it into apps/storybook/.storybook/test-visual/__image_snapshots__/linux/ with rsync -a --delete, so deletions of stale snapshots propagate.
  5. Reviews the diff scope — every changed story must be explainable by the branch's changes; unexplained stories stop the flow.
  6. Commits only the snapshots folder (test(storybook): regenerate linux baselines …) and pushes, updating the PR.

modes is a comma-separated subset of the matrix in apps/storybook/.storybook/visual-modes.js (e.g. light-desktop,dark-mobile); empty = the full {dark,light} × {desktop,tablet,mobile} cross product. The dark-desktop snapshot is the historical unsuffixed <story>.png.

Conflict recovery: when main and the branch both regenerated the same snapshots, finish the merge/rebase first (any side of a conflicted PNG is fine — it is about to be overwritten), push, then run this flow so the committed baselines come from the merged tree.

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. yesterday First seen · 32 lines · 0 tokens per session scan A 8b464351abca

Subscribe to this mod's changes

regen-baselines is a command published in the GitHub repository aziontech/webkit (2 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 463 tokens. 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-08-31.