# Turn Claude Code into Your Own INCREDIBLE UI Designer (using Playwright MCP Subagents)
<!--
ref: @content/youtube/patrick-ellis/2025-08-16-turn-claude-code-into-your-own-incredible-ui-designer-using
tags: [claude-code, ui-design, playwright-mcp, browser-automation, sub-agents, design-review, visual-feedback, git-worktrees, claude-md, front-end-development]
version: 2
updated_at: 2026-11-21T22:08:06.364Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=xOO8Wt_i72s)**


*Synthesized from Patrick, CTO and co-founder of an AI-native startup, on Patrick Ellis, 2025-08-16.*

Patrick presents alone, showing how he gives Claude Code a browser through the Playwright MCP server so it can see and check the front end it builds. He is the only speaker.

## Core Thesis
Patrick argues that coding agents produce generic UI because they design without seeing their output. He says the fix is an orchestration setup: a browser tool (Playwright MCP) that takes screenshots, a written spec or mock to check against, and a sub-agent that loops between building and reviewing until the result matches the spec. The vision side of the model is what he says is being left unused.

## Key Insights
- **Blindfolded design:** he says agents only work with the code they write and do not use the visual side of their training. Screenshots give that side a way in.
- **Three ingredients:** the orchestration layer needs context (docs and style guides), tools (Playwright and other MCPs) and validation (a UI mock, a style guide, and examples of good and bad output).
- **Iterative loop:** Claude Code looks at the spec, builds, takes a Playwright screenshot, compares it to the spec, and repeats. He says this lets a run last half an hour or an hour without babysitting.
- **Playwright capabilities:** screenshots, reading browser console and network logs, emulating devices and viewport sizes (he shows an iPhone 15 profile), clicking through forms, accessibility audits, responsive checks, and scraping. In one case a blocked (403) scrape was retried by spinning up a Playwright browser, which he says Claude Code did on its own.
- **Configuration:** the browser and device are set in the MCP config, headed mode is the default, and a vision mode switches from the accessibility-tree navigation to coordinate-based actions. The `/mcp` view shows the config and the tool list.
- **CLAUDE.md as memory:** the file is loaded after the system prompt at session start. He uses a visual-development section that points to a design-principles file and a style guide in a context folder, and tells the agent to check the pages affected by front-end changes, the acceptance criteria in the prompt, the desktop viewport and console errors.
- **Design principles from deep research:** he had Gemini deep research produce a concise design-principles file for a specific aesthetic, then edited it.
- **Two sub-agents:** a design reviewer sub-agent, set to Sonnet, with Playwright and Context7 tools, and persona examples such as Stripe and Airbnb. It returns a graded report with high-priority issues (he got an A minus with image-preload and third-party script warnings). He says he prefers Sonnet, which he finds cheaper with no visible quality loss.
- **Sub-agents call sub-agents:** a design reviewer can call a mobile reviewer, each with its own model and context, to build conditional review logic.
- **Git worktrees for parallel variants:** he runs the same or different prompts in separate worktrees, each on its own branch, and compares outputs. A friend runs three headless GitHub workers and uses a judge model to pick the best.
- **Sources for prompts:** Anthropic's GitHub examples and the Claude Code best-practices guide, plus the documentation, are his references for command and sub-agent structure.

## Actionable Takeaways
1. Add Playwright MCP to Claude Code, and set the browser, device emulation and headed or headless mode in its config.
2. Put design principles and a style guide in a context folder, and point CLAUDE.md at them with rules for when to check the browser.
3. Build a design-reviewer sub-agent with a persona, a step-by-step review method, a fixed report format, and only the tools it needs (Playwright, Context7, and built-in tools).
4. Run the build-screenshot-compare loop with the spec as the validator, and attach low-fidelity sketches, screenshots and hex codes for colors and typography.
5. Generate three variants in separate git worktrees and compare them, instead of discarding the first output.

## Notable Quotes
> "They can't see their own designs." — Patrick Ellis
> "You're taking an incredible PhD level intelligence and you're forcing it to design with essentially blindfolds on" — Patrick Ellis
> "the performance of these models comes down to context, tools, and validation steps." — Patrick Ellis

---

*Related: `@content/web/github/2026-11-25-followups-scope-issue-112120` · `@content/web/github/2026-11-25-claude-code-v2-1-332` · `@content/web/claude-dev/2026-11-24-the-work-after-you-open-a-pr` · `@content/web/github/2026-11-24-builtin-ship-shadows-user-skill` · `@content/web/github/2026-11-23-claude-code-v2-1-331`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*