Claude Code frontend design: avoid the AI slop look
Why Claude Code, Cursor and Codex build generic UIs, and how to fix it: real components over MCP, design tokens, a CLAUDE.md of rules and a screenshot loop.
Why agent UIs look generic
Claude Code, Cursor and Codex build generic frontends because, left alone, a model returns the most likely interface: the one it saw most often. To make them build something that looks designed you have to replace those defaults with your own: real components it installs instead of improvising, design tokens and written rules it cannot ignore, prompts that describe the job, and a screenshot loop so it can see what it made. This guide sets up all four.
The “AI slop” look is not a lack of skill. It is a statistical average, and it has recognisable tells:
Every button, badge and link in the same blue, so nothing is primary.
A tinted disc behind every icon, whether or not it means anything.
Icon, title, two lines, times three. The row that ends every landing page.
Big centred headline, a subtitle, two buttons. For a product that has a screen to show.
Bold headings, bold labels, bold numbers. Weight stops carrying hierarchy.
Cards inside cards, each with its own shadow and its own radius.
Each one is a reasonable choice in isolation. Together they say “nobody decided anything”. Researchers studying vibe-coded sites call it design homogenisation, and the cause is simple: every decision you do not make, the model makes for you, the same way it made it for everyone else. Telling it to “make it modern” does not help, because modern has no shape. You need to hand over decisions, not adjectives.
Give it real components
The biggest single upgrade is to stop letting the agent write UI primitives at all. Every hand-rolled dropdown, tab bar or date picker is a fresh chance to drift from your look and to forget the keyboard. A component library it can install from gives it finished parts with spacing, states and motion already decided.
Agents need two things from a library: a way to find the right part by intent (“confirm a destructive action”), and a way to install it as source they can read. A shadcn registry covers installing; an MCP server covers finding and explains props before anything lands in your repo.
# Components: a registry the agent can install fromnpx shadcn@latest initclaude mcp add --transport http arc https://uiarc.dev/api/mcp # Eyes: a browser the agent can screenshotclaude mcp add playwright -- npx @playwright/mcp@latestshadcn/ui, Magic UI, HeroUI and Arc all work this way; pick the one whose look you actually want, because the agent will reproduce it faithfully. With Arc the agent can also pull whole blocks and app screens, which matters more than buttons: a finished screen shows the agent what density, hierarchy and real data look like, and it composes the rest to match.
This is the bar to aim at: neutral surfaces, one accent on the selected thing, numbers carrying the hierarchy, no decoration. An agent that starts from parts like these and follows rules like the ones below gets there far more often than one starting from a blank file.
Write the design rules down
Components fix the parts. Rules fix the decisions between them: which colour, how much space, what never to do. Claude Code reads CLAUDE.md at the start of every session, Codex reads AGENTS.md and Cursor reads .cursor/rules. Write the rules once in AGENTS.md and put @AGENTS.md in CLAUDE.md so every tool gets the same file.
Good rules are specific enough to check. “Keep it clean” is not a rule; “no hex values, colours only from these six tokens” is. Bans work especially well, because they remove the most likely default and force a decision.
# Design rules These override your defaults. Read them before writing any UI. ## Components- Search the registry before writing a component (Arc MCP, then `npx shadcn@latest add @uiarc/<name>`). Use documented props only.- Never restyle an installed component to look different. If it does not fit the job, stop and say so. ## Tokens- Colours only from tokens: --background, --surface, --foreground, --text-secondary, --border, --accent. No hex, no Tailwind palette classes (indigo-500, slate-100, purple-*).- One accent. It marks the selected, active or primary thing. Nothing else.- Spacing on a 4px scale. Radius 6px on controls, 10px on cards.- Inter, 14px base. Hierarchy with size and weight 500. Never bold. ## Layout- One primary action per screen. Everything else is a quiet button or a menu.- No icons in tinted circles, no gradients, no glows, no glass.- No rows of three identical cards. No stat tiles nobody asked for.- Sentence case. No small uppercase labels above headings. ## Content- Realistic data: plausible names, amounts and dates. No lorem, no "John Doe".- Every list and table has an empty, a loading and an error state. ## Done means- Screenshot at 1440 and 390 wide, light and dark (Playwright MCP).- Check the screenshots against this file and fix what breaks it before you say you are done.The tokens are what make the colour rules enforceable. If your CSS defines --surface and --accent for light and dark, the agent cannot pick a near-miss grey, and dark mode comes for free instead of being a second, worse design.
| Topic | Reads | Notes |
|---|---|---|
| Claude Code | CLAUDE.md | Imports other files with @path, so @AGENTS.md shares one source. |
| Codex | AGENTS.md | Nested files apply to their folder, useful for a ui/ package. |
| Cursor | .cursor/rules/*.mdc | Can scope a rule to globs like **/*.tsx. Also reads AGENTS.md. |
Prompt for the job, not the look
With components and rules in place, prompts get shorter on style and longer on purpose. Describe who uses the screen, what they came to do and what must never go wrong. The agent can derive hierarchy from that; it cannot derive it from “sleek”.
When you do care about the look, show it: paste a screenshot of a product you admire and name what to take from it (row height, type scale, how sparse the nav is), not “make it look like this”. A full prompt for a real screen looks like this:
Build the workspace settings page. Who and why: admins open this a few times a year to rename theworkspace, manage members and change the plan. They want to findthe right section fast and never delete something by accident. Use: Arc blocks and components (search the Arc MCP server first).Layout: section nav on the left, one form per section, save per section.Danger: deleting the workspace sits last, behind a typed confirmation.Data: 6 members with realistic names and roles, one pending invite.Done: screenshots at 1440 and 390, light and dark, checked againstCLAUDE.md. List anything you could not do with existing components.And this is the kind of result to hold it to. Section nav, one form per section, the dangerous action last and quiet:
Let it see its own work
An agent that cannot see the page grades its work by whether it compiles. Give it a browser through the Playwright MCP server (or the built-in browser in Cursor) and make screenshots part of “done”, as the rules file above does. The loop that works:
shadcn addplaywrightCLAUDE.mddiffAsk the critique to be concrete: “the accent appears on four elements”, “the empty state is a bare sentence”, “the table overflows at 390”. Vague self-review (“looks great!”) is worse than none. Cap it at two rounds; after that the agent starts rearranging boxes instead of improving them, and your eye is faster.
Checklist before you ship
Agents are strong at code that works and weaker at the last ten percent: spacing under stress, empty states, long names. Run this on every agent-built screen before you merge it.
Most of the list goes away once the first three steps are in place, because the components already handle states and the keyboard, and the rules ban the rest. That is the real fix for generic AI frontends: fewer decisions left to the model, and a way for it to check the ones that remain.
Questions
Is Claude Code good at frontend design?
It writes clean, working React and follows design instructions closely. What it lacks is taste by default: with a vague prompt it returns the average of its training data. Given real components, design tokens, written rules and a way to see screenshots, its output gets much closer to a designed product.
Why do AI-generated websites all look the same?
Models predict the most likely next token, and the most likely interface is the one they saw most: Tailwind's default palette, Inter, a centred hero, three feature cards, icons in tinted circles. Without your own components and rules in context, every agent converges on that.
What is the Claude Code frontend-design skill?
A plugin from Anthropic that loads design guidance whenever Claude builds an interface: commit to an aesthetic direction, avoid default fonts and palettes, add considered motion. It improves one-off pages a lot. For a product with an existing look, pair it with your own rules file and components, or it will invent a new style each time.
How do I get Cursor to make better UI designs?
The same levers work: put your design rules in .cursor/rules or AGENTS.md, connect a component registry or MCP server so it installs instead of improvising, give it a reference screenshot, and let it check its result through a browser MCP server.