senior-fullstack
Use when the user needs end-to-end TypeScript development — from database schema through API layer to UI — with tRPC, Prisma, Next.js, authentication, and deployment. Triggers: full-stack feature implementation, database-to-UI pipeline, tRPC router creation, Prisma schema design, auth setup, deployment configuration.
What this skill does
# Senior Fullstack Engineer
## Overview
Deliver complete, end-to-end TypeScript applications covering database design, API layer, frontend UI, authentication, and deployment. This skill specializes in the modern TypeScript full-stack: Next.js App Router, tRPC for type-safe APIs, Prisma for database access, and production deployment with monitoring.
**Announce at start:** "I'm using the senior-fullstack skill for end-to-end TypeScript development."
---
## Phase 1: Data Layer
**Goal:** Design the database schema and data access patterns.
### Actions
1. Design database schema with Prisma
2. Define relationships and indexes
3. Create seed data for development
4. Set up migrations workflow
5. Implement repository pattern for data access
### Prisma Schema Example
```prisma
model User {
id String @id @default(cuid())
email String @unique
name String
role Role @default(USER)
posts Post[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([email])
@@index([createdAt])
}
model Post {
id String @id @default(cuid())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
authorId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([authorId])
@@index([published, createdAt])
}
```
### Index Strategy Decision Table
| Query Pattern | Index Type | Example |
|--------------|-----------|---------|
| Lookup by unique field | Unique index | `@@unique([email])` |
| Filter by foreign key | Standard index | `@@index([authorId])` |
| Filter + sort combination | Composite index | `@@index([published, createdAt])` |
| Full-text search | Full-text index | Database-specific |
| Geospatial query | Spatial index | Database-specific |
### STOP — Do NOT proceed to Phase 2 until:
- [ ] Schema is defined with all relationships
- [ ] Indexes cover all query patterns
- [ ] Seed data script exists
- [ ] Migrations are generated and tested
---
## Phase 2: API Layer
**Goal:** Build type-safe API with tRPC and Zod validation.
### Actions
1. Define tRPC routers and procedures
2. Implement input validation with Zod
3. Add authentication middleware
4. Build business logic in service layer
5. Add error handling and logging
### tRPC Router Example
```typescript
export const userRouter = router({
list: protectedProcedure
.input(z.object({
page: z.number().min(1).default(1),
pageSize: z.number().min(1).max(100).default(20),
search: z.string().optional(),
}))
.query(async ({ ctx, input }) => {
const { page, pageSize, search } = input;
const where = search ? { name: { contains: search, mode: 'insensitive' } } : {};
const [users, total] = await Promise.all([
ctx.db.user.findMany({
where, skip: (page - 1) * pageSize, take: pageSize, orderBy: { createdAt: 'desc' },
}),
ctx.db.user.count({ where }),
]);
return { users, total, totalPages: Math.ceil(total / pageSize) };
}),
create: protectedProcedure
.input(createUserSchema)
.mutation(async ({ ctx, input }) => {
return ctx.db.user.create({ data: input });
}),
});
```
### Authorization Pattern Decision Table
| Pattern | Use When | Example |
|---------|----------|---------|
| Role-based (RBAC) | Simple permission model | Admin vs User |
| Resource-level | Owner-only access | User can edit own posts |
| Attribute-based (ABAC) | Complex rules | Org membership + role + resource state |
| Feature flags | Gradual rollout | Premium features |
### STOP — Do NOT proceed to Phase 3 until:
- [ ] All tRPC routers are defined with Zod validation
- [ ] Auth middleware protects appropriate routes
- [ ] Business logic is in service layer (not in router)
- [ ] Error handling returns structured errors
---
## Phase 3: UI Layer
**Goal:** Build pages with Server Components by default, Client Components for interactivity.
### Actions
1. Build pages with Server Components (default)
2. Add Client Components for interactivity
3. Connect to API via tRPC hooks
4. Implement optimistic updates
5. Add loading and error states
### Component Type Decision Table
| Need | Component Type | Data Source |
|------|---------------|-------------|
| Static content, data display | Server Component | Direct DB/API call |
| Interactive form | Client Component | tRPC mutation hook |
| Real-time updates | Client Component | tRPC subscription or polling |
| Search/filter | Client Component | tRPC query with debounce |
| Navigation chrome | Server Component | Session data |
### STOP — Do NOT proceed to Phase 4 until:
- [ ] Pages use Server Components by default
- [ ] Client Components are minimal and justified
- [ ] Loading and error states exist for all data-fetching paths
- [ ] Optimistic updates work for mutations
---
## Phase 4: Production
**Goal:** Prepare for deployment with auth, monitoring, and CI/CD.
### Actions
1. Set up authentication (NextAuth.js / Clerk / Lucia)
2. Configure deployment (Vercel / Docker)
3. Add monitoring and error tracking
4. Implement CI/CD pipeline
5. Performance audit
### Auth Solution Decision Table
| Solution | Best For | SSR Support | Self-Hosted |
|----------|----------|-------------|-------------|
| NextAuth.js (Auth.js) | OAuth providers, JWT/session | Yes | Yes |
| Clerk | Fast setup, managed service | Yes | No |
| Lucia | Custom, lightweight | Yes | Yes |
| Supabase Auth | Supabase ecosystem | Yes | Partial |
### Monitoring Checklist
- [ ] Error tracking (Sentry) with source maps
- [ ] Performance monitoring (Vercel Analytics or custom)
- [ ] Database query performance (Prisma metrics)
- [ ] API endpoint latency and error rates
- [ ] Uptime monitoring (external ping)
- [ ] Log aggregation with structured logging
- [ ] Alerting for error rate spikes
### Docker Deployment
```dockerfile
FROM node:20-alpine AS base
RUN corepack enable
FROM base AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm prisma generate
RUN pnpm build
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]
```
### STOP — Production ready when:
- [ ] Auth is configured and tested
- [ ] Deployment pipeline works (preview + production)
- [ ] Monitoring and alerting are active
- [ ] Performance audit completed
---
## Full-Stack Type Safety Pipeline
```
Prisma Schema -> Prisma Client (types) -> tRPC Router -> tRPC Hooks -> React Components
| | | | |
Migration Type-safe DB Validated API Auto-typed Rendered UI
queries with Zod queries
```
---
## Project Structure
```
prisma/
schema.prisma
migrations/
seed.ts
src/
app/ # Next.js App Router
(auth)/ # Auth route group
(dashboard)/ # Protected route group
api/trpc/[trpc]/ # tRPC handler
server/
db.ts # Prisma client singleton
trpc.ts # tRPC init
routers/ # tRPC routers
services/ # Business logic
components/
ui/ # Design system atoms
features/ # Feature components
hooks/ # Custom React hooks
lib/
trpc.ts # tRPC client
auth.ts # Auth configuration
validators.ts # Zod schemas
tests/
unit/
integration/
e2e/
```
---
## Anti-Patterns / Common Mistakes
| Anti-Pattern | Why It Is Wrong | Correct Approach |
|-------------|----------------|-----------------|
| RaRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.