agentleFS
KilimiaoSixKilimiaoSix/agent-skills/skills/design-doc-to-ui-visual-audit/SKILL.md

design-doc-to-ui-visual-audit

Skill1 starsChanged 5 months agoMITView on GitHub

Audit visual parity and baseline replication for design-doc-to-ui React and Figma outputs. Use when comparing rendered React route screenshots or Figma frames against approved AI UI images. Scores every required page across layout, components, visual style, typography, assets, and interaction state coverage. Requires each page to reach visual_similarity_score at least 0.80 and fails hard for missing pages, screenshot-only implementations, missing primary navigation/actions, broken interactions/prototype links, wrong language, generic reinterpretations, or material visual drift from approved imagegen designs.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this companion skill from $design-doc-to-ui for React and Figma visual parity gates.

    line 8
  2. Distinctive:

    Do not score from descriptions alone.

    line 20
  3. Very specific:

    Every required page must have visual_similarity_score >= 0.80.

    line 52
  4. Distinctive:

    Do not allow the average score to hide a failed page.

    line 54
  5. Very specific:

    call out missing controls/states/assets.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design Doc To UI Visual Audit

Use this companion skill from $design-doc-to-ui for React and Figma visual parity gates.

Inputs

Required:

  • ui-run.json;
  • approved AI page images;
  • rendered React route screenshots or Figma frame screenshots;
  • structured design document;
  • page briefs and worker reviews.

Do not score from descriptions alone. If screenshots are unavailable, mark the audit blocked.

Scoring Rubric

Score each page out of 100:

  • layout and information hierarchy: 25;
  • component completeness: 20;
  • color, material, and visual style: 20;
  • typography, copy language, and density: 15;
  • key images, icons, and decorative assets: 10;
  • interaction states and prototype links: 10.

Convert the page score to visual_similarity_score by dividing by 100.

Baseline replication is a separate qualitative check. A page passes this check only when the implementation preserves the approved AI image's major regions, section order, visual density, component shape language, key imagery, primary actions, and state presentation. A generic redesign that covers the same requirements but does not look like the approved image fails even if individual rubric categories seem partially satisfied.

For React, also check interaction fidelity:

  • primary navigation targets load the intended route;
  • primary buttons produce the declared route, modal, toast, or state change;
  • controls that look interactive actually update state or are explicitly disabled/blocked;
  • declared success, error, empty, loading, modal, blocked, and quota states are reachable or documented as unavailable.

For Figma, also check prototype-link fidelity:

  • primary navigation and main actions have prototype links where Figma supports them;
  • modal/state/recovery flows are linked or clearly annotated;
  • frames are editable reconstructions, not pasted full-screen images.

Pass/Fail Rules

  • Every required page must have visual_similarity_score >= 0.80.
  • Global average is advisory only.
  • Do not allow the average score to hide a failed page.
  • Hard fail when a required page is missing, the implementation is a full-screen screenshot/image browser, baseline replication fails, primary navigation/main actions are absent, React interactions are broken, Figma primary prototype links are missing, language is wrong, or material visual drift is obvious.

Repair Guidance

For each failed page, produce concise repair prompts:

  • name the missing/mismatched sections;
  • identify style drift;
  • call out missing controls/states/assets;
  • state whether repair belongs in React, Figma, or asset generation.

Audit Output

Write qa/visual-parity-audit.json:

{
  "passed": true,
  "target": "react",
  "page_scores": [
    {
      "page_id": "home",
      "visual_similarity_score": 0.84,
      "baseline_replica_passed": true,
      "interaction_or_prototype_links_passed": true,
      "layout": 22,
      "components": 18,
      "style": 17,
      "typography": 13,
      "assets": 7,
      "interactions": 7,
      "notes": "Main structure and actions match; minor card spacing drift."
    }
  ],
  "global_average": 0.84,
  "hard_failures": [],
  "repair_prompts": []
}

Set target to react or figma. Do not mark passed: true unless every required page passes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.