Agent Skillsmtarcure/claude-vibe-squad › visual-regression-baseline

visual-regression-baseline

GitHub

用于生成和对比 UI 视觉回归基线,确保截图条件一致并屏蔽动态区域,通过像素/感知差异分析识别界面漂移或回归。

.claude/skills/visual-regression-baseline/SKILL.md mtarcure/claude-vibe-squad

Trigger Scenarios

需要验证 UI 渲染是否发生非预期变化 建立稳定的视觉参考基准

Install

npx skills add mtarcure/claude-vibe-squad --skill visual-regression-baseline -g -y
More Options

Non-standard path

npx skills add https://github.com/mtarcure/claude-vibe-squad/tree/main/.claude/skills/visual-regression-baseline -g -y

Use without installing

npx skills use mtarcure/claude-vibe-squad@visual-regression-baseline

指定 Agent (Claude Code)

npx skills add mtarcure/claude-vibe-squad --skill visual-regression-baseline -a claude-code -g -y

安装 repo 全部 skill

npx skills add mtarcure/claude-vibe-squad --all -g -y

预览 repo 内 skill

npx skills add mtarcure/claude-vibe-squad --list

SKILL.md

Frontmatter
{
    "name": "visual-regression-baseline",
    "type": "skill",
    "audience": "specialist",
    "description": "Use when a known-good render and candidate captures must be compared reproducibly: lock viewport, scale, theme, locale, and time; mask declared dynamic regions; produce tolerance-bounded pixel\/perceptual deltas; and classify each delta before replacing the reference set."
}

Visual Regression Baseline

Capture stable, comparable visual references so a UI/render change can be judged as intended design movement vs. accidental drift — a deterministic diff, not a screenshot glance.

Steps

  1. Define the capture set. Enumerate the states that must be verified: routes/screens, key components, breakpoints (mobile/tablet/desktop), theme variants (light/dark), and salient interaction states (hover/focus/error/empty/loading). Each entry is one named, reproducible capture.
  2. Establish the baseline. On the known-good build, capture each entry to an immutable, named reference (via chrome-devtools/playwright take_screenshot/browser_take_screenshot, fresh Chrome). Record the capture conditions with it: viewport size, device-scale factor, color scheme, locale, and the app build/commit. A baseline without its conditions is not a baseline.
  3. Neutralize non-determinism BEFORE diffing. Freeze or mask sources of pixel noise that are not the change under test: fixed clock/seeded RNG, disabled animations/transitions, stable fonts (wait for webfont load), and masked dynamic regions (timestamps, avatars, ads, carousels, generated IDs). Masks are declared per-entry and versioned with the baseline — an unmasked dynamic region is a false FAIL.
  4. Re-capture deterministically. On the candidate build, re-capture the SAME set under the SAME recorded conditions. Any condition mismatch (viewport, scale, theme, locale) invalidates the comparison — re-capture, do not diff across conditions.
  5. Diff and compare. Compare candidate vs. baseline per entry. Use a pixel/perceptual diff with a declared tolerance (anti-aliasing/sub-pixel threshold) and the entry's masks applied. Produce a diff artifact (highlighted delta image) for every non-identical entry.
  6. Human/view_image review of diffs. A non-zero diff is a SIGNAL, not a verdict. Review each diff image (view_image on the codex lane, or a lane image-read) and classify: intended (accept → promote to the new baseline, with a note on what changed and why), or regression (reject). Never auto-accept a diff to silence it.

What counts as a regression FAIL

  • A visual delta outside tolerance in an UNmasked region that was NOT an intended, reviewed change.
  • A capture that could not be produced under the recorded conditions (broken render, crash, missing state).
  • A diff accepted without human/view_image classification (an unreviewed baseline promotion is itself a FAIL).

Acceptance

  • Every verified state has a named baseline WITH its recorded capture conditions and declared masks.
  • Candidate captures are produced under identical conditions; cross-condition diffs are rejected, not tolerated.
  • Every non-identical entry has a diff artifact AND a human/view_image classification (intended vs regression).
  • Baseline promotion is explicit and attributed; dynamic-region masking is versioned with the baseline.
  • The tool's numeric diff is never the sole verdict — an out-of-tolerance unmasked delta blocks acceptance until reviewed, and a masked/tolerated delta is documented, not hidden.

Version History

  • d5262e2 Current 2026-09-11 11:49

Same Skill Collection

.agents/skills/accessible-media-authoring/SKILL.md
.agents/skills/agent-prompt-engineering/SKILL.md
.agents/skills/agentic-safety-audit/SKILL.md
.agents/skills/audio-event-map-authoring/SKILL.md
.agents/skills/auto-scaffold/SKILL.md
.agents/skills/claim-verification/SKILL.md
.agents/skills/code-reachability-audit/SKILL.md
.agents/skills/code-review-loop/SKILL.md
.agents/skills/color-theory/SKILL.md
.agents/skills/conversation-design/SKILL.md
.agents/skills/copy-refinement/SKILL.md
.agents/skills/cross-file-relationship-synthesis/SKILL.md
.agents/skills/dependency-cycle-audit/SKILL.md
.agents/skills/dependency-health-triage/SKILL.md
.agents/skills/detection-as-code/SKILL.md
.agents/skills/diff-aware-semgrep-scan/SKILL.md
.agents/skills/differential-review/SKILL.md
.agents/skills/dimensional-analysis-check/SKILL.md
.agents/skills/dual-level-retrieval/SKILL.md
.agents/skills/figma-implement-design/SKILL.md
.agents/skills/forensic-timeline-authoring/SKILL.md
.agents/skills/game-design-fundamentals/SKILL.md
.agents/skills/game-mechanics-balancing/SKILL.md
.agents/skills/head-tail/SKILL.md
.agents/skills/incident-response-runbook/SKILL.md
.agents/skills/interactive-audio-design/SKILL.md
.agents/skills/interface-ambiguity-check/SKILL.md
.agents/skills/keyword-clustering/SKILL.md
.agents/skills/knowledge-base-integration/SKILL.md
.agents/skills/layered-analysis-loop/SKILL.md
.agents/skills/level-design-patterns/SKILL.md
.agents/skills/locale-adaptation/SKILL.md
.agents/skills/narrative-structure/SKILL.md
.agents/skills/platform-compliance/SKILL.md
.agents/skills/player-engagement-psychology/SKILL.md
.agents/skills/requirements-elicitation/SKILL.md
.agents/skills/rule6-rights-gate/SKILL.md
.agents/skills/rule8-truth-gate/SKILL.md
.agents/skills/sandbox-provision-discipline/SKILL.md
.agents/skills/scope-decomposition/SKILL.md
.agents/skills/scope-estimation/SKILL.md
.agents/skills/security-ownership-map/SKILL.md
.agents/skills/security-threat-model/SKILL.md
.agents/skills/semgrep-rule-author/SKILL.md
.agents/skills/skill-description-trigger-authoring/SKILL.md
.agents/skills/sound-design-principles/SKILL.md
.agents/skills/structured-data-authoring/SKILL.md
.agents/skills/supply-chain-audit/SKILL.md
.agents/skills/take-over-resume/SKILL.md
.agents/skills/technical-seo-audit/SKILL.md

Metadata

Files
0
Version
d5262e2
Hash
54a327ec
Indexed
2026-09-11 11:49

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-16 06:54
浙ICP备14020137号-1 $방문자$