taste-nextjs

Detects forbidden Next.js patterns in proposed edits via grep-based boundary checks.

1|1|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/Navdeepgambhir9023/nav --skill taste-nextjs-navdeepgambhir9023
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: taste-nextjs
Source: https://github.com/Navdeepgambhir9023/nav/tree/main/skills/taste/nextjs
Command: npx skills add https://github.com/Navdeepgambhir9023/nav --skill taste-nextjs-navdeepgambhir9023

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Next.js App Router introduces subtle footguns — like 'use client' in layouts, getServerSideProps in App Router files, or conflicting cache configs — that fail silently and ship bugs to production. This Skill catches those forbidden patterns at write time, before the file lands on disk. ## Core Features & Use Cases - Runtime Boundary Checks: Six grep-based rules that soft-warn on App Router boundary violations, RSC serialization holes, mixed caching configs, unsafe HTML, raw internal <a> links, and server env vars read from client components. - Hook Integration: Loaded by a PreToolUse hook when the file path matches next.config.*, **/app/**, **/pages/**, middleware.ts, or **/route.ts; advisory only and never blocks the write. - Use Case: While editing app/dashboard/layout.tsx, an agent adds "use client" at the top. The hook invokes check_nextjs_boundary, the skill matches rule 1, and returns a soft warning explaining that the directive pushes the entire subtree to the client, with the fix of moving the boundary to a leaf component. ## Quick Start Ask the agent to review your Next.js edit to a file under app/ and confirm none of the six forbidden patterns are present before saving.

Frequently Asked Questions about taste-nextjs

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

FAQPage Schema
How do I catch Next.js App Router mistakes before they are saved?

Use a PreToolUse hook that runs grep-based boundary checks on proposed edits to files under app/, pages/, middleware, or route handlers. Each rule matches a forbidden pattern and returns a soft warning with the fix before the file lands on disk.

Why is 'use client' in a Next.js layout.tsx a problem?

A 'use client' directive at the top of any layout.tsx under app/ pushes the entire subtree to the client, defeating React Server Components. The fix is to keep the layout as a server component and move the client boundary down to a leaf component.

Does getServerSideProps work in the Next.js App Router?

No. getServerSideProps and getStaticProps are Pages Router primitives that silently do nothing in App Router — no error, no data, no SSR. Read data in the server component or in a route.ts handler instead.

Can I use cache no-store together with revalidate in Next.js?

No, the two caching strategies conflict on the same route. Pick one: export const revalidate for ISR, or fetch with cache: 'no-store' for per-call freshness, and keep the caching story consistent within each route.

What Next.js patterns does this skill not check?

It does not police component-level concerns like props, hooks, or styling, nor TypeScript config, ESLint, Prettier, non-Next.js routers, or build and deploy config. Those live in other skills or tooling.