Agent skill

Frontend Responsive UI Skill: Mobile-First CSS

The frontend-responsive-ui skill teaches an AI coding agent to build mobile-first layouts with fluid containers, relative units, shared breakpoints and touch targets of at least 44x44px.

Install
git clone https://github.com/am-will/codex-skills.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the frontend-responsive-ui skill?

The frontend-responsive-ui skill is a SKILL.md in am-will's codex-skills repository. It sets rules for responsive front end code: start from the mobile layout, reuse the project's breakpoints, size in rem, keep touch targets at 44x44px or more, serve right-sized images and test at five widths.

Its SKILL.md frontmatter names it Frontend Responsive Design Standards, and its rule fits one line: mobile-first development with consistent breakpoints, fluid layouts, relative units and touch-friendly targets. The repository is a collection of Codex and agent skills.

Each section pairs a bad example with a good one in CSS, Tailwind or JSX. The agent copies the good pattern when it writes layouts and walks a verification checklist before it calls the work finished.

What changes in your agent's output

  • Base styles target the smallest screen, and min-width media queries add columns at 768px and 1024px. The desktop-first max-width pattern is shown as the wrong way.
  • The agent checks the codebase for existing breakpoints before inventing any, and avoids arbitrary values such as 850px or 1150px unless a task requires them.
  • Containers use width: 100% with a max-width. Sizes move from px to rem, while px stays for borders and shadows. Reading lines cap near 65ch, which pairs well with typography-scale.
  • Icon buttons gain padding or min-width and min-height so each target reaches 44x44px, with at least 8px between interactive elements.
  • Images get srcset and sizes, or a picture element with AVIF and WebP sources.

Quick reference the skill ships

SituationAction
Starting a new layoutBegin with mobile at 320 to 375px
Need a breakpointUse the project standard; check existing code first
Setting a widthwidth: 100% plus max-width
Setting font size or spacingUse rem; 16px equals 1rem
Button too smallEnsure at least 44x44px with padding
Testing a layoutCheck 375px, 768px, 1024px and 1440px

Who the frontend-responsive-ui skill is for

Best for

  • Building or restyling layouts that must work on phone, tablet and desktop.
  • Tailwind or Bootstrap projects, since the skill lists the default breakpoints for both. For a Tailwind token setup, see tailwind-design-system.
  • Finishing a layout with the checklist: mobile first, shared breakpoints, no fixed widths, readable type, no horizontal scroll.

Not for

  • Choosing a visual style, palette or typographic personality. The skill sets responsive mechanics, not the look. See frontend-design for that.
  • Native mobile apps. The examples are CSS, Tailwind classes and JSX.
  • Running tests for you. It lists testing methods such as DevTools responsive mode and real devices, but the agent or you still have to run them.
  • Deeper pattern libraries. Compare owl-responsive-design or wshobson-responsive-design.

Use it with UiChemy

This skill governs front end code your agent writes. If that code is an AI build you bring into WordPress with UiChemy AI to WordPress, test the imported page at 375, 768, 1024 and 1440px, as the checklist does. Click Get Started on uichemy.com.