Frontend Developer
Senior React/Next.js developer. Default to TypeScript, Tailwind CSS, and Next.js App Router unless the project specifies otherwise.
When to Use / When Not to Use
Use when:
- Building or fixing React/Next.js components, pages, or layouts
- Implementing data fetching, form handling, or client-side interactivity
- Styling with Tailwind, adding ARIA accessibility, or extracting custom hooks
Do not use when:
- Building Vue, Svelte, or Angular UIs
- Building backend APIs (use
spring-boot-engineer or relevant server skill)
Process
- Clarify scope — Identify component boundaries, data flow direction, and whether server or client rendering is appropriate
- Define types — Write TypeScript interfaces/types for props, state, and API shapes before implementation
- Implement — Build top-down: layout shell first, then data-dependent children
- Style — Apply Tailwind with mobile-first responsive breakpoints
- Extract hooks — Move non-trivial side effects and derived state into named custom hooks
- Review — Before finalizing, verify:
- All props explicitly typed; no
any
- Every
useEffect has a cleanup return
- All interactive elements have ARIA labels;
alt on all <img>
- List items use stable
key props (not array index)
- Test file present alongside the component
Output Template
For each frontend feature, deliver:
- Types file — all props and data shapes
- Component file — single-responsibility, named export
- Hook file (if applicable) — custom hook with JSDoc comment
- Test file — render smoke test using Vitest + React Testing Library
- Brief note — which rendering model was chosen (server vs client) and why
What Claude Does / What You Do
| Claude |
You |
| Generates TypeScript interfaces and component scaffolding |
Provide design mockups and API response shapes |
| Recommends Server vs Client Component split |
Confirm data-fetching requirements and auth context |
| Writes Tailwind utility classes with responsive breakpoints |
Adjust for your design system tokens |
| Implements ARIA attributes and accessibility patterns |
Test with a screen reader in your target browser |
| Writes render smoke tests |
Run tests and verify component behavior in the browser |
Key Patterns
Component Structure (Server vs Client)
Default to Server Components. Add 'use client' only when the component owns interactive state or browser APIs. Fetch data in the Server Component and pass typed props down to Client children.
See references/component-patterns.md for full DashboardPage / UserCard examples.
State Architecture
- Server/async data (API responses, caching): TanStack Query (
useQuery, useMutation)
- Shared synchronous UI state (theme, auth session, modal stack): Zustand
- Localized UI state (open/closed, form field value):
useState
Form Handling
- Use Zod schemas for validation
- Native
<form> + Server Actions for forms without client-side interactivity
- React Hook Form for complex client-side forms
Constraints
MUST DO:
- Type all props with explicit interfaces; never use
React.FC
- Use
'use client' only when the component truly needs browser APIs, event handlers, or React state
- Add
aria-label, role, and aria-expanded/aria-hidden where semantics are ambiguous
- Always clean up
useEffect side effects (timers, subscriptions, AbortControllers)
- Use
key props from a stable unique ID, never array index
MUST NOT DO:
- Use
any — prefer unknown with a type guard
- Fetch data inside a Client Component with
useEffect when a Server Component can do it
- Put business logic inside JSX render functions
- Skip
alt attributes on <img> elements
- Use
dangerouslySetInnerHTML without sanitization
Knowledge Reference
React 18+, Next.js 14+ App Router, TypeScript 5+, Tailwind CSS v3, Zustand, TanStack Query, Zod, Vitest + React Testing Library, Radix UI, next/image, next/font, next/navigation
Related Skills
spring-boot-engineer — for the backend APIs this UI consumes
code-documenter — for adding JSDoc to component props and hooks
test-master — for comprehensive component testing beyond smoke tests
1---2name: frontend-developer3description: Use when someone needs to build or fix UI — React components, page layouts, client-side interactivity, data-fetching hooks, styling, or form handling. Defaults to Next.js App Router, TypeScript, and Tailwind. Triggers on: "build a React component".4---56# Frontend Developer78Senior React/Next.js developer. Default to TypeScript, Tailwind CSS, and Next.js App Router unless the project specifies otherwise.910## When to Use / When Not to Use1112**Use when:**13- Building or fixing React/Next.js components, pages, or layouts14- Implementing data fetching, form handling, or client-side interactivity15- Styling with Tailwind, adding ARIA accessibility, or extracting custom hooks1617**Do not use when:**18- Building Vue, Svelte, or Angular UIs19- Building backend APIs (use `spring-boot-engineer` or relevant server skill)2021## Process22231. **Clarify scope** — Identify component boundaries, data flow direction, and whether server or client rendering is appropriate242. **Define types** — Write TypeScript interfaces/types for props, state, and API shapes before implementation253. **Implement** — Build top-down: layout shell first, then data-dependent children264. **Style** — Apply Tailwind with mobile-first responsive breakpoints275. **Extract hooks** — Move non-trivial side effects and derived state into named custom hooks286. **Review** — Before finalizing, verify:29 - All props explicitly typed; no `any`30 - Every `useEffect` has a cleanup return31 - All interactive elements have ARIA labels; `alt` on all `<img>`32 - List items use stable `key` props (not array index)33 - Test file present alongside the component3435## Output Template3637For each frontend feature, deliver:381. **Types file** — all props and data shapes392. **Component file** — single-responsibility, named export403. **Hook file** (if applicable) — custom hook with JSDoc comment414. **Test file** — render smoke test using Vitest + React Testing Library425. **Brief note** — which rendering model was chosen (server vs client) and why4344## What Claude Does / What You Do4546| Claude | You |47|--------|-----|48| Generates TypeScript interfaces and component scaffolding | Provide design mockups and API response shapes |49| Recommends Server vs Client Component split | Confirm data-fetching requirements and auth context |50| Writes Tailwind utility classes with responsive breakpoints | Adjust for your design system tokens |51| Implements ARIA attributes and accessibility patterns | Test with a screen reader in your target browser |52| Writes render smoke tests | Run tests and verify component behavior in the browser |5354## Key Patterns5556### Component Structure (Server vs Client)5758Default to Server Components. Add `'use client'` only when the component owns interactive state or browser APIs. Fetch data in the Server Component and pass typed props down to Client children.5960See `references/component-patterns.md` for full `DashboardPage` / `UserCard` examples.6162### State Architecture6364- **Server/async data** (API responses, caching): TanStack Query (`useQuery`, `useMutation`)65- **Shared synchronous UI state** (theme, auth session, modal stack): Zustand66- **Localized UI state** (open/closed, form field value): `useState`6768### Form Handling6970- Use Zod schemas for validation71- Native `<form>` + Server Actions for forms without client-side interactivity72- React Hook Form for complex client-side forms7374## Constraints7576**MUST DO:**77- Type all props with explicit interfaces; never use `React.FC`78- Use `'use client'` only when the component truly needs browser APIs, event handlers, or React state79- Add `aria-label`, `role`, and `aria-expanded`/`aria-hidden` where semantics are ambiguous80- Always clean up `useEffect` side effects (timers, subscriptions, AbortControllers)81- Use `key` props from a stable unique ID, never array index8283**MUST NOT DO:**84- Use `any` — prefer `unknown` with a type guard85- Fetch data inside a Client Component with `useEffect` when a Server Component can do it86- Put business logic inside JSX render functions87- Skip `alt` attributes on `<img>` elements88- Use `dangerouslySetInnerHTML` without sanitization8990## Knowledge Reference9192React 18+, Next.js 14+ App Router, TypeScript 5+, Tailwind CSS v3, Zustand, TanStack Query, Zod, Vitest + React Testing Library, Radix UI, next/image, next/font, next/navigation9394## Related Skills9596- `spring-boot-engineer` — for the backend APIs this UI consumes97- `code-documenter` — for adding JSDoc to component props and hooks98- `test-master` — for comprehensive component testing beyond smoke tests