From agents
Build and audit React, Tailwind, shadcn/ui interfaces. Scaffold, create components/pages, theme, refactor, verify rendered UI. Use when building UI. NOT for backend, tests, state, routing, or DevOps.
npx claudepluginhub wyattowalsh/agents --plugin agentsThis skill uses the workspace's default tool permissions.
Build production-grade frontend interfaces with modern React, TailwindCSS v4, and shadcn/ui. Six modes from project scaffolding to rendered UI audit.
evals/audit-mode.jsonevals/component-creation.jsonevals/component-mode.jsonevals/evals.jsonevals/page-design.jsonevals/refactor-mode.jsonevals/scaffold-mode.jsonevals/scope-refusal.jsonevals/theme-mode.jsonreferences/aesthetic-guide.mdreferences/anti-patterns.mdreferences/modern-css.mdreferences/react-19.mdreferences/shadcn-patterns.mdreferences/tailwind-v4.mdreferences/typography.mdreferences/vite-config.mdscripts/scan_frontend.pyCreates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Build production-grade frontend interfaces with modern React, TailwindCSS v4, and shadcn/ui. Six modes from project scaffolding to rendered UI audit.
Input: $ARGUMENTS — mode keyword + target, natural language UI description, or file path.
| Term | Meaning | NOT |
|---|---|---|
| server component | React component rendered on the server; default in Next.js/Remix App Router | "SSR component" |
| client component | React component with "use client" directive; runs in the browser | "CSR component" |
| design token | CSS custom property holding a design decision (color, spacing, font) | "CSS variable" (too generic) |
| theme | Complete set of design tokens configured in @theme {} | "skin", "palette" |
| component | Reusable UI building block (React component + styles) | "widget", "module" |
| primitive | Radix UI base component providing behavior without styling | "base component" |
| registry | shadcn/ui component distribution endpoint (local or remote) | "package", "library" |
| container query | CSS @container rule for component-scoped responsive design | "media query" (page-scoped) |
| action | React 19 Server Action: async function executed server-side via form | "API call", "handler" |
| scaffold | Create a new project with full stack configuration | "bootstrap", "setup" |
| refactor | Modernize existing frontend code to current best practices | "rewrite" |
| audit | Read-only analysis of frontend codebase quality and patterns | "review", "scan" |
| utility class | Tailwind CSS class mapping to a single CSS declaration | "helper class" |
| logical property | CSS property using start/end instead of left/right for RTL | "directional property" |
| texture healing | Monaspace technique for adjusting glyph spacing in monospace | — |
Route $ARGUMENTS to the appropriate mode:
$ARGUMENTS pattern | Mode | Start at |
|---|---|---|
scaffold <name> / init <name> | Scaffold | Mode A |
component <name> / create <name> | Component | Mode B |
page <name> / view <name> / screen <name> | Page/View | Mode F |
theme / theme <path> / tokens / tokens <path> | Theme | Mode C |
refactor <path> / style <path> | Refactor | Mode D |
audit / audit <path> | Audit | Mode E |
| Natural language UI description ("build a sidebar", "design a card") | Auto: Component | Mode B |
| Natural language page/view description ("build a landing page", "design a dashboard") | Auto: Page/View | Mode F |
Path to existing .tsx/.jsx/.css file or directory | Auto: Refactor | Mode D |
| Error message / "not working" / "broken" | Auto: Audit | Mode E |
| "backend" / "API" / "database" / "DevOps" / testing / state / routing / build tooling | Refuse | Redirect to relevant skill |
| Empty | Gallery | Show modes with example invocations |
For ambiguous inputs, disambiguate before routing:
| Signal | Route to |
|---|---|
| Error, broken, bug, crash, "doesn't work" | Audit |
| Test runner, state library, router, bundler, package manager, CI | Refuse or redirect |
| Upgrade, modernize, migrate, update, convert | Refactor |
| Colors, dark mode, tokens, palette, branding | Theme |
| Landing page, dashboard, settings, checkout, profile, app shell, route, screen | Page/View |
| Build, create, design, add, new + component noun | Component |
| Setup, init, start, new project | Scaffold |
| Mixed signals | Ask user which mode |
Consult live docs only when: user reports unexpected behavior, a reference notes a pre-release API, or user asks about features not covered in bundled references.
resolve-library-id for "tailwindcss", "shadcn-ui", or "react", then query-docs.site:tailwindcss.com, site:ui.shadcn.com, or site:react.dev for specific topics.Goal: Create a new project with the full modern frontend stack.
Load: references/tailwind-v4.md, references/vite-config.md, references/shadcn-patterns.md, references/typography.md, references/aesthetic-guide.md
Ask or detect:
| Framework | When |
|---|---|
| Vite + React | SPA, no SSR needed, fastest setup |
| Next.js App Router | SSR/SSG, Server Components, production web apps |
| Remix | Full-stack, nested routing, progressive enhancement |
Default to Vite + React unless user specifies otherwise.
CSS-first configuration — no tailwind.config.js:
@import "tailwindcss";
@theme {
--color-primary: oklch(0.6 0.2 260);
--color-surface: oklch(0.98 0 0);
--color-surface-dark: oklch(0.15 0 0);
--font-display: "Your Display Font", serif;
--font-body: "Your Body Font", sans-serif;
--font-mono: "Monaspace Neon", monospace;
}
npx shadcn@latest init
Configure components.json for project structure. Install core components: button, input, card, dialog, dropdown-menu, toast.
references/typography.md for @font-face setup and fluid type scale.Run the domain-fit gate and design thinking exercise (see Aesthetic Direction section below). Commit to an appropriate direction before writing UI code.
src/
components/ui/ # shadcn/ui components (managed by CLI)
components/ # Custom project components
lib/ # Utilities, helpers
hooks/ # Custom React hooks
styles/ # Global CSS, @theme, @font-face
app/ or pages/ # Routes (framework-dependent)
Run the Visual Acceptance Gate before declaring scaffolded UI complete.
Goal: Design and build a single component with production quality.
Load: references/react-19.md, references/shadcn-patterns.md, references/modern-css.md
Conditional: Load references/aesthetic-guide.md for visual/landing/hero/marketing components. Skip for utility components, forms, data tables.
| Context | Default | "use client" needed? |
|---|---|---|
| Next.js / Remix App Router | Server Component | Only if using hooks, event handlers, or browser APIs |
| Vite + React | Client Component | No — "use client" is unnecessary, all components are client |
For compound components (e.g., <Tabs>, <Accordion>): separate server wrapper from client interactive parts.
Gather before building:
Check if shadcn/ui provides the component or a close base. If interactive (dialog, dropdown, popover, tooltip, tabs, accordion, toggle), use Radix UI primitives via shadcn/ui — never build from scratch.
Load references/shadcn-patterns.md for CLI commands and customization patterns.
@theme {}@container queries for component-level adaptation, not media queries:has() for parent-based styling, view transitions for state changesNon-negotiable for every interactive component:
Run the Visual Acceptance Gate for any rendered component or component demo.
Goal: Configure or reconfigure the project's design token system.
Load: references/tailwind-v4.md, references/modern-css.md, references/typography.md
If $ARGUMENTS contains tokens: run token extraction workflow:
.tsx, .jsx, .css files@theme {} block with organized custom propertiesUse oklch for perceptually uniform color manipulation:
@theme {
--color-primary: oklch(0.6 0.2 260);
--color-primary-light: color-mix(in oklch, var(--color-primary) 70%, white);
--color-primary-dark: color-mix(in oklch, var(--color-primary) 70%, black);
}
contrast-color() is experimental — Firefox 146+ and Safari TP only. Use manual fallbacks:
/* Fallback for contrast-color() */
--color-on-primary: oklch(1 0 0); /* manually chosen for contrast */
CSS custom properties strategy with Tailwind v4:
@custom-variant dark (&:where(.dark, .dark *));
Override tokens on the .dark selector:
.dark {
--color-surface: oklch(0.15 0 0);
--color-text: oklch(0.95 0 0);
}
Fluid type scale with clamp():
@theme {
--text-base: clamp(1rem, 0.5vw + 0.875rem, 1.125rem);
--text-lg: clamp(1.125rem, 0.75vw + 1rem, 1.25rem);
--text-xl: clamp(1.25rem, 1vw + 1.125rem, 1.5rem);
}
Audit and convert directional properties to logical equivalents:
| Physical | Logical |
|---|---|
margin-left | margin-inline-start |
padding-right | padding-inline-end |
text-align: left | text-align: start |
float: right | float: inline-end |
Goal: Modernize existing frontend code to current best practices.
Load: references/tailwind-v4.md, references/react-19.md, references/modern-css.md, references/anti-patterns.md
Before any changes, scan the project:
tailwind.config.js or tailwind.config.ts — v3 legacy config?"use client" count across .tsx/.jsx files@media vs @container ratio — component responsiveness pattern?font-family declarations — are distinctive fonts used or defaults?package.json for React version, Tailwind version, Vite version| From | To | Reference |
|---|---|---|
tailwind.config.js | CSS-first @import "tailwindcss" + @theme {} | references/tailwind-v4.md |
@media for component sizing | @container queries | references/modern-css.md |
| Manual dropdowns/modals | Radix primitives via shadcn/ui | references/shadcn-patterns.md |
| Hardcoded colors | Design tokens in @theme {} | Mode C |
| Class components | Function components + hooks | references/react-19.md |
Excessive "use client" | Server Components where possible (Next.js/Remix only) | references/react-19.md |
Goal: Read-only analysis of frontend codebase quality. Never modify code.
Load: references/anti-patterns.md
Run the same checklist as Mode D (§D.1).
| Dimension | What to check |
|---|---|
| Stack currency | Tailwind v4 CSS-first? React 19? Latest shadcn/ui? |
| Component patterns | Server vs client split? Radix primitives? Compound components? |
| Design tokens | @theme usage? Hardcoded values? Token layers? |
| CSS modernness | Container queries? :has()? Logical properties? @supports guards? |
| Typography | Distinctive fonts? Monaspace for code? Fluid type scale? |
| Accessibility | ARIA attributes? Keyboard nav? Focus management? Contrast ratios? |
| Visual proof | Screenshots/browser inspection? Mobile/desktop states? Overflow, overlap, focus, reduced motion? |
## Frontend Audit Report
### Critical (must fix)
- [finding with evidence]
### Warning (should fix)
- [finding with evidence]
### Suggestion (nice to have)
- [finding with evidence]
### Strengths
- [well-implemented patterns]
### Recommended Actions
- [action] → use `/frontend-designer refactor <path>`
- [action] → use `/frontend-designer theme`
Goal: Design and build a full page, route, screen, dashboard, landing page, or app shell.
Load: references/react-19.md, references/shadcn-patterns.md, references/modern-css.md, references/typography.md
Conditional: Load references/aesthetic-guide.md for marketing, hero, editorial, portfolio, game, or brand-heavy pages.
Gather before building:
Run for Scaffold, Component, Page/View, and Refactor outputs whenever a rendered surface exists.
Before building visual components or pages, choose the direction that fits the domain and audience:
| Domain | Default direction |
|---|---|
| SaaS, CRM, admin, finance, ops, docs | Restrained, dense, scannable, predictable |
| Marketing, portfolio, editorial, brand, product showcase | Expressive, asset-led, memorable |
| Games, toys, experiments, art tools | Playful, immersive, highly interactive |
Design Thinking:
Anti-Slop Rules:
Full aesthetic catalog, color theory, motion design, spatial composition: load references/aesthetic-guide.md.
Supersedes: The frontend-design skill. All aesthetic guidance is now here.
NOT for:
javascript-conventionsLoad on demand during the relevant mode. Do NOT load all at once.
| File | Content | Load during |
|---|---|---|
references/tailwind-v4.md | CSS-first config, @theme, @import, Oxide engine, dark mode, container queries, v3→v4 migration | Scaffold, Theme, Refactor |
references/shadcn-patterns.md | CLI commands, components.json, RTL, registries, Radix primitives, compound components, forms | Scaffold, Component |
references/react-19.md | Server vs Client decision tree (framework-dependent), Actions, useActionState, use(), Suspense | Component, Refactor |
references/modern-css.md | Container queries, :has(), @scope, view transitions, scroll-driven animations, anchor positioning, color-mix(), @layer | Component, Theme, Refactor |
references/typography.md | Monaspace superfamily, variable fonts, @font-face, font pairing, fluid type scale with clamp() | Scaffold, Theme, Component (visual) |
references/aesthetic-guide.md | Design thinking, aesthetic catalog, color theory, motion, spatial composition, anti-slop rules | Component (visual/landing/hero), Scaffold |
references/vite-config.md | Current Vite setup, plugins, CSS handling, asset optimization, env variable security | Scaffold |
references/anti-patterns.md | Detection criteria and fixes for common frontend anti-patterns | Audit, Refactor |
Run before declaring this skill complete after edits:
uv run wagents validate
uv run wagents eval validate
uv run python path/to/audit.py skills/frontend-designer/ --format json
uv run wagents package frontend-designer --dry-run
uv run pytest -q tests/test_frontend_designer_scan.py
uv run wagents readme --check
Completion criteria: all commands pass with zero errors, audit score is A (90+), and docs-steward has handled generated docs if skill docs changed.
tailwind.config.js in Tailwind v4 — CSS-first with @import "tailwindcss" and @theme {} exclusively"use client", Server Components are default. In Vite+React: "use client" is unnecessary, all components are client@theme {} — never hardcode colors, spacing, or font valuesprefers-color-scheme, prefers-reduced-motion, hover, pointer)@supports guards for progressive enhancement — mandatory for contrast-color(), anchor positioning, scroll-driven animations, @scopemargin-inline-start not margin-left, padding-block not padding-top