/ui-clone-skills:visual-debugfrom ui-clone-skills
Diagnoses why an existing implementation differs from reference evidence using AE/SSIM, pixel, section, computed-style, and transition diffs. Use for post-implementation mismatch or repair guidance.
Ships in ui-clone-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Diagnose an existing implementation against captured reference evidence with structural, AE, DSSIM, runtime, and transition checks.
ui-capture; route implementation, regeneration, and full clone orchestration to ui-reverse-engineering or the active caller.brief/WORKER_BRIEF.md or evidence-pack.json first when present, then only the summaries and named drill-down artifacts needed for the failing hotspot.../ui-reverse-engineering/iteration-discipline.md before the repair loop. Attempt history and stop conditions survive delegation and compaction. Report checker defects with a reproducer unless shared-tool repair is already authorized; never edit an installed cache.Do not read ref/impl images for routine comparison. Start with summaries and AE/SSIM tools. For a failing position, run auto-diagnose.sh; read a diff image only if automated diagnosis finds nothing. Phase E is the required exception and must run in a delegated context.
Pin the reference during iteration. Dynamic sites otherwise compare against a moving target: after the first complete reference capture, use frozen reference crops (RECATCH_REF=0) until evidence is genuinely stale. After any implementation edit, produce fresh implementation evidence before judging the fix.
When evidence contains window.scrollTo, scrollYProgress, setTimeout, velocity, a guard ref around scroll-stop logic, or ScrollTrigger pin/scrub, require scroll state-machine proof of initial → active/expanded → settled/returned; a single endpoint frame is insufficient.
Do not weaken thresholds or mask unexplained regions to clear a failure. Classify each failure as implementation, reference/capture, checker, or unknown before editing.
Close every browser session you opened on success, failure, or interruption:
agent-browser --session <session-name> close
Never use close --all; other agents may own sessions.
Check required tools. If anything is missing, stop and surface the bootstrap command; do not execute a remote installer automatically.
miss=""
for c in agent-browser ffmpeg dssim; do command -v "$c" >/dev/null 2>&1 || miss+=" $c"; done
{ command -v magick >/dev/null 2>&1 || command -v convert >/dev/null 2>&1; } || miss+=" imagemagick"
if [ -n "$miss" ]; then
printf 'Missing system deps:%s\nBootstrap:\n tmp=$(mktemp) && curl -LsSf -o "$tmp" https://raw.githubusercontent.com/voidmatcha/ui-clone-skills/main/install.sh && bash "$tmp" && rm -f "$tmp"\n' "$miss"
exit 1
fi
Resolve scripts from the active plugin or checkout:
SCRIPTS_DIR="${VISUAL_DEBUG_SCRIPTS_DIR:-}"
if [ -z "$SCRIPTS_DIR" ]; then
for root in "${PLUGIN_ROOT:-}" "${CODEX_PLUGIN_ROOT:-}" "${CLAUDE_PLUGIN_ROOT:-}" "${UI_CLONE_ROOT:-}" "$PWD" "$PWD/.." "$PWD/../.." "${INSTALL_DIR:-$HOME/.local/share/ui-clone-skills}"; do
[ -n "$root" ] && [ -f "$root/skills/visual-debug/scripts/ae-compare.sh" ] && SCRIPTS_DIR=$(cd "$root/skills/visual-debug/scripts" && pwd) && break
done
fi
[ -n "$SCRIPTS_DIR" ] || { echo "Set VISUAL_DEBUG_SCRIPTS_DIR or PLUGIN_ROOT" >&2; exit 1; }
Run the scripts as bash "$SCRIPTS_DIR/<script>.sh" .... On hosts without a Skill event (Codex), the first such call is what tells the plugin hooks that this session owns the diagnosis.
Pipe large browser JSON to files; do not print it into the model context. Every agent-browser command needs --session <name>, and every JS eval must be an IIFE.
sections/result.txt, pipeline-state.json, _summary.json, pixel-perfect-diff.json, or the failing gate artifact.stray-absolute-check.sh, relevant transition/spec coverage, reveal/breakpoint checks, then a narrow computed-diff.sh.section-compare.sh for routed post-generation verification and batch-scroll.sh plus batch-compare.sh for a standalone broad sweep. The section command requires the fourth ref-dir argument because the gate reads its sections/result.txt.auto-diagnose.sh. Escalate unresolved failures in order to tree-diff.sh, layout-tree-diff.sh, hover-tree-diff.sh, or keyframes-diff.sh according to the symptom.Read tool-routing.md only when you need exact commands, ONLY_IF_CHANGED, masking rules, or tool selection. Read common-selectors.md only for domain selector sets. Read verification.md only for standalone full capture/verification mechanics. Read comparison-fix.md only when entering the repair loop or dispatching Phase E. Do not load all references up front.
Every position requires all three axes:
| Axis | Tool | Pass condition |
|---|---|---|
| Pixel | AE | AE per image ≤ 500 |
| Perceptual | DSSIM / frame SSIM | SSIM per frame ≥ 0.995 |
| Semantic | delegated Phase E review | PASS, or explicit approval of a known difference |
Computed-style comparison passes with 0 mismatches. AE=500 permits antialiasing variance; dynamic content may use AE=2000 only through the documented dynamic route. These thresholds are contracts and may change only with explicit user approval and recorded rationale.
Phase E is mandatory for full verification and reviews every ref/impl position after AE and DSSIM. Delegate it to the host-native visual-debug-reviewer (a Codex native subagent where available); otherwise use a generic delegated worker with the same contract. Do not retry a rejected role name. Only the verdict table returns to the coordinator. A bounded diagnostic Phase E may inspect representative existing pairs early, but its noncanonical artifact cannot replace final all-position review. See comparison-fix.md.
Return PASS only when all three axes agree and every required row is measured. FAIL, INCOMPLETE, UNMEASURED, stale evidence, or missing artifacts remain incomplete. Then resume the caller's pipeline for implementation and canonical closeout.
agents/openai.yaml (opens in a new tab)common-selectors.md (opens in a new tab)comparison-fix.md (opens in a new tab)evals/evals.json (opens in a new tab)evals/trigger-eval.json (opens in a new tab)prompts/motion-judge.md (opens in a new tab)prompts/section-spec.md (opens in a new tab)prompts/visual-judge.md (opens in a new tab)scripts/ae-compare.sh (opens in a new tab)scripts/alignment-parity-check.sh (opens in a new tab)scripts/alignment-sweep-check.sh (opens in a new tab)scripts/alignment_parity_check.py (opens in a new tab)scripts/animation-spec-compare (opens in a new tab)scripts/asset-placement-check.sh (opens in a new tab)scripts/asset-transfer-check.sh (opens in a new tab)scripts/asset-utilization-check.sh (opens in a new tab)scripts/asset_placement_check.py (opens in a new tab)scripts/auto-diagnose.sh (opens in a new tab)scripts/batch-compare.sh (opens in a new tab)scripts/batch-scroll.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub voidmatcha/ui-clone-skills --plugin ui-clone-skills4 skills in this plugin
/benchmarkLocal-only regression / benchmark skill for ui-clone-skills maintainers.
Drives the standard ui-reverse-engineering pipeline against the canonical
reference site (https://realfood.gov) and records AE/SSIM, iteration count,
gate fail counts, and outcome to benchmark/history.csv so prompt /
sub-doc / model-version drift surfaces as a trend.
Trigger phrases: "run benchmark" / "regression benchmark" / "benchmark
clone". The Makefile no longer has a `benchmark` target — setup is inline
bash in this skill (Step 1 below).
Internal: NOT registered in `.claude-plugin/plugin.json` `skills`. Not part
of the public 3-skill marketplace surface. Maintainer tooling only.
/ui-captureCapture baseline evidence from a live website URL: screenshots, scroll states, hover/click behavior, parallax, timers, and transition recordings. Use when reference artifacts are needed before implementation or comparison; not to build or diagnose a clone./ui-reverse-engineeringClone or recreate a live website URL, page, or section as React + Tailwind with extracted DOM, CSS, assets, responsive layout, motion, and interactions. Use for live-URL implementation or fidelity repair; not capture-only or diff-only requests.Other plugins' skills for the same job