Skip to content

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.

Elia

· 9 min read

BillingPro plan$24UpgradeCLAUDE.md

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:

Accent everywhere

Every button, badge and link in the same blue, so nothing is primary.

Icons in circles

A tinted disc behind every icon, whether or not it means anything.

Three equal cards

Icon, title, two lines, times three. The row that ends every landing page.

Centred hero

Big centred headline, a subtitle, two buttons. For a product that has a screen to show.

Heavy type

Bold headings, bold labels, bold numbers. Weight stops carrying hierarchy.

Shadows on everything

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.

Terminal
# 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@latest

shadcn/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.

Metrics dashboardOpen

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.

CLAUDE.md
# 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.

Where each tool reads standing instructions
TopicReadsNotes
Claude CodeCLAUDE.mdImports other files with @path, so @AGENTS.md shares one source.
CodexAGENTS.mdNested files apply to their folder, useful for a ui/ package.
Cursor.cursor/rules/*.mdcCan 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”.

AvoidPrefer
Avoid“Make it modern and clean”Prefer“Admins come here to find one member fast. Search first, table second, nothing above them.”
Avoid“Build a dashboard”Prefer“People open this to see whether last night’s deploys broke anything. Error rate first, then the deploy list.”
Avoid“Add some charts”Prefer“One line chart of weekly signups, 12 weeks, no legend, value on hover.”
Avoid“Make it pop”Prefer“Remove anything that is not data or a control, then show me the diff.”
Avoid“Fix the design”Prefer“The filter bar competes with the table header. Make the filters quieter.”

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:

Prompt
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:

Settings pageOpen

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:

BuildFrom registry parts, following CLAUDE.md.shadcn add
Screenshot1440 and 390 wide, light and dark.playwright
CritiqueAgainst the rules file, one issue per line.CLAUDE.md
Fix, then youTwo rounds at most, then a human looks.diff

Ask 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.

Installed, not rewritten. The diff adds registry components; it does not contain a hand-rolled copy of one.
Tokens only. Search the diff for #, rgb( and Tailwind palette classes. There should be none.
One accent, one primary action. Squint at the screenshot. Exactly one thing should pull your eye first.
Real content. Long names, big numbers, zero rows. Layouts that only work with “Acme” are not done.
States. Empty, loading, error and disabled exist and look intentional.
Both themes, both widths. Dark mode is not inverted light mode, and 390 px has no sideways scroll.
Keyboard. Tab through it once. Focus is visible and lands in a sensible order.
Nothing extra. Delete captions, badges and tiles that repeat what the data already says.

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.