agentleFS
subhash-arabhisubhash-arabhi/saas-playbook/skills/frontend-ui-engineering/SKILL.md

frontend-ui-engineering

Skill1 starsChanged 30 days agoMITView on GitHub

Builds production-quality, responsive user interfaces that follow the project's design system. Use when building or modifying pages, screens or components, implementing layouts, wiring UI to the API, managing UI state, or when the output needs to look and feel like a real product rather than AI-generated.

67 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use constraint-driven-development, deprecation-and-migration and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MrCipherSmithSkill

    constraint-driven-development

    Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.

    Also in 13 projects that use this

  • HK-hubSkill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 33 projects that use this

  • HK-hubSkill

    source-driven-development

    Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters.

    Also in 35 projects that use this

  • seikaikyoSkill

    doubt-driven-development

    對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。

    Also in 29 projects that use this

  • seikaikyoSkill

    interview-me

    需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。

    Also in 31 projects that use this

  • AnasX7Skill

    redesign-existing-projects

    Upgrades existing websites and apps to premium quality. Audits current design, identifies generic AI patterns, and applies high-end design standards without breaking functionality. Works with any CSS framework or vanilla CSS.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 60 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Project rules first: If the project has .agents/rules/ (installed with the SaaS playbook), read .agents/rules/frontend.md and …

    line 8
  2. Distinctive:

    Use only its tokens and components: No hard-coded colors, font sizes, font families, spacing or radii.

    line 19
  3. Very specific:

    Need a new component, variant or state?: Add it to the design system first (tokens, states, desktop and mobile behaviour), through the …

    line 20
  4. Distinctive:

    Missing a token?: Add it to the design system with a one-line rationale, re-export, then use it.

    line 21
  5. Distinctive:

    No design system yet?: Write one before building UI.

    line 23
  6. Distinctive:

    Reference-led quality: when a screen needs direction, study two or three relevant screens (project references or user-supplied).

    line 25
  7. Very specific:

    Spacing: only the spacing scale (13px is a bug).

    line 28
  8. Very specific:

    Typography: only the type roles. One h1 per page, no skipped heading levels, no heading styles on non-headings.

    line 29
  9. Distinctive:

    No prop drilling deeper than 3 levels: Use context or restructure.

    line 43
  10. Very specific:

    Labels: every input has a visible label.

    line 63
  11. Distinctive:

    Visible focus: never remove the outline without a visible replacement.

    line 64
  12. Very specific:

    Use 100dvh, not 100vh, for full-height sections.

    line 73
  13. Very specific:

    Prefer CSS Grid for page layout over percentage math (e.g.

    line 74
  14. Very specific:

    Motion: every screen follows the motion inventory in the design system (press, hover, overlays, lists, route changes, content load, …

    line 81

“Common” is measured: kept by at least 6 in 10 of the 60 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- Adapted from addyosmani/agent-skills@1401c8b (MIT, see licenses/), with an "Avoid the AI look" section distilled from Leonxlnx/taste-skill@6010f91 (MIT). Changes: design-system contract, motion inventory and quality bar (quality-bar.md, baseline-ui.md adapted from ibelick/ui-skills@55363c3, MIT, app-screens.md from taste-skill@6010f91), View Transitions, Tailwind styling, framework-agnostic, full accessibility audit as a separate pass, OpenAPI client, browser checks, trimmed (examples and AI-look table in references/); layered: general guidance here, playbook decisions in .agents/rules/. -->

Project rules first. If the project has .agents/rules/ (installed with the SaaS playbook), read .agents/rules/frontend.md and .agents/rules/testing.md and follow them: they override this skill where they differ. Without them, follow this skill as written.

Frontend UI Engineering

Build UI that follows the design system, handles every state, works at desktop and mobile sizes, and avoids the "AI look". Styling is always Tailwind CSS; the framework varies per project. Prototypes get the same foundation.

Design System First

The app has one design system, usually one root file (e.g. DESIGN.md): light and dark themes, all tokens, every component with variants and states.

  1. Read the design system first, every time, before touching UI.
  2. Use only its tokens and components. No hard-coded colors, font sizes, font families, spacing or radii. Reuse the shared component for every button, input, card and so on; never restyle one locally.
  3. Need a new component, variant or state? Add it to the design system first (tokens, states, desktop and mobile behaviour), through the project's design-change flow if it has one (/front-end-design), then build it as a shared component.
  4. Missing a token? Add it to the design system with a one-line rationale, re-export, then use it. Never invent a one-off value in a component.
  5. Styling is Tailwind CSS. Tokens reach the code by export, not by hand-copying: for a DESIGN.md, npx @google/design.md@<pinned-version> export --format css-tailwind writes Tailwind's @theme. Use only theme classes, never arbitrary values (p-[13px], bg-[#…]) or inline styles. The project pins the version.
  6. No design system yet? Write one before building UI. Start from one or two real SaaS brands' design systems and customize them: your own brand color, type, voice and name. Never ship a near-copy of another brand.

Reference-led quality: when a screen needs direction, study two or three relevant screens (project references or user-supplied). Rebuild their hierarchy, density, navigation, controls and states with your own tokens and content. Never copy another product's branding, text, imagery or exact layout.

Adherence:

  • Spacing: only the spacing scale (13px is a bug).
  • Typography: only the type roles. One h1 per page, no skipped heading levels, no heading styles on non-headings.
  • Color: semantic tokens (text, surface, border, accent), never raw hex. Never color as the only signal of state (add text or an icon).
  • Radius and elevation: one radius scale; shadows only where the design system defines them.
  • Component library (e.g. shadcn/ui, Radix): theme it with the design system's tokens. Never ship its default look.
  • In Tailwind, the same rule means using classes from the exported theme, not arbitrary values like p-[13px].

Components and State

  • Colocate implementation, tests, state helper and types in one folder.
  • Composition over configuration (child components, not many props).
  • One job per component. Over ~200 lines usually means split it.
  • Separate data from presentation: a container fetches and picks the state; a presentational component renders what it's given.
  • Simplest state that works: local (one component) → lifted (2–3 nearby) → context (theme, auth, locale) → URL (filters, sorting, pagination, tabs) → server state in a cache library (e.g. TanStack Query, SWR) → global store only for complex app-wide client state (rare, e.g. Zustand).
  • Never copy API data into local or global state. The cache library owns it.
  • No prop drilling deeper than 3 levels. Use context or restructure.

For pseudocode examples (composition, container, optimistic update, tokens), read references/patterns.md.

Data from the API

  • Generate the API client and types from the OpenAPI spec (the api-and-interface-design skill, if installed). Never hand-write API types or fetch wrappers. Regenerate when the API changes.
  • Server state goes through the cache library.
  • Every data view handles loading, empty and error, and success and permission states where they apply. Build them with the happy path. Show the API error's message, never stack traces.
  • Optimistic updates are fine for quick toggles, with rollback on error and a cache invalidation afterwards.

Avoid the AI Look

Before building or finishing any visible UI, read references/avoid-ai-look.md, references/quality-bar.md and references/baseline-ui.md. Avoid every pattern in the first unless the design system or the user asks for it; meet the other two. Before building an app screen (dashboard, admin, analytics, settings, a list or queue, one object's detail page), also read references/app-screens.md and meet it. Re-read every visible string before finishing.

Don't Break the Basics

The full WCAG 2.2 AA audit is a separate pass before release. During builds:

  • Real elements: buttons are buttons, links are links. Never a clickable div.
  • Labels: every input has a visible label; icon-only buttons have an accessible name (aria-label="Close dialog").
  • Visible focus: never remove the outline without a visible replacement. Everything clickable is reachable by Tab.
  • Alt text: meaningful images get alt; decorative ones get alt="".
  • Dialogs: focus moves in on open and back on close (native <dialog> or the library's dialog does this).

Responsive

  • Build mobile-first. Every multi-column layout states how it collapses on small screens.
  • Always check a desktop and a mobile size (e.g. 1440×900 and 390×844).
  • Breakpoints around 320, 768, 1024 and 1440px, or what the design system defines.
  • Use 100dvh, not 100vh, for full-height sections.
  • Prefer CSS Grid for page layout over percentage math (e.g. in Tailwind: grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3).

Loading, Empty, Error, Motion

  • Loading: skeletons matching the final layout (aria-busy on the region). No layout shift when data arrives.
  • Empty: say what's missing and offer the next action ("No invoices yet" + "Create invoice").
  • Error: inline for forms and sections; toast only for short-lived feedback. Offer a retry when it helps.
  • Motion: every screen follows the motion inventory in the design system (press, hover, overlays, lists, route changes, content load, toasts), with the design-motion-principles skill (if installed). Animate only transform and opacity; respect prefers-reduced-motion.

View Transitions

For route changes and shared elements, use the View Transitions API: React's <ViewTransition> component or document.startViewTransition. Name shared elements with view-transition-name, keep durations on the design system's page token, and fall back to an instant change where it's unsupported. For details, Vercel's react-view-transitions skill.

Checking the UI

  • While building: open it in a real browser (the browser-testing-with-devtools skill, if installed). Check both sizes, a clean console, and loading, empty and error states.
  • Core user flows: an automated E2E suite (e.g. Playwright).
  • Before a PR, if UI changed: UI audit of the changed UI files (the web-design-guidelines skill, if installed).
  • Before release to real users: the full accessibility audit.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.