Skip to content

avibebuilder/claude-prime / .claude/starter-skills/frontend-development

frontend-development

Verified

Use 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.

references/nextjs/patterns.md

View on GitHub
# Next.js Patterns

## Server-First Architecture

- Default = Server Component. Only add `'use client'` when you need interactivity, state, or browser APIs
- **NEVER** `'use client'` on entire page — extract ONLY the interactive leaf components
- Server Components CAN import Client Components. Client Components CANNOT import Server Components
- Pass server data to Client Components as props — props MUST be serializable (no functions, classes, Date objects)
- Minimize client serialization — the RSC/Client boundary serializes ALL object properties. Only pass fields the client actually uses

## Routing Patterns

- **ALWAYS** use route groups `(folder)` for separating layouts (e.g., `(public)` vs `(authenticated)`)
- Route groups do NOT affect URL paths — they are organizational only

## API Routes

- API routes ONLY for: webhooks, external API endpoints, tRPC endpoint
- **NEVER** create custom API routes for internal data operations
- Internal data fetching → use tRPC procedures or Server Components with direct DB/service calls

## Security

- **ALWAYS** verify auth inside each Server Action — never rely solely on middleware or layout guards
- Server Actions are exposed as public HTTP endpoints. Treat them like API routes for authorization

## Next.js 15+ Async APIs

> Applies when Next.js 15+ is detected.

- `params` and `searchParams` are now `Promise<...>` — **MUST** `await` in pages, layouts, route handlers, and `generateMetadata`
- Use `React.use()` for non-async components that need to unwrap params
- `cookies()` and `headers()` are async — **ALWAYS** await them
- `fetch()` requests are no longer cached by default — use explicit `{ next: { revalidate, tags } }` for caching

```tsx
// WRONG (Next.js 14 style)
function Page({ params }: { params: { id: string } }) {
  return <div>{params.id}</div>;
}

// RIGHT (Next.js 15+)
async function Page({ params }: { params: Promise<{ id: string }> }) {
  const { id } = await params;
  return <div>{id}</div>;
}
```

## Suspense

- `useSearchParams()` without a Suspense boundary causes the entire page to fall back to CSR
- **ALWAYS** wrap components using `useSearchParams()` in `<Suspense>`

Official docs: https://nextjs.org/docs
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 321kUpdated Claude CodeCodexVerifiedInstall
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: 197kUpdated Claude CodeCodexVerifiedInstall
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall