next-stack

Define Next.js App Router architecture with Prisma on Node runtime.

1|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/janjaszczak/cursor --skill next-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-stack
Source: https://github.com/janjaszczak/cursor/tree/main/skills/next-stack
Command: npx skills add https://github.com/janjaszczak/cursor --skill next-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured decision framework and implementation checklist to keep Next.js App Router frontend work aligned with server-first architecture, Prisma-backed data access, and consistent UI patterns.

Core Features & Use Cases

  • Server Components-first: default to server components and expose interactive client pieces only when necessary.
  • Prisma on Node runtime: ensure all Prisma usage runs in a Node runtime context, not Edge, with explicit runtime hints where applicable.
  • Shared validation & UI conventions: enforce a single Zod schema for server and client validation, and a Tailwind/shadcn/ui driven UI layer across frontend/ and routes.

Quick Start

Set up a Next.js App Router project that enforces server-first boundaries, places Prisma calls on the server, and applies the provided workflow to new pages and forms.

Frequently Asked Questions about next-stack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Next.js App Router project with Prisma to keep data access server-only?

To structure a Next.js App Router project with Prisma, enforce a server components-first architecture by running all Prisma queries on the Node runtime and exposing client components only for interactive UI pieces.

Can I use Prisma on the Edge runtime in a Next.js App Router application?

No, Prisma must run in a Node runtime context within Next.js App Router. You should apply explicit runtime hints to ensure all server-only data operations bypass the Edge runtime.

What is the best way to handle form validation in Next.js App Router for both server and client?

The best way to handle form validation in Next.js is to enforce a single shared Zod schema. This ensures consistent validation rules across server mutations and client-side forms using react-hook-form.

How do I set up consistent UI patterns in a Next.js App Router project?

To set up consistent UI patterns in Next.js, apply a standardized Tailwind and shadcn/ui layer across your frontend and route directories. This enforces a unified component design system throughout the application.

When should I use client components in a Next.js App Router architecture?

Client components in Next.js App Router should be used sparingly, only when interactive UI elements are necessary. Default to server components for data fetching and static rendering to maintain strict boundaries.

Does Next.js App Router work well with TanStack Query for data fetching?

Next.js App Router works with TanStack Query by confining it to client components for interactive data fetching, while defaulting to server components for initial data loads to maintain a server-first architecture.