vrt-css-fix-loop

Iterates a VLM-LLM pipeline to repair deliberately mutated CSS until pixel diff falls below threshold.

22|1|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/mizchi/vlmkit --skill vrt-css-fix-loop-mizchi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vrt-css-fix-loop
Source: https://github.com/mizchi/vlmkit/tree/main/.apm/skills/vlmkit/workflows/vrt-css-fix-loop
Command: npx skills add https://github.com/mizchi/vlmkit --skill vrt-css-fix-loop-mizchi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Benchmarking whether a vision-language model can understand and recover a known CSS regression requires a controlled, repeatable harness. This Skill automates that loop: it mutates a fixture's CSS, renders baseline and variant pages, asks a VLM to list the visual changes from the diff, has an LLM emit concrete CSS fixes, and re-measures until the diff converges. ## Core Features & Use Cases - Two-stage repair pipeline: Stage 1 sends the diff overlay to a VLM which produces a structured CHANGE list (selector { prop: from → to }); Stage 2 hands that list plus current CSS to an LLM that emits the actual edits, compensating for VLM imprecision. - Deterministic mutation modes: property mode deletes one CSS property; selector mode deletes a full selector block, with the seed deterministically selecting what is removed. - Multi-provider VLM benchmarking: model selection via VLMKIT_VLM_MODEL with OpenRouter (default), gemini:, and claude: prefixes, while the Stage-2 LLM is held constant for apples-to-apples VLM comparison. - Use Case: Compare ui-tars-1.5-7b against claude-haiku on the canonical hard case (seed 11, selector mode) by running the loop with each model and scoring the CHANGE lists against the known removed block. ## Quick Start Run the fix loop on the page fixture with seed 42 by executing node --experimental-strip-types src/experiments/css-challenge/fix-loop.ts --fixture page --seed 42 after loading your API keys from .env.local.

Frequently Asked Questions about vrt-css-fix-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I benchmark a VLM model on CSS regression repair?

Run fix-loop.ts with --fixture, --seed, and set VLMKIT_VLM_MODEL to your model id. The harness mutates the CSS, has the VLM list changes from the diff, an LLM emits fixes, and the loop repeats until diffRatio falls below the threshold.

What is the difference between property and selector mode in fix-loop?

Property mode deletes a single CSS property, while selector mode deletes an entire selector block, making recovery harder. The seed deterministically maps to which property or block is removed; seed 11 in selector mode is the canonical hard benchmark case.

Which VLM models work best for UI diff understanding?

The docs recommend bytedance/ui-tars-1.5-7b as default (UI-domain-trained, near-zero cost) and claude:claude-haiku-4-5 for prose root-cause analysis. Avoid llama-4-scout, llama-4-maverick, and gemini-2.5-flash-lite, which regressed or hallucinated in benchmarks.

Can I use fix-loop for production self-healing on my own repo?

No. The harness only knows fixtures registered in css-challenge-fixtures.ts; adapting to a new repo requires writing a fixture entry with goal CSS first. For arbitrary repos, use vrt-visual-diff to surface regressions and edit by hand.

Why does a run show FIXED even when the VLM missed the removed block?

FIXED means the two-stage pipeline converged, not that the VLM understood the diff. The Stage-2 LLM can compensate for inaccurate VLM proposals, so to grade the VLM itself, score its CHANGE list against the known removed block.