webkit: Skill for Claude Code

.claude/skills/regen-baselines/SKILL.md

regen-baselines is a skill for Claude Code from aziontech/webkit. It costs 51 tokens per session (1,813 once invoked), scanned A, original, MIT.

A process for rebuilding Linux screenshots used as visual-regression baselines, which are reference images that automated tests compare against. It runs the regeneration in CI, the automated build environment, and brings the resulting files back to the branch.

In plain words
What is it for?
Use it when a pull request's visual tests fail after rendering changes or when Storybook stories are added, renamed, removed, or deliberately redesigned.
Why use it?
It avoids unreliable local screenshots caused by differences between operating systems, fonts, and text rendering. It also provides a repeatable way to refresh expected images after intentional visual changes.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is aziontech/webkit's own configuration. It tells Claude Code how to work on webkit 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 webkit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aziontech/webkit. 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/aziontech/webkit/main/.claude/skills/regen-baselines/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/aziontech/webkit

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/aziontech/webkit/regen-baselines/github.svg)](https://agentmods.dev/skills/aziontech/webkit/regen-baselines)
Your own site
<a href="https://agentmods.dev/skills/aziontech/webkit/regen-baselines"><img src="https://agentmods.dev/badge/skills/aziontech/webkit/regen-baselines/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 regen-baselines

Your own site · 80×15
<a href="https://agentmods.dev/skills/aziontech/webkit/regen-baselines"><img src="https://agentmods.dev/badge/skills/aziontech/webkit/regen-baselines.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,813 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.
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.00051 $0.01813
Opus 5.5 $0.00020 $0.00725
Sonnet 5.5 $0.00010 $0.00363
Haiku 4.5 $0.00005 $0.00181

Measured 2mo ago against content hash 751e3264e329, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

.claude/skills/regen-baselines/SKILL.md · 135 lines

How it starts

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

Skill: regen-baselines

Purpose

Refresh the visual-regression baselines that the governance.yml visual job (test:visual:ci) compares every PR against. Baselines live in apps/storybook/.storybook/test-visual/__image_snapshots__/linux/ and are platform-specific: only snapshots rendered on the CI runner (ubuntu) are valid. A local run on macOS renders with different font metrics/AA and would poison the folder — regeneration therefore always happens in CI via the Storybook Regenerate Baseline workflow (app-storybook-generate-baseline.yml), and the resulting artifact is committed manually. This skill is that end-to-end flow.

When to invoke

  • A PR branch merged main and main brought rendering changes (theme tokens, typography), so the branch's committed baselines no longer match what its tree renders.
  • The branch itself changes rendering on purpose (component fix, token change) and the PR's visual job fails with expected diffs.
  • A story was added/renamed/removed and its snapshots must be (re)created or pruned.

Inputs

  • Branch or PR — a branch name, or a PR number/URL to resolve via gh pr view <n> --json headRefName.
  • Modes (optional) — comma-separated subset of the 6-mode matrix ({dark,light} × {desktop,tablet,mobile}, keys in apps/storybook/.storybook/visual-modes.js, e.g. light-desktop,dark-mobile). Empty = full matrix. The mode key is the snapshot filename suffix; the historical dark-desktop snapshot carries no suffix (<story>.png, not <story>--dark-desktop.png).

Workflow

  1. Resolve + preflight. Resolve the branch (from the PR when given) and confirm it exists on origin (git ls-remote --heads origin <branch>). The workflow runs the branch HEAD on origin — anything that must be reflected (e.g. the main merge) has to be pushed first.
  2. Trigger the workflow.
    gh workflow run app-storybook-generate-baseline.yml --ref <branch> -f update_baselines=true [-f modes=<csv>]
    
    update_baselines=true is mandatory — without it the run only builds Storybook and uploads nothing. Then grab the run:
    gh run list --workflow=app-storybook-generate-baseline.yml --branch <branch> --limit 1 --json databaseId,status,url,headSha
    
  3. Wait for completion. ~5 min with warm caches (60 min workflow timeout). Poll gh run view <id> --json status,conclusion every ~30 s until status == "completed". Shell gotcha: never name the poll variable status — it is a read-only special variable in zsh and the loop dies with read-only variable: status. Re-triggering on the same ref cancels the in-progress run (concurrency group), so do not double-fire.
  4. Download the artifact (retention: 7 days) into a fresh temp dir:
    gh run download <id> -n visual-baselines-linux -D <fresh-tmp-dir>
    
  5. Checkout the branch and mirror. git fetch origin <branch> && git checkout <branch> (snapshots folder must be clean), then:
    rsync -a --delete <fresh-tmp-dir>/ apps/storybook/.storybook/test-visual/__image_snapshots__/linux/
    
    The artifact is the complete folder state after the CI run, so --delete correctly propagates snapshots of deleted/renamed stories. Never cherry-pick files out of it.
  6. Review the diff scope before committing. Group the changed files by story and check byte deltas:
    git status --porcelain apps/storybook/.storybook/test-visual/__image_snapshots__/linux/ | awk '{print $1}' | sort | uniq -c
    git diff --stat apps/storybook/.storybook/test-visual/__image_snapshots__/linux/
    
    The changed stories must be explainable by the branch's diff (e.g. a calendar fix touching only components-inputs-calendar--*, or a main merge touching the component its theme fix affects). Unexplained stories = stop and investigate (flake or unintended global change) instead of committing.
  7. Commit only the snapshots folder, push.
    git add apps/storybook/.storybook/test-visual/__image_snapshots__/linux/
    git commit -m "test(storybook): regenerate linux baselines <context>"
    git push origin <branch>
    
    test is commitlint-valid and non-releasing (see release-types). Context examples used on real branches: … after main merge, … for the calendar field contract. No attribution footers (see git-workflow). The push updates the open PR and re-runs its visual job.

Read the full file on GitHub · 135 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. 2mo ago First seen · 135 lines · 51 tokens per session scan A 751e3264e329

Subscribe to this mod's changes

regen-baselines is a skill published in the GitHub repository aziontech/webkit (3 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 1,813 once invoked, about $0.0002 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-08-31.

Related

Other skills, from other repositories