Teaching AI Agents to Build Lean UIs from the Start
If you build interactive web apps with coding agents, you already know the cleanup tax.
You ask for a settings screen or a dashboard, and the agent hands back something that works—technically—but feels like it was designed by a committee of nervous copywriters. There’s a page title repeating the nav item right above it. Every section has a one-line subtitle explaining what the heading already says. There are cards nested inside cards, horizontal dividers between every row, a green "Connected" pill that doesn't do anything, and a reassuring note at the bottom promising "no account needed."
I realized recently that my most frequent UI feedback to agents wasn't about layout bugs or missing features. It was just deleting things, one prompt at a time. Remove this blurb. Merge these two headers. Drop the extra search bar. Get rid of the play buttons on the thumbnails.
So I stopped repeating myself. I had my agents audit my past cleanup requests, find the patterns, and distill them into a reusable skill I'm calling UI simplify. The goal is simple: build lean from the start, so a first draft already looks like the result of a cleanup pass.
The Core Rule: Keep It Only If a User Would Miss It
Most AI-generated UI clutter comes from agents trying to be helpful. They narrate what the interface is doing, add visual flourishes to make a screen feel "finished," and duplicate controls so nothing is hard to find. In practice, that extra surface area makes interactive apps harder to scan and pushes the actual work below the fold.
The entire skill boils down to one filter: keep an element only if a user would miss it.
Running an audit on my own feedback broke the bloat down into four predictable categories:
1. Text that explains the obvious
Agents love writing copy. They'll put a heading on a page that matches the header bar directly above it, add a subtitle under every settings section, drop keyboard-shortcut hints beneath buttons, and slip in meta-notes like read times or "generated with AI" badges.
The fix is to say everything once. Labels should be one or two words. If an instruction is required for someone to act, keep it to one short line. Everything else—background explanations, tips, "how this works" blurbs—belongs in the docs or behind an accessible info button (hover, keyboard, and tap).
2. Duplicate controls and stacked chrome
A surprisingly common agent habit is saying or showing the same thing twice: two search bars on one page, a dot next to a toggle that’s already highlighted, a mobile back button sitting on its own row above the screen title, or a section heading stacked on top of a separate row of segmented buttons.
Merging stacked headers and toolbars into a single row immediately makes an app feel tighter and more intentional.
3. Decorative chrome and non-actionable status
Agents reach for containers and badges by default. That gives you cards inside cards, horizontal dividers everywhere, decorative chips, and status banners for routine states ("Item is up to date").
In the skill, the defaults are strict:
- One level of container. No card inside a card.
- Few dividers. Use spacing, alignment, or a table/column layout instead.
- Status has to earn its space. A bare green dot or a "Connected" chip doesn't tell a user what to do. Put a small action right next to what it affects—like an Update button on an outdated item, plus an Update all control—rather than a banner across the top.
- Save quietly. Auto-save or confirm inline next to the changed setting, and follow the system theme instead of cluttering the UI with a theme toggle.
4. Cluttered layouts that bury the action
When an agent adds a header, a description, a status bar, and a list of every possible option, the primary action gets shoved below the fold—especially on mobile.
The skill pushes for progressive disclosure: put search and page controls in the existing header, collapse long reference blocks, offer an "Add sign-in method" menu instead of listing every provider upfront, and hide controls that don't make sense on a given device (like a width setting on a phone).
What It Looks Like in Practice
To calibrate how far to go, I paired the skill with a table of generalized before-and-after examples pulled straight from my past cleanups:
| What the agent built | What the cleanup changed |
|---|---|
| A page heading matching the header bar above it | Removed it—it's already visible in the header |
| Two search bars on one page | Consolidated to one inline search bar |
| Play buttons overlaid on video thumbnails | Removed them to cut visual crowding |
| A "Next" button pushed below the fold by a tall header | Removed the header so the primary action stays visible |
| A banner saying an item is up to date | Moved status to details; added a small inline Update button only where needed |
| Theme and account settings living in the sidebar | Moved them into a minimal settings screen |
What Stays: Lean Doesn't Mean Stripped Down
The biggest risk with telling an agent to "simplify" is that it will overcorrect—cramping the spacing, shrinking tap targets, or quietly deleting real features and accessibility hooks.
The skill draws a hard line around what never gets cut:
- Functionality. The rule is simplify the UI without removing functionality. Hide, collapse, or move a feature rather than dropping it. If something looks legacy or obsolete, the agent has to flag it in one line and ask before deleting code or user data.
- Accessibility. Removing a redundant visual title doesn't mean removing the semantic heading—keep it visually hidden for screen readers. Focus indicators, form labels, error messages, and accessible loading states always stay.
- Real warnings and limits. Information people need to avoid a mistake or understand a real constraint stays visible in one short line. Better yet: sometimes the right way to remove a warning is to fix the product. When I wanted to remove a "saved in this browser only" notice, we didn't just hide the text—we added shared saving so the limitation no longer existed.
Teaching Agents How to Run a Cleanup Pass
Even with good defaults, agents fail at simplification in predictable ways if you don't specify the workflow. A few rules in the skill made the biggest difference:
- Treat one example as a category. If I point at one extra blurb or chip, the agent shouldn't just delete that single instance and leave six more on the same flow. On an early partial pass, I had to tell it: "The goal was no extra text and there was extra text on all of them."
- Remove, don't relocate. Agents hate throwing away text they wrote, so they'll often delete a paragraph from the header and quietly paste it into the footer. Unless the text is genuinely needed behind a tooltip or in docs, it goes in the trash.
- Update brittle tests. When copy goes away, tests asserting on that exact marketing string should be updated to test actual behavior instead.
- Inspect what's left. When checking the running UI, don't just verify that you deleted the one thing I asked about—look at the screen as a whole and see what clutter is still sitting there.
The Payoff
The noticeable difference isn't just cleaner screenshots—it's how the app feels to use. Interactive UIs immediately feel calmer, faster to scan, and less like an AI prototype when you strip out the narration and extra chrome.
More broadly, having an agent audit your own past feedback is one of the highest-leverage ways to build a skill. You don't have to sit down and invent design principles from scratch. Your PR comments and follow-up prompts already contain your exact taste—you just have to turn them into defaults so you stop paying the cleanup tax on every build.





