agentleFS
aiFabricoComaiFabricoCom/fabrico-collections/.claude/skills/fabrico-ui-verifying/SKILL.md

fabrico-ui-verifying

Skill2 starsChanged 4 months agoMITView on GitHub

UI verification criteria, structure checklists, severity definitions, and tolerance rules for comparing implementations against Figma designs. Use for verifying UI matches design, understanding what to check, and determining acceptable differences.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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. Distinctive:

    Use the checklist below and track your progress:

    line 12
  2. Distinctive:

    Before starting verification, confirm:

    line 25
  3. Very specific:

    Check the project configuration (package.json scripts, .env, vite.config, next.config, etc.) for the configured port

    line 29
  4. Distinctive:

    Use the user-confirmed URL for all subsequent verifications in the same session

    line 31
  5. Distinctive:

    If the page redirects to a login/authentication screen: stop and ask the user — "The page redirected to [login URL].

    line 34
  6. Distinctive:

    If the page shows unexpected content (error page, blank page, different route): stop and ask the user — "The page at [URL] shows …

    line 35
  7. Distinctive:

    If any input is missing or any blocker is encountered, stop and ask the user — do not proceed, do not fall back to code-level review, do …

    line 37
  8. Very specific:

    Use the figma MCP server (tools mcp__figma__*) to extract the design specifications:

    line 41
  9. Very specific:

    Use the playwright MCP server (tools mcp__playwright__*) to capture the running implementation.

    line 51
  10. Distinctive:

    Always verify in this order — complete ALL categories regardless of findings.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

UI Verification

Verification process, criteria, and tolerances for comparing UI implementations against Figma designs.

Verification Process

Use the checklist below and track your progress:

Progress:
- [ ] Step 1: Validate inputs
- [ ] Step 2: Get EXPECTED from Figma
- [ ] Step 3: Get ACTUAL from implementation
- [ ] Step 4: Compare using verification categories
- [ ] Step 5: Generate report

Step 1: Validate inputs

Before starting verification, confirm:

  • Figma URL is available for the component/section being verified
  • Dev server URL is confirmed by the user:
    • Check the project configuration (package.json scripts, .env, vite.config, next.config, etc.) for the configured port
    • MANDATORY: On first verification in a session, ask the user to confirm the dev server URL (e.g., "I detected port 3001 from package.json — is the frontend app running at http://localhost:3001?"). Do not guess from running processes, ps, netstat, or lsof output — multiple services may run on different ports and you cannot reliably distinguish frontend from backend.
    • Use the user-confirmed URL for all subsequent verifications in the same session
  • Dev server is running and the target page is accessible at that URL:
    • Navigate to the specific page URL using the playwright MCP server (tools mcp__playwright__*)
    • If the page redirects to a login/authentication screen: stop and ask the user — "The page redirected to [login URL]. How should I authenticate? Please provide credentials, a session token, or tell me how to bypass authentication for local development."
    • If the page shows unexpected content (error page, blank page, different route): stop and ask the user — "The page at [URL] shows [description]. Is this the correct URL for [component name]?"
    • Do not proceed with verification if you cannot see the expected component. Ask the user for help.
  • If any input is missing or any blocker is encountered, stop and ask the user — do not proceed, do not fall back to code-level review, do not skip the verification step

Step 2: Get EXPECTED from Figma

Use the figma MCP server (tools mcp__figma__*) to extract the design specifications:

  • Layer hierarchy and component structure
  • Layout direction, alignment, spacing
  • Frame widths relative to page — these determine whether containers should be narrow/centered or full-width
  • Typography, colors, radii, shadows
  • Component variants and states

Step 3: Get ACTUAL from implementation

Use the playwright MCP server (tools mcp__playwright__*) to capture the running implementation. You MUST collect all three types of data — a verification that skips any type is incomplete:

  1. Structure & content — element hierarchy, order, grouping (via accessibility snapshot)
  2. Actual rendered dimensions — computed widths, heights, paddings, margins, gaps of every major container (via JavaScript evaluation of computed styles). This is the most commonly missed step — without it you cannot detect sizing/layout differences.
  3. Visual appearance — full-page screenshot for side-by-side comparison with the design. Save screenshots to the task's specifications folder (e.g., specifications/<task-id>/screenshots/) with descriptive filenames including the component name and iteration number (e.g., establishment-details-form-iteration-1.png). This creates a visual audit trail for each verification cycle.

CRITICAL: The accessibility tree does NOT contain CSS dimensions. A full-width container and a narrow centered container produce identical accessibility trees. If you only collected structure without measuring actual rendered dimensions, your verification is INVALID — mark confidence as LOW and report what's missing.

Step 4: Compare using verification categories

Compare EXPECTED (Figma) against ACTUAL (implementation) following the Verification Order and Categories below. The Figma design is the source of truth for every comparison. When in doubt, the design wins.

IMPORTANT: Complete ALL verification categories in a single pass. Do not stop after finding differences in one category — continue through every category and collect every difference. The report must contain ALL differences found across all categories so the engineer can fix them all at once, minimizing verification iterations.

Step 5: Generate report

Produce a structured report following the Report Format below. Include exact values from both Figma and implementation for every difference found.

Verification Order

Always verify in this order — complete ALL categories regardless of findings. Do not stop after finding differences in one category. The goal is to catch every difference in a single pass so all fixes can be applied at once.

  1. Structure (CRITICAL)
  2. Layout (CRITICAL)
  3. Dimensions (CRITICAL)
  4. Visual (CRITICAL)
  5. Components

Verification Categories

Structure (CRITICAL)

CheckDescription
Container hierarchyDoes DOM structure match Figma's layer hierarchy?
Nesting depthAre elements nested at the same level as in Figma?
GroupingAre related elements grouped together as in design?
Element orderIs the visual order of elements the same?
Wrapper elementsAre there extra/missing wrapper divs that change layout?
Sections presentAre ALL sections from Figma present in implementation?

Layout (CRITICAL)

CheckDescription
Flex/Grid directionrow vs column, wrap behavior
Alignmentjustify-content, align-items values
DistributionHow space is distributed between elements
Positioningrelative, absolute, fixed - matches design intent?
CenteringIs content centered as in design?

Dimensions (CRITICAL)

CheckDescription
Container widthmax-width, fixed width constraints
Card/panel boundariesDoes card have same width as in Figma?
Content area vs viewportRatio of content width to available space
Width/HeightFixed, percentage, auto, min/max constraints
SpacingPadding, margin, gap between elements
GapsSpace between flex/grid children

WARNING: Accessibility tree does NOT contain CSS dimensions. A full-width container and a narrow centered one look identical in it. You must measure actual computed styles to detect width/sizing differences.

Visual

CheckDescription
Typographyfont-family, size, weight, line-height, letter-spacing
ColorsText, background, border colors
Radiiborder-radius values
Shadowsbox-shadow, drop-shadow
BackgroundsSolid, gradient, image

Components

CheckDescription
Correct variantsIs the right variant of a component used?
Design tokensAre correct tokens used (not hardcoded values)?
Stateshover, focus, active, disabled states

Tolerances

CategoryToleranceNotes
StructureNoneAny structural difference = FAIL
Layout directionNonerow vs column must match exactly
AlignmentNoneCentering, justify, align must match
Dimensions1-2pxOnly for browser rendering variance
ColorsExact matchMust use correct design tokens
TypographyExact matchFont properties must match
Spacing1-2pxOnly for browser rendering variance

Severity Definitions

SeverityDescriptionAction
CriticalStructure/layout differences, wrong component usedMust fix immediately
MajorDimensions off by >2px, wrong colors/typographyMust fix before merge
Minor1-2px browser rendering varianceAcceptable, document if recurring

Verification Checklist

Before reporting PASS:

  • Verified ENTIRE page (scrolled from top to bottom)
  • All sections from Figma are present in implementation
  • Container hierarchy matches Figma layers
  • Flex/grid direction is correct
  • Alignment (justify/align) matches design
  • Element order matches design
  • No extra/missing wrapper elements that change layout
  • Actual computed container widths measured (not inferred from accessibility tree)
  • Full-page screenshot taken and visually compared against Figma

Report Format

## Verification Result: [PASS | FAIL]

### Component: [name]

**Confidence:** [HIGH | MEDIUM | LOW]

### Differences

| Property | Expected (Figma) | Actual (Implementation) | Severity   |
| -------- | ---------------- | ----------------------- | ---------- |
| [prop]   | [expected]       | [actual]                | [severity] |

> **List ALL differences found across ALL verification categories.** Do not omit lower-severity items when critical ones exist. The engineer needs the complete list to fix everything in one iteration.

### Recommended Fixes

- [specific fix with exact values]

Confidence levels:

  • HIGH — Both Figma and implementation data complete, comparison is reliable
  • MEDIUM — Some values couldn't be extracted, manual review recommended
  • LOW — Tool errors occurred, manual verification required before making changes

Connected Skills

  • fabrico-implementing-frontend - for implementing fixes following design system patterns
  • fabrico-technical-context-discovering - for understanding project's design token conventions

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.