React Next Rules
Enforce Server/Client boundaries, fix hydration errors, and secure Server Actions in Next.js App Router projects.
Secure checkout via Stripe
Works with the AI tools you already use
See it in action
You say
My /admin page is slow and shows a hydration error on the 'last login' timestamp. It uses a client component that imports my Prisma client directly.
Your agent does
## Scope app/admin/page.tsx (Client -> Server) ## Findings 1. app/admin/page.tsx - Leaks database SDK to browser bundle. 2. app/admin/page.tsx - Dynamic timestamp causes hydration mismatch. ## Patch [Full Server Component code with Suspense and stabilized props...]
What you get
About this skill
The problem
Cursor often fails to distinguish between the server and browser in the Next.js App Router. It creates client components that accidentally bundle database modules, leaks secrets via prop spreading, and generates hydration mismatches by calculating dates or random IDs during render.
What it does
- Identifies server-only modules leaking into client bundles and patches them with
server-onlyguards. - Fixes hydration failures by isolating browser-only state and stabilizing server-rendered timestamps and locales.
- Audits Server Actions to ensure mandatory schema validation and tenant-based authorization.
- Optimizes caching and streaming by wrapping slow queries in Suspense boundaries and converting serial awaits to parallel execution.
- Reduces client bundle weight by auditing imports and suggesting dynamic loading for heavy widgets.
Frameworks & tools
React 19, Next.js 13+ (App Router), Cursor, Tailwind CSS, and Zod for action validation.
Why this beats prompting it yourself
Generic prompts don't understand the nuance of the RSC boundary or the specific ways use client impacts child components. This skill enforces a strict trigger matrix that catches architectural leaks, like credential exposure, that simple coding assistants frequently ignore.
Use cases
- Migrating a "use client" heavy page back to Server Components to fix bundle bloat.
- Debugging "Text content did not match" errors caused by time-based or locale-based rendering.
- Securing Server Actions against unauthorized data access and malformed inputs.
- Implementing a strict Content-Security-Policy with proper nonce wiring in middleware.
Known limitations
This skill cannot run your build, start a dev server, or execute tests. It provides code reviews and patches based on static analysis of open files only.
How to install
Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- 30-day refund guarantee
- One-time purchase, yours forever
- Secure checkout via Stripe