React Next Rules

    1

    Enforce Server/Client boundaries, fix hydration errors, and secure Server Actions in Next.js App Router projects.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    React Next Rules

    Example session with this skill installed

    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.

    • Read your context and instructions
    • Compiled the react next rules

    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...]

    Connects securely to your tools. The creator never sees your data.

    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-only guards.
    • 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.

    Does not execute code, run builds, or verify bundle sizes. Requires manual confirmation of environment variable visibility and database ownership logic.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 3 months ago

    Permissions

    Network Access
    Listed3 months ago

    What's inside

    Frequently Asked Questions

    No, this skill performs static analysis and code review. It identifies risks like hydration errors and secret leaks without needing to execute your build or dev server.

    The skill uses a trigger matrix to scan for specific signals like 'use client' placement, database imports in server folders, and common hydration error messages.

    Yes, it provides a structured patch format with complete replacement code, ensuring your Server Actions and components follow security best practices.

    New in Frontend & Web Apps