The Gap
π·οΈ#claude-code has strong design skills β /frontend-design for creative marketing work, /interface-design for dashboards and apps. Both produce excellent code. But Claude can't see what it rendered. It writes CSS, hopes the layout is right, and moves on. The human catches visual issues, sends corrections, and the cycle repeats.
π·οΈ#playwright MCP closes this loop. Claude builds β navigates to localhost β takes a screenshot β evaluates the result β iterates. Visual feedback in the build cycle, not after it.
The Workflow
Build β Navigate β Verify β Iterate
- Write the component or page code
browser_navigatetohttp://localhost:3000(or whatever port the dev server runs on)browser_snapshotto read the accessibility tree β verify structure, hierarchy, contentbrowser_screenshotto see the actual rendered output β verify layout, color, spacing, typographybrowser_click/browser_typeto test interactive states β hover, focus, form fills- Iterate on the code based on what Claude actually sees
What This Enables
- Catch layout issues before the human does β broken grids, overflow, missing responsive behavior
- Verify design intent β does the implemented color actually feel warm? Is the type hierarchy readable?
- Test interaction states β hover effects, focus rings, disabled states, loading skeletons
- Screenshot-driven iteration β Claude can compare before/after screenshots across changes
- Accessibility verification β the snapshot tool returns the accessibility tree, surfacing missing labels, broken ARIA, and hierarchy issues
Which Tools Matter
Tools like browser_evaluate and browser_run_code are blocked β they add attack surface with no design benefit. See πPlaywright MCP Localhost Containment for the full π·οΈ#security model.
Pairing with Design Skills
With /frontend-design
Creative marketing work β landing pages, hero sections, editorial layouts. Playwright lets Claude verify that the bold aesthetic direction actually landed. Did the asymmetric grid work? Does the gradient mesh render correctly? Is the staggered animation timing right?
With /interface-design
Dashboard and app work β the /critique and /audit sub-commands check code against the design system. Playwright adds visual confirmation. The squint test from the interface-design skill ("blur your eyes β can you still perceive hierarchy?") becomes something Claude can actually perform via screenshot.
With /interface-design:critique
After building, run critique β take a screenshot β evaluate whether the critique findings are visible in the rendered output. Closes the gap between code review and visual review.
Prerequisites
- Playwright MCP installed and configured with
--isolatedflag - Localhost containment hook active β see πPlaywright MCP Localhost Containment
- A running dev server on localhost (Next.js, Vite, etc.)
Contexts
π·οΈ#claude-code π·οΈ#playwright π·οΈ#frontend-design π·οΈ#agentic π·οΈ#mcp
