avibebuilder/claude-prime / .claude/starter-skills/frontend-development
frontend-development
VerifiedUse 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.0 KB |
| references/biome.md | markdown | 5.4 KB |
| references/conventions.md | markdown | 2.2 KB |
| references/data-fetching/axios.md | markdown | 2.0 KB |
| references/data-fetching/overview.md | markdown | 437 B |
| references/data-fetching/tanstack.md | markdown | 3.3 KB |
| references/data-fetching/trpc-tanstack.md | markdown | 2.0 KB |
| references/nextjs/file-structure.md | markdown | 2.2 KB |
| references/nextjs/overview.md | markdown | 348 B |
| references/nextjs/patterns.md | markdown | 2.2 KB |
| references/react/file-structure.md | markdown | 2.8 KB |
| references/react/overview.md | markdown | 436 B |
| references/react/patterns.md | markdown | 3.6 KB |
| references/react/state.md | markdown | 1.7 KB |
| references/shadcn.md | markdown | 2.0 KB |
| references/tailwind.md | markdown | 1.1 KB |
| references/typescript.md | markdown | 1.9 KB |
references/data-fetching/trpc-tanstack.md
View on GitHub# tRPC + TanStack Query Conventions
## Data Layer Strategy
- **ALWAYS** use tRPC + TanStack for ALL data operations if project is using tRPC
- **NEVER** create Server Actions - use tRPC procedures
- **NEVER** create custom API routes (except webhooks, tRPC endpoint)
## File Structure
```
src/trpc/
├── trpc-init.ts
├── trpc-client.tsx
├── trpc-server.tsx
├── trpc-context.ts
└── routers/
└── {feature}-router.ts # kebab-case
```
## Server Component Data
### Pure Server (no client interactivity)
```tsx
import { caller } from '@/trpc/trpc-server';
export default async function Page({ params }: Props) {
const data = await caller.feature.getData({ id: params.id });
return <div>{data.title}</div>;
}
```
### Server + Client Interactivity
```tsx
import { HydrateClient, prefetch, trpc } from '@/trpc/trpc-server';
export default async function Page() {
await prefetch(trpc.feature.getData.queryOptions({ id }));
return (
<HydrateClient>
<ClientComponent />
</HydrateClient>
);
}
```
## Client Component Patterns
```tsx
// Queries
const { data } = useQuery(trpc.feature.getData.queryOptions({ id }));
// Mutations
const mutation = useMutation(trpc.feature.create.mutationOptions());
// Invalidation
queryClient.invalidateQueries({ queryKey: trpc.feature.getData.queryKey() });
```
## Procedure Security
| Procedure | Use When |
|-----------|----------|
| `publicProcedure` | No auth needed |
| `protectedProcedure` | Authenticated users |
| `adminProcedure` | Admin role required |
- **NEVER** duplicate auth logic - rely on middleware
## Input Validation
- **ALWAYS** Zod schema directly in `.input()`
```tsx
// ✅ Direct schema
.input(z.object({ id: z.string().uuid() }))
// ❌ Don't extract to variable
const schema = z.object({ id: z.string().uuid() });
.input(schema)
```
## Type Exports
- **ALWAYS** use inference pattern
```tsx
export type Result = Awaited<ReturnType<typeof router.procedure>>;
```
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: 321k | Updated | Claude CodeCodex | Verified | 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: 197k | 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: 119k | 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: 118k | Updated | Claude CodeCodex | Verified | Install |