avibebuilder/claude-prime / .claude/starter-skills/frontend-development
frontend-development
UnverifiedUse this skill for ANY work involving React, Next.js, TypeScript, or Tailwind in the browser layer. This includes building components and pages, but equally covers debugging and fixing frontend issues: CSS/Tailwind classes not applying, form validation behavior, hydration mismatches between server and client renders, styling bugs, layout shifts, and rendering problems. Also use for refactoring components (e.g., splitting Server vs Client Components), data fetching patterns, state management, bundle optimization, and frontend tooling. If the problem involves what users see or interact with in a web browser — whether building, fixing, or refactoring — use this skill. Not for backend APIs, databases, infrastructure, or DevOps.
Frontend Development
Project-specific patterns for React/Next.js/TypeScript frontend work.
Architecture Decisions
Server-First Boundaries
Start with Server Components. Only add 'use client' when you need interactivity, state, or browser APIs. Extract only the interactive leaf — not the entire page or section.
Colocation Over Centralization
Types, hooks, and utilities that serve one feature live in that feature's directory. Only truly shared code goes in global directories.
Composition Over Customization
Compose existing components rather than adding props/variants. shadcn/ui components are meant to be copied and modified. Build up from primitives.
Data Flows Down, Events Flow Up
Server fetches data and passes it as props. Client components handle interactions and call server actions. Never fetch in client components what could be fetched on the server.
Gotchas
'use client'does NOT mean "runs only in the browser" — it runs on the server during SSR too. It means "include in the client bundle." Putting secrets or DB calls in a'use client'file will leak them.- Importing a Server Component into a Client Component makes it a Client Component. The boundary propagates DOWN. Pass server content as
childrenprops instead. useEffectwith empty deps fires AFTER paint — useuseLayoutEffectfor DOM measurements that affect layout, but never in Server Components.- Next.js
fetch()caches by default in App Router. Add{ cache: 'no-store' }orrevalidate: 0for data that must be fresh. Forgetting this causes stale data bugs that only appear in production. - Tailwind classes are purged at build time — dynamically constructed class names like
bg-${color}-500will be missing. Use complete class names or safelist them. keyprop on mapped elements must be stable and unique. Using array index as key causes subtle bugs when list items are reordered, inserted, or deleted.useSearchParams()requires a<Suspense>boundary in Next.js App Router or the entire page becomes client-rendered.- shadcn/ui components are source code, not a library. After
npx shadcn-ui add, the component lives in YOUR codebase — modify it directly, don't wrap it. - React Hook Form's
register()returns a ref — don't also pass your ownrefto the same input without merging them. asyncServer Components that throwredirect()ornotFound()must NOT be wrapped in try/catch — these work by throwing special errors that Next.js catches upstream.
Quick Start
- Check file structure — App Router or plain React? Check references below.
- Identify the feature boundary — What feature does this work belong to?
- Start with Server Component — Only add
'use client'when you hit a wall - Name files specifically —
login-form.tsxnotform.tsx. Must be grep-findable. - Match existing patterns — Read 2-3 similar files before creating new ones
References
| When you need... | Read |
|---|---|
| File naming, imports, exports | conventions.md |
| Next.js App Router patterns | overview.md |
| React component patterns | overview.md |
| TypeScript project patterns | typescript.md |
| shadcn/ui + Dice UI usage | shadcn.md |
| Tailwind configuration | tailwind.md |
| Data fetching (tRPC, TanStack, axios) | overview.md |
| Biome/linter config | biome.md |
Official Resources
For general framework docs beyond project-specific patterns, consult:
| Framework | URL |
|---|---|
| Next.js | https://nextjs.org/docs |
| React | https://react.dev |
| TypeScript | https://www.typescriptlang.org/docs |
| Tailwind CSS | https://tailwindcss.com/docs |
| shadcn/ui | https://ui.shadcn.com/docs |
| Dice UI | https://www.diceui.com/docs |
| TanStack Query | https://tanstack.com/query/latest/docs |
| tRPC | https://trpc.io/docs |
| Zustand | https://zustand.docs.pmnd.rs |
| React Hook Form | https://react-hook-form.com |
| Zod | https://zod.dev |
| Biome | https://biomejs.dev |
| nuqs | https://nuqs.47ng.com |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 117k | Updated | Claude CodeCodex | Unverified | Install |