Turn Claude Code into your frontend design partner
Avoid the common AI frontend trap of code that runs fine but looks ugly or misses edge cases by using a structured six-step design workflow (brief, directions, pick, redline, polish, walkthrough) paired with the right toolchain. Turn aesthetic corrections into persistent, iterable rules.
X (Twitter)@fleyta8887likes
Claude CodePlaywright MCPChrome DevTools MCPFigma Context MCPshadcn/uiStorybookaxe-core
Added 2026-11-08 · originally published 2026-11-07
Key points
- Progress through six sequential steps: Brief (confirm scope), Directions (three code variations), Pick (compare six screenshots to choose), Redline (inspect spacing and states), Polish (fix iteratively with screenshots), and Walkthrough (keyboard and accessibility testing).
- Don't just check if the build passes or how it looks at a single width; always inspect empty, loading, and error states.
- Combine Playwright MCP and Chrome DevTools MCP to let the AI see the real page, console, and performance traces, and use Figma Context MCP to fetch layout data.
- Reuse shadcn/ui components and tokens to prevent the AI from reinventing components every time, and use Storybook to centrally manage all states.
- Use axe-core for contrast and accessibility checks (AA or better) and ensure 44px click targets.
- Log rules derived from aesthetic corrections into the ## taste section of CLAUDE.md so subsequent pages automatically inherit them.
Pitfalls
- A green build does not mean the page actually looks good or works well.
- Looking at the page at only a single width while ignoring edge cases like empty states.
- Allowing the AI to randomly invent new components instead of reusing existing ones and tokens (e.g., shadcn/ui).
.cursorrules
- ## taste - Check spacing, type scale, contrast, 44px targets, and empty, loading, and error states. - Every taste correction must be added as a rule in CLAUDE.md. - Never rely only on a green build; ensure human pick for final yes.
Copy-ready prompt
Please act as my frontend design partner and build [specific feature/page]. Before writing any code, follow this six-step workflow: 1. Brief: Define one user, one task, and one delightful moment, and wait for my confirmation before building; 2. Directions: Provide three real code implementations (system-native, minimalist with half the elements, and bold styling); 3. Pick: Compare screenshots and let me choose based on clarity, hierarchy, density, and experience scores; 4. Redline: Check spacing, font sizes, contrast, 44px touch targets, and empty/loading/error states, and log any shortcomings to taste.md; 5. Polish: Fix issues one by one, providing a new screenshot each time; 6. Walkthrough: Check keyboard navigation, 200% text scaling, and dark mode, then report how the screen actually looks.
#AI Frontend Styling#Claude Code#Design Partner#Anti-Pattern Guide
Related techniques
Summarized by AI from the original source - refer to the original post for details. Copyright belongs to the original author.