agentleFS
PMDevSolutionsPMDevSolutions/Flavian/.claude/skills/visual-qa-verification/SKILL.md

visual-qa-verification

Skill19 starsChanged 11 days agoMITView on GitHub

Use after Figma-to-FSE conversion to verify generated themes match the source design. Covers screenshot comparison, responsive checks, Lighthouse audits, image rendering, and accessibility validation. Keywords: verify theme, visual QA, compare to Figma, check screenshots, responsive test, post-conversion verification, pixel-perfect check

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After the figma-fse-converter agent generates a WordPress FSE theme, this skill guides verification that the output matches the Figma …

    line 10
  2. Distinctive:

    Core Principle: Every converted theme must be visually verified before delivery.

    line 12
  3. Distinctive:

    Use this skill when:

    line 16
  4. Distinctive:

    Run these checks in order after conversion completes.

    line 34
  5. Distinctive:

    Verify all images load correctly.

    line 97
  6. Distinctive:

    Test that layouts respond correctly at each breakpoint.

    line 114
  7. Distinctive:

    No horizontal scrollbar on any breakpoint

    line 122
  8. Distinctive:

    Run Lighthouse to catch performance and accessibility issues.

    line 131
  9. Very specific:

    Fix: Check theme.json > settings.typography.fontFamilies and verify fonts are either system fonts or properly enqueued via functions.php.

    line 194
  10. Distinctive:

    After completing all steps, summarize results:

    line 232

≈ “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

Visual QA Verification

Overview

After the figma-fse-converter agent generates a WordPress FSE theme, this skill guides verification that the output matches the Figma source design. It covers screenshot comparison, responsive behavior, accessibility, performance, and image rendering.

Core Principle: Every converted theme must be visually verified before delivery. The figma-fse-completion hook validates structure and tokens; this skill validates what the user actually sees.

When to Use

Use this skill when:

  • A Figma-to-FSE conversion has just completed
  • Verifying a generated theme matches its Figma source
  • Running post-conversion visual QA
  • Checking responsive behavior of generated templates
  • Validating that all images render correctly

Symptoms that trigger this skill:

  • "verify theme"
  • "visual QA"
  • "compare to Figma"
  • "check screenshots"
  • "does it match the design"
  • "responsive check"
  • "pixel-perfect"

Verification Checklist

Run these checks in order after conversion completes.

Step 1: Theme Activation

Deploy the generated theme to a local WordPress instance and activate it.

# Copy theme to WordPress wp-content
cp -r themes/[theme-name] /path/to/wordpress/wp-content/themes/

# Activate theme
wp theme activate [theme-name]

# Seed demo content if empty
wp plugin install wordpress-importer --activate
wp import content.xml --authors=create

Step 2: Screenshot Comparison

Take screenshots at standard breakpoints and compare against the Figma source.

Breakpoints to test:

BreakpointWidthDescription
Mobile375pxiPhone SE / small phones
Tablet768pxiPad portrait
Desktop1280pxStandard laptop
Wide1440pxDesign canvas (Figma default)
Extra-large1920pxFull HD monitors / large displays

Using Playwright MCP (Chromium — primary):

1. Navigate to local WordPress URL (mcp__playwright__browser_navigate)
2. Take screenshot at each breakpoint (mcp__playwright__browser_resize, then mcp__playwright__browser_take_screenshot)
3. Compare visually against Figma source (get_screenshot from Figma MCP)

Using Playwright MCP (Firefox & WebKit — cross-browser):

1. Run: ./scripts/cross-browser-test.sh firefox http://localhost:8080
2. Run: ./scripts/cross-browser-test.sh webkit http://localhost:8080
3. Compare Firefox/WebKit screenshots against Chromium baseline
4. Flag any browser-specific rendering differences

Or use the Playwright MCP tools directly (browser_navigate, browser_resize, browser_take_screenshot) for interactive testing.

Setup (one-time): ./scripts/setup-playwright.sh

What to compare:

  • Layout structure (columns, rows, spacing)
  • Typography (font sizes, weights, line heights)
  • Color accuracy (background, text, borders)
  • Component alignment (centered, left, right)
  • Whitespace and padding
  • Cross-browser rendering consistency (Chromium vs Firefox vs WebKit)

Step 3: Image Rendering

Verify all images load correctly. This catches pattern-first architecture issues.

# Check for broken image references in templates
grep -r 'src=""' themes/[theme-name]/templates/ && echo "FAIL: Empty src found" || echo "PASS"

# Check pattern files use get_theme_file_uri()
grep -r 'get_theme_file_uri' themes/[theme-name]/patterns/ | wc -l

# Check no hardcoded image URLs in HTML templates
grep -r 'src="http' themes/[theme-name]/templates/ && echo "WARN: Hardcoded URLs" || echo "PASS"

In browser: Open DevTools Network tab, filter by "img", reload page. Any 404s indicate broken image references.

Step 4: Responsive Behavior

Test that layouts respond correctly at each breakpoint.

Check for:

  • Navigation collapses to mobile menu
  • Multi-column layouts stack on mobile
  • Images scale proportionally (no overflow)
  • Text remains readable at all sizes
  • Touch targets are at least 44x44px on mobile
  • No horizontal scrollbar on any breakpoint

Common failures after conversion:

  • Fixed widths that should be fluid (max-width not width)
  • Columns that don't stack (missing responsive block settings)
  • Images overflowing containers (missing max-width: 100%)

Step 5: Lighthouse Audit

Run Lighthouse to catch performance and accessibility issues.

Target scores:

CategoryMinimumTarget
Performance8090+
Accessibility90100
Best Practices90100
SEO90100

Using the Lighthouse CI CLI:

pnpm lighthouse:run    # runs lhci autorun against lighthouserc.json

Common issues in converted themes:

  • Missing alt text on images (accessibility)
  • Large unoptimized images (performance)
  • Missing meta description (SEO)
  • Low color contrast ratios (accessibility)

Step 6: Accessibility Checks

Beyond Lighthouse, manually verify:

  • Keyboard navigation: Tab through the page. Every interactive element must be reachable.
  • Focus indicators: Visible focus rings on all focusable elements.
  • Heading hierarchy: h1 > h2 > h3, no skipped levels.
  • Color contrast: Text meets WCAG AA (4.5:1 for normal text, 3:1 for large text).
  • Skip link: First focusable element should be "Skip to content".
  • Landmark regions: header, nav, main, footer present.
# Check heading hierarchy in templates
for f in themes/[theme-name]/templates/*.html; do
  echo "=== $(basename $f) ==="
  grep -oP 'wp:heading.*?"level":\K[0-9]' "$f" | sort -n
done

Step 7: Design Token Verification

Confirm the theme uses only theme.json tokens, not hardcoded values.

# Run the completion hook (includes token audit)
bash .claude/hooks/figma-fse-completion.sh themes/[theme-name]

Verify in browser:

  • Change a color in theme.json, refresh — it should update everywhere
  • Change a font size in theme.json, refresh — all matching text should update
  • Change spacing in theme.json, refresh — all matching spacing should update

Common Failures

1. Fonts Don't Match

Symptom: Body text or headings use wrong font family.

Cause: Font not loaded, or theme.json fontFamily slug doesn't match template references.

Fix: Check theme.json > settings.typography.fontFamilies and verify fonts are either system fonts or properly enqueued via functions.php.

2. Colors Are Close But Not Exact

Symptom: Colors look "off" compared to Figma.

Cause: Theme.json color palette uses different hex values than Figma design tokens.

Fix: Re-extract color palette from Figma using get_variable_defs or get_design_context.

3. Spacing Feels Wrong

Symptom: Elements are too close or too far apart vs. the design.

Cause: WordPress spacing scale doesn't match Figma spacing tokens exactly.

Fix: Compare theme.json > settings.spacing.spacingSizes against Figma spacing values. Adjust the scale.

4. Images Missing or Broken

Symptom: Placeholder boxes or broken image icons.

Cause: HTML templates reference images directly instead of using PHP patterns.

Fix: Move image references to PHP pattern files using get_theme_file_uri(). See the fse-pattern-first-architecture skill.

Integration with This Template

This skill works with:

  • figma-fse-converter agent — Generates the theme to verify
  • visual-qa-agent — Performs visual comparison
  • accessibility-auditor agent — Runs accessibility checks
  • figma-fse-completion.sh hook — Structural validation (complements visual QA)
  • Playwright MCP — Screenshots and responsive testing (Lighthouse via pnpm lighthouse:run)
  • figma MCP — Source design screenshots for comparison

Verification Report Template

After completing all steps, summarize results:

# Visual QA Report: [theme-name]

**Date:** YYYY-MM-DD
**Figma Source:** [URL]
**WordPress URL:** [local URL]

## Results

| Check | Status | Notes |
|-------|--------|-------|
| Desktop match | PASS/FAIL | |
| Tablet match | PASS/FAIL | |
| Mobile match | PASS/FAIL | |
| Images render | PASS/FAIL | |
| Responsive | PASS/FAIL | |
| Lighthouse Perf | XX/100 | |
| Lighthouse A11y | XX/100 | |
| Keyboard nav | PASS/FAIL | |
| Token-only styling | PASS/FAIL | |

## Issues Found
1. ...

## Recommendation
[ ] Ready for delivery
[ ] Needs fixes (see issues above)

Skill Version: 1.0.0 Last Updated: 2026-03-06

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.