How-To Guides

frontend-design: UI Design and Fix Skill for Codex That Follows Your Design System

Install frontend-design for Codex to design new screens and fix UI bugs. It reads your project's own design standard first, builds from your tokens and components, and checks both themes, keyboard focus and contrast before it hands the work back.

  • Reads a FRONTEND.md at the repo root first, so your tokens and components win over any default
  • Every color has a light and a dark state, with 16px body text and 4.5:1 contrast as the floor
  • ️ Edit an existing record in a drawer, create or confirm in a modal, with fixed rules for each
  • Screenshots at 1440, 1024, 768 and 390px, a keyboard pass, and a report of any check it could not run
By Rejith Krishnan13 min read
frontend-design: UI Design and Fix Skill for Codex That Follows Your Design System

What it is

frontend-design designs new screens and fixes UI problems in web applications. You describe a screen or a bug. It works out where the screen fits in your product, builds it from the components and tokens you already have, and checks the result before it says it is done.

Most UI help fails in one of two ways. It produces something that looks generated: the same cream background, the same rounded grey cards. Or it ignores what you already built and introduces a second way to do everything. This skill is written against both. It has two layers, and they do different jobs.

The method. references/design-method.md holds the full text of Claude Code's own frontend-design skill, with its Apache 2.0 licence file alongside. It covers how to ground a design in its subject, how to plan before building, how to critique the result, and how to write interface copy. It also lists the defaults that make a page read as machine-made, so the plan can be checked against them.

The guidelines. references/guidelines.md and references/layout.md hold conventions for how screens are built and how they behave: tokens, themes, type minimums, contrast, the app shell, tables, drawers, modals and forms. They are brand-neutral. They say nothing about which colours or fonts to use.

That split is the point. The method decides how a design looks and reads. The guidelines decide how it works. Neither one picks your palette.

Step 0: your standard comes first

Before it designs or fixes anything, the skill looks for a file at the repository root named FRONTEND.md (or frontend-design.md). If it exists, that file is the project's source of truth, and it overrides everything in the skill's own references. A small script, scripts/frontend_standard.py, does the checking and writing so the file handling is exact.

If the file is missing, the skill asks, in order, and waits after each question:

  1. Do you have the standard, or a link to it? A readable link is stored as a pointer, not as a copy. The skill re-reads the link every run. A client's standard is usually shared across all its apps, and a snapshot would drift from the source the day after it was taken. A link it cannot read, such as a private repository, is a reason to ask you to paste the content.
  2. Do you have screenshots, written instructions or documents instead? What you give it is written to the file as handed over.
  3. Can it scan the code for your current UI standard? It reads tokens, theme config and repeated patterns, then shows you a short summary with every inferred item marked as inferred. Nothing is saved until you approve it, and the script refuses a scan write without an --approved flag.

If you decline all three, it carries on with the guideline defaults and says in its report that no project standard was found. The script also refuses to overwrite an existing file unless it is told to, so a second run cannot clobber a standard someone edited by hand.

Seven hard rules

These sit at the top of SKILL.md, and they explain most of what you will see it do.

  1. Follow the project's design system first. It reads FRONTEND.md, then the tokens, theme config and components. It does not impose a new palette, typeface or component set on an existing product.
  2. Guidelines are the floor, the method is the craft. Behaviour, structure and accessibility come from the guidelines. Visual character comes from the method.
  3. Tokens, not literals. No raw colour values in components, and every colour works in light and dark.
  4. Reuse before you build. If a component fits, it uses it. It does not create a second way to do something the product already does.
  5. Do not copy drift. If existing code breaks a guideline, such as a drawer that closes when you click outside it, the new code follows the guideline and not the old code.
  6. Stay in scope. A fix changes only what the issue needs, and other problems are listed, not fixed. A refinement keeps the existing identity. A redesign replaces it, and does not polish pieces of a look it was asked to replace.
  7. Check your work. Both themes, the sizes the screen ships at, keyboard focus and contrast, with an automated audit where the environment allows. Anything it could not check is reported as not run.

Two modes

Design a new screen runs in six steps. Understand the job in one sentence each: who uses it, what they need to do, what it handles. Find the design system. Place the screen, choosing the page container, the list view and the overlay type from the layout rules. Write a short plan before any code: tokens, an ASCII wireframe, the text hierarchy, and the empty, loading, error and success states. Build from existing components with real copy. Then critique: cut decoration that carries no information, run the checklist and report what was reused and what is new.

Fix a UI issue runs in five. Reproduce it on the screen, theme, viewport and state where it fails, or say it could not be run. Name the rule it breaks. Make the smallest fix, preferring a token or class swap over restructuring markup. Re-check in light and dark, at a narrow width and with the keyboard. Report the cause, the change, the rule it restores, and related problems it saw but left alone.

The output is meant to be short. For a new screen that is the plan, the files changed, what was reused and anything new. For a fix it is the cause, the change, the rule and how it was checked.

What the guidelines require

The numbers are defaults. If your project already has a component or a pattern, its numbers win.

Tokens, themes and colour

  • Colours, spacing, radii, shadows and fonts are named tokens, named by role (surface, text-muted, danger) and not by appearance (blue-500). A palette change becomes a one-file edit.
  • Every colour usage has a light and a dark state, checked in both. A bright accent that works as text on dark often fails on white, so the light theme gets a darker variant.
  • Success, warning, error and info each have a role, and meaning is never carried by colour alone. It is paired with an icon, a label or text.

Type and accessibility

  • Body text is 16px or larger and labels and metadata are 14px or larger. 12px is for legal and footer text only. A design that does not fit gets reflowed, not shrunk.
  • Line length runs 50 to 75 characters, with body blocks no wider than about 700px. Tap targets are at least 44 by 44px.
  • Contrast is 4.5:1 for normal text and 3:1 for large text, control borders and focus rings, measured on the real background in each theme and state.
  • Every control has a visible keyboard focus state. Icon-only buttons have an accessible name. Dialogs trap focus and return it on close. Reduced motion is respected.

Motion and copy

  • Motion answers a user action or marks a real change. No entrance animation on every section, no hover effect on every card. Typical timings are 250 to 300ms for drawers and 150 to 200ms for modals.
  • Buttons say what they do ("Save changes", not "Submit"), and an action keeps one name through the whole flow. Errors say what went wrong and how to fix it, and do not apologise. Empty states invite an action.
  • A content rule applies on top. No invented data posing as real (emails, IDs, metrics) to make a screen look populated. No filler labels: if removing a string removes no information, it goes. No themed synonyms for standard actions. No unicode glyphs standing in for icons.

Where things go: drawers, modals and the shell

references/layout.md settles the structural questions that otherwise get decided differently on every page.

Operation Container
Edit an existing record Drawer, even if the form is short
Create a record with a few fields Modal
Confirm, delete, or a short input Modal

A drawer has a pinned header, a body that scrolls on its own and a pinned footer. It does not close when you click outside it. It has a close button in the header and a separate Cancel in the footer, and the close button never stands in for Cancel. Delete is confirmed inline in the footer, not in a second dialog. Each drawer takes a zIndex prop, and a child it opens gets that value plus 10, so nesting never depends on hardcoded stacking classes.

The shell is one fixed navigation pattern, a top bar and a main region that scrolls on its own. Every route has a title entry. Lists use one shared search toolbar and either a table or a board, with applied filters made visible. Long text is clamped to a few lines, not cut to one. The same file has page recipes for dashboards, settings and reports, and a list of six common gaps it will not copy from existing code, among them a route with no title, raw palette colours on delete buttons and a drawer without a Cancel.

Component structure follows references/component-architecture.md: files colocated by component, composition over long prop lists, data fetching kept separate from presentation, and state placed at the simplest level that works. It does not restructure code that already follows a different, consistent pattern.

How it checks its work

references/verification.md turns "test it" into specific checks.

  • Render it. If the app can run, screenshots at 1440, 1024, 768 and 390px, in light and dark at each. Look once, fix, look again.
  • Audit it. Only with tools already installed. It probes with npx --no-install, so it never downloads a package for the check, and runs the pinned @axe-core/cli@4.13.0 and pa11y@9.1.1 against the served page. Critical and Serious findings are fixed before hand-back. Each reported violation is confirmed in the browser first, because a tool reports candidates, not verdicts.
  • Do it by hand. Tab through every control, press Escape on menus and overlays, toggle reduced motion, zoom to 200% and check contrast against the rendered background.

The last line of that file is the one to remember: a check you did not run is not a check that passed. The skill reports which checks ran and which could not.

What it needs

  • Codex CLI. If you have not set it up yet: PowerShell setup or WSL setup.
  • Python 3 for the FRONTEND.md script, which uses only the standard library.
  • Node, only if you want the automated accessibility audit. Without it, the skill skips the audit, says so, and does the manual pass.
  • A web project. The skill is about web interfaces, and it works best where there is already a design system to follow.

Install and usage

Install the skill, then restart Codex:

$skill-installer install https://github.com/lowtouch-ai/krithi-skills/tree/main/skills/frontend-design

Open Codex in the project you are working on and give it a screen to build:

$frontend-design add a drawer for editing an invoice, with status, due date and notes

Or a bug to fix:

$frontend-design the orders table is unreadable in dark mode and the delete button has no visible focus state

On the first run in a project with no FRONTEND.md, expect the three questions from Step 0 before any design work. Answer them once. After that the file is read automatically and the skill does not ask again.

To update the skill later:

$skill-installer update https://github.com/lowtouch-ai/krithi-skills/tree/main/skills/frontend-design

To remove it, delete the folder:

rm -rf ~/.codex/skills/frontend-design

Where it fits

Use it when the work is a screen, a drawer, a modal, a form or a component, or a layout, spacing, colour, contrast, theme or responsive bug. It pairs with wave-a11y-scan, which audits a whole project's source for accessibility, while this skill applies the same standard as the screen is being made. For a larger change, plan-builder can turn the ticket into a plan first, and prepare-pr takes the finished work to a pull request.

For update and uninstall steps for the skills in general, see the krithi-skills README.

Frequently asked questions

What does the frontend-design skill for Codex do?

It designs new screens and fixes UI issues in web applications. It reads the project's own design standard first, builds from existing tokens and components, and checks light and dark themes, keyboard focus and contrast before it hands the work back.

What is FRONTEND.md and does the skill need it?

FRONTEND.md is a file at the repository root that records the project's UX and branding standard. The skill reads it first and it overrides the skill's own defaults. If the file is missing, the skill asks whether you have the standard, a link or references, and offers to scan the code. With a link, it stores a pointer and re-reads the source every run.

Will it change my colours or fonts?

No. The guidelines are brand-neutral and the skill follows the project's own design system. Only when there is no design system anywhere does it make one deliberate set of choices and define them as tokens, and it offers to save them to FRONTEND.md.

When does it use a drawer and when a modal?

A drawer edits an existing record, even if the form is short. A modal creates a record with a few fields, confirms an action or takes a short input. Neither closes when you click outside it.

Does it run the accessibility audit automatically?

Only if @axe-core/cli and pa11y are already installed. It probes with npx --no-install and never downloads a package for the check. If they are missing it skips the audit and says so in its report, then does a manual pass for keyboard focus, reduced motion, 200% zoom and contrast.

Install all the skills together

If you want the whole set instead of one skill, point the installer at the repository root:

$skill-installer install all the skills in the https://github.com/lowtouch-ai/krithi-skills/

This asks Codex to install every skill in the krithi-skills repository in one step, so you do not repeat the install for each one. Restart Codex afterwards so the new skills are picked up.

The set currently covers eleven skills:

  • frontend-design: designs new screens and fixes UI issues from your own design system, then checks both themes, keyboard focus and contrast.
  • status-bar: installs a footer that always shows repo, branch, PR number, model and context usage in Codex or Claude Code.
  • validate-pr: tests a pull request by launching it, runs Playwright tests against the PR's exact commit and returns an evidence-backed status.
  • review-pr: reviews a pull request from just its link against its requirements and the Krithi process, scores it and posts the comment when you add post.
  • feature-estimate: turns customer emails, notes and tickets into a traceable requirements register, PRDs, stories and a sprint estimate.
  • prepare-pr: reviews finished work, checks the branch, commits in-scope files and opens the pull request with your approval at each step.
  • migration-estimate: turns a codebase into PRDs, stories and a sprint estimate with human-team and Krithi timelines.
  • plan-builder: turns a ticket into a Plan Mode prompt that changes no code.
  • repo-readme-generator: creates or updates a README and documentation suite from verified repository evidence.
  • appsec-static-audit: runs a source-code-only security audit with compliance mapping.
  • wave-a11y-scan: runs a WAVE-style accessibility scan mapped to WCAG 2.x.

Prefer to install one at a time? Use the single-skill command in the install section above.

About the Author

Rejith Krishnan

Rejith Krishnan

Founder and CEO

Rejith Krishnan is the Founder and CEO of lowtouch.ai, a platform dedicated to empowering enterprises with private, no-code AI agents. With expertise in Site Reliability Engineering (SRE), Kubernetes, and AI systems architecture, he is passionate about simplifying the adoption of AI-driven automation to transform business operations.

Rejith specializes in deploying Large Language Models (LLMs) and building intelligent agents that automate workflows, enhance customer experiences, and optimize IT processes, all while ensuring data privacy and security. His mission is to help businesses unlock the full potential of enterprise AI with seamless, scalable, and secure solutions that fit their unique needs.

LinkedIn →