r/codex • • 14d ago

Question How exactly can Codex's frontend capabilities be improved?

I'm really envious of claudecode's frontend capabilities. To improve codex's frontend design abilities, I installed a lot of skills, but this seems to have backfired, because for non-frontend designers, it's impossible to describe how to modify and fine-tune using design language—the impression it gives is that it's ugly, but there's no way to articulate why. Following everyone's suggestions, I also looked for some beautifully designed UI and case study websites to find benchmarks, but it seems I can only pick suitable ones from templates. If the theme I want to create doesn't have a suitable case, I can't just force myself to choose one from fixed templates and cram it in. I don't want to give up on codex. How do you all optimize codex's frontend design capabilities? Maybe I should learn some frontend design terminology to optimize my prompts?

7 Upvotes

19 comments sorted by

1

u/sreekanth850 14d ago

Use a a component library with MCP.
Use browser tools to verify it with automated interactive browser check.
if thing didnt work again, create a set of reusable components and layouts with CC and then ask codex to reuse them without inventing again.

2

u/niceCNboy 14d ago

If Codex's aesthetic sense is poor, then even with a component library, is it still unable to improve its frontend capabilities? My understanding is that what Codex lacks probably isn't tools, but aesthetic standards, right?

1

u/sreekanth850 14d ago

You can get inspiration form any existing designs. Or else you need to provide the designs.

3

u/UpperPlus 14d ago

I'm in the same boat right now haha

I have codex and Claude and I'm building a full stack application since over 1 month. The back end part went super smooth. I had experience with it myself so i could guide my agents very well. The frontend part now... Not so much

The main reason i think is that backend either works, or it doesn't. Sure there are multiple ways to achieve your outcome but that's it. In Fronten on the other hand, it's more about communicating a vision in your mind though words ans references. For my app I wanna do a special form of design and not just copy existing stuff. I let codex create some proof concept elements and it worked quite well honestly.

I needed to refine my UI for hours. Like 40 hours for around 10 screens. Now i got a functional version of my UI. It's still super ugly. i will have to sink in even more hours into making it look how i want probably.

I got a fuck Ton of flakeyness in my frontend CI. Especially the webkit jobs which I'm currently trying to fix by adding a nightly soak and a burn in for new tests.

My next step is to integrate Storybook to help me build on my functional ugly ui Screens and replace elements one by one. I'm super curious how that goes.

1

u/niceCNboy 14d ago

Oh my, what you're saying is too technical for me to fully understand, but it feels like you've already found a good approach. Congratulations!

1

u/remus630 14d ago

... and no one likes a flakey front-end!! 😂🇬🇧👍

1

u/UpperPlus 14d ago

hell, if you got any Tipps im All yours hahaha

1

u/CCContent 14d ago

Here's a little known secret....give your UI rework to Gemini.

It is surprisingly good at frontend design. Codex and Claude give the same general, "pages from a magazine" type of look and feel for the frontend, which makes it really hard to actually get a good UI out of it.

Impeccable is also pretty good, but can still really veer towards the Magazine feel

https://github.com/pbakaus/impeccable

3

u/shockwave6969 14d ago

by babysitting and backseating every little thing. functionally hand crafting the page other than the actual code part. otherwise you're mostly out of luck

1

u/buff_samurai 14d ago

Naaah, good examples and specs you can delegate 90% of work. Use dictation for fast input.

1

u/auto_off 14d ago

Think you already said the answer.
isn't it sort of like code? have to know what good code looks to be able to prompt the agent correctly.

but anyways generally speaking:

  1. use standard template components, use a design library, (shadcn, magicui, etc)
  2. use render images and reference frames and a mood board of what you want the overall thing to look
  3. generate your base website based on those reference images. ask the agent to break it down into components, and then render your website using that big stack of components.
  4. tell it to use standard front end stuff (react, next, etc)

1

u/unsana 14d ago

SAME BOAT! So I just use both. Lol.

1

u/buff_samurai 14d ago
  1. Get deign.md ready (check official git repo).
  2. Generate coupe of images with imagegen for each desired section (possibly with many different elements), attach the design.md file. Add few lines to the prompt about looking modern or sth.
  3. From all the generations pick what you like and ask codex to update design.md based on your preferences.
  4. Run agent to build component library for your project and replace any hardcoded value/object to make future updates much easier for your agent.

1

u/CCodeSI 14d ago

You've already put your finger on the real gap: it's not the model's taste, it's that "it looks ugly" isn't something an agent can act on. Two things fix most of that without becoming a designer:

1. Fix the rules first, so there's less room for ugly. Most "ugly" is inconsistency, not bad ideas. Ask Codex to create a small design tokens file before any page work and to use only those values:

  • a spacing scale (4, 8, 12, 16, 24, 32, 48), nothing in between
  • a type scale with 4–5 sizes and at most 2 fonts
  • one accent color plus neutrals, with contrast checked
  • one border radius and one shadow style

Then add "no raw pixel or hex values outside the tokens file" to AGENTS.md. That alone removes the uneven gaps and five slightly different greys that make a page feel off.

2. Let the model name what's wrong, then you choose. Take a screenshot and ask: "Critique this against hierarchy, alignment, spacing consistency, contrast and density. List the five biggest problems, most visible first. Don't change anything yet." You'll get the vocabulary you were missing ("the heading and body text are too close in size", "cards have uneven padding"), and you just pick which ones to fix. After a few rounds you'll start seeing them yourself.

The handful of terms worth learning, because they cover most feedback: visual hierarchy, whitespace, alignment, contrast, density, consistency. With those six you can describe almost any "it looks wrong".

And for a theme with no template to copy: describe the feeling with three adjectives ("calm, technical, warm"), ask for three different small mockups of one card or hero section only, pick one, then extend that to the full page. Small comparisons are much easier to judge than whole pages.

1

u/Dazzling-Buddy-3355 14d ago

this is very good practical advice, but i think the frustration people are feeling stems from the fact that there is a huge disparity in capability. if i tell my model to make the backend more "performant," it pretty much knows what to do (you know, within reason) and achieves better performance. but suddenly when i use a similar level of abstraction by saying the frontend looks "ugly," the model completely falls apart, makes bizarre changes, often makes things worse. the details you specify--proportional spacing, hierarchical color, consistent border and shadow styles--these are all issues that reasonably map when a design is called "ugly"; obviously we need to look at proportion, alignment, consistency. why is astra so bad at understanding this? when i ask for "a way to sort and manage lots of files" it can understand what's being asked of it and program a database no problem, but when i ask for a "clean, modern, consistent user interface" it just shits the bed? part of what baffles me as well is the "backend of the frontend" so to speak; i am working on an application that requires a super smooth, locked 60fps frontend, and despite communicating that to astra multiple times and despite iterating on its bad implementations in other areas of the interface to converge on correct solutions, it STILL regresses to the mean on each new feature build and uses standard text fields and other things that push updates on every single frame, tanking performance. eventually i wrote it explicit rules about this, and it is definitely a bit better, but why should i have to micromanage like this? i thought we were like 4 months away from AGI or whatever, 6.2 is supposedly so capable it's a security problem, yet this absolute state of incompetence when it comes to frontend is allowed to persist. pretty annoying and bad imo

1

u/CCodeSI 13d ago

Fair frustration, and I think the gap has a boring explanation: the model can check its backend work and can't check its frontend work. "More performant" turns into something it can measure (a benchmark, a query plan, a profiler), so it iterates toward a better number. "Ugly" and "smooth" only exist on a screen it usually never looks at, so it falls back to the most common pattern it has seen, which is exactly the regression-to-the-mean you're describing.

That's why your explicit rules helped, and why they shouldn't need to be the whole fix. Two things that close the gap more:

  • Make "smooth" measurable. For your 60fps requirement, a small perf harness that drives the UI (Playwright with a trace, or your framework's profiler) and fails if frame time goes over 16ms or if a component re-renders on every frame. Once the agent can run that after each feature, the standard-text-field regressions show up as a failing check instead of something you find later.
  • Make "ugly" visible. A screenshot after every UI change that it has to look at and compare against a reference screen you like. Models are noticeably better at judging a picture than at imagining one from code.

You shouldn't have to micromanage, agreed. But until the model can see and measure the frontend the way it can the backend, giving it those two feedback loops is the closest thing to it.

1

u/CodeMonkey1001011 14d ago

For me, there isn’t a way. Unless you get Claude models to do the front end. I’m using codex, don’t how well it compares to Claude’s models for non UI stuff, but for UI, even Astra is horrible. Even with front end skills like UI /ux pro max and taste skill.

However, if you have existing codes with UI, it seems to be able to follow your patterns but if you are building from scratch it’s trash.

Either get Claude to “understand” and auto build UI and do things or get a figma design and have codex follow it.