next-stack
Next.js App Router frontend stack workflow: Server Components-first, Prisma server-only (Node runtime), Tailwind + shadcn/ui, TanStack Query, React Hook Form + Zod, and conventions for work under frontend/. Use when implementing or refactoring UI, routes, data fetching, mutations, or forms in this stack.
What this skill does
# Next Stack (App Router + Prisma + TanStack Query)
## Intent
Provide a **consistent decision framework + implementation checklist** for this stack, so changes stay:
- correct in server/client boundaries,
- consistent with UI & data patterns,
- testable and PR-ready.
## When to use
Activate this skill when the task involves any of:
- Next.js App Router pages/layouts/route handlers/server actions
- Prisma-backed reads/writes
- client mutations, optimistic UI, live updates (TanStack Query)
- forms & validation (RHF + Zod)
- shadcn/ui + Tailwind components under `frontend/`
## Non-negotiables (stack rules)
1) **Server Components first**
- Default to Server Components.
- Add `"use client"` only when you need interactivity, local state, effects, or client-only libraries.
2) **Prisma is server-only**
- Never import Prisma in Client Components.
- Ensure any Prisma usage runs in **Node runtime** (not Edge):
- For Route Handlers that might run on Edge, explicitly set:
- `export const runtime = "nodejs"` (where applicable in your codebase conventions).
3) **Data fetching split**
- Prefer server-side reads (RSC, route handlers, server actions) for static/deterministic reads.
- Use TanStack Query for:
- mutations,
- optimistic flows,
- client revalidation,
- “live-ish” / frequently changing UI state.
4) **React Query hygiene**
- Stable, deterministic query keys (no unstable objects in keys).
- Precise invalidation (invalidate the smallest relevant scope).
5) **Forms & validation**
- Use **React Hook Form + Zod resolver**.
- Maintain **one Zod schema** shared between client & server.
- Server must re-validate (do not trust client).
6) **Styling & UI**
- Tailwind default.
- shadcn/ui lives under `frontend/components/ui/*`.
- Preserve accessibility props/labels and semantic structure.
7) **Conventions**
- ESLint (AirBnB-style) + Prettier.
- React component files in PascalCase (e.g., `UserCard.tsx`).
- Prefer **named exports** (unless Next.js route file conventions force defaults).
## Workflow (how to execute tasks in this stack)
### Step 1 — Clarify & make it verifiable
- Ask 1–3 clarifying questions if critical requirements are missing.
- Define acceptance criteria as verifiable checks:
- “what page shows what state”
- “what API returns what”
- “which tests prove it”
### Step 2 — Decide server vs client boundary
Choose the minimum client surface area:
- If no interactivity: stay in RSC.
- If interaction/mutation: isolate `"use client"` to the smallest component subtree.
### Step 3 — Pick the data path
**Reads**
- Prefer RSC/server fetch.
- Be explicit about caching behavior for user-specific or frequently changing data:
- use `cache: "no-store"` / revalidate strategy as appropriate to the app conventions.
**Writes / mutations**
- Implement server action or route handler as the mutation boundary.
- Client uses React Query `useMutation` and invalidates exact keys.
### Step 4 — Implement with shared schema
- Create/locate a shared `zod` schema module (single source of truth).
- Client:
- RHF + zodResolver(schema)
- Server:
- schema.parse(...) (or safeParse with structured error return)
### Step 5 — UI integration (shadcn + Tailwind)
- Use shadcn components for primitives; Tailwind for layout/spacing.
- Keep a11y intact: labels, aria attributes, keyboard focus, form errors.
### Step 6 — Verification
Before finalizing:
- run lint + typecheck
- unit/component tests (Vitest + RTL) where applicable
- Playwright e2e for critical flows
(Use the repo’s package manager and scripts; inspect `package.json` / lockfiles and follow existing patterns.)
### Step 7 — PR output expectations
PR should include:
- runnable code and relevant tests,
- a short rationale: what you changed, why it matches this stack,
- explicit trade-offs (e.g., “RSC read chosen over React Query because X”).
## Anti-patterns (reject these)
- Prisma imported from any Client Component module graph
- Blanket `"use client"` at high-level layouts/pages without necessity
- React Query used for deterministic static reads with no client interactivity need
- Unstable query keys (objects/functions/dates) causing cache misses
- Over-broad invalidation (invalidate everything) instead of precise keys
- Duplicate schemas (one for client, one for server)
## Quick decision rules
- Start with RSC; promote to client only when you hit a real constraint.
- If Prisma is involved, ensure Node runtime and keep the boundary server-side.
- If you need optimistic UI or repeated client refresh, use React Query—but keep keys stable and invalidation precise.
Related 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.