Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
.claude/skills/leoyeai-next-best-practices/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 106% | 0% |
| case-19 | ✗→✓ | ▲ Improved | -31% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 84% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 60% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 112% | 0% |
Apply these rules when writing or reviewing Next.js code.
See file-conventions.md for:
Detect invalid React Server Component patterns.
See rsc-boundaries.md for:
Next.js 15+ async API changes.
See async-patterns.md for:
params and searchParamscookies() and headers()See runtime-selection.md for:
See directives.md for:
'use client', 'use server' (React)'use cache' (Next.js)See functions.md for:
useRouter, usePathname, useSearchParams, useParamscookies, headers, draftMode, aftergenerateStaticParams, generateMetadataSee error-handling.md for:
error.tsx, global-error.tsx, not-found.tsxredirect, permanentRedirect, notFoundforbidden, unauthorized (auth errors)unstable_rethrow for catch blocksSee data-patterns.md for:
Promise.all, Suspense, preload)See route-handlers.md for:
route.ts basicspage.tsxSee metadata.md for:
generateMetadata functionnext/ogSee image.md for:
next/image over <img>sizes attributeSee font.md for:
next/font setupSee bundling.md for:
See scripts.md for:
next/script vs native script tagsid@next/third-partiesSee hydration-error.md for:
See suspense-boundaries.md for:
useSearchParams and usePathnameSee parallel-routes.md for:
@slot and (.) interceptorsdefault.tsx for fallbacksrouter.back()See self-hosting.md for:
output: 'standalone' for DockerSee debug-tricks.md for:
--debug-build-paths| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 4,590 | 2,646 | -42% | 1 | 1 | 0% | 744 | 1,530 | +106% | 0 | 0 | — |
case-02 | pass→pass | 7,519 | 6,867 | -9% | 1 | 1 | 0% | 1,287 | 2,374 | +84% | 0 | 0 | — |
case-03 | pass→pass | 7,265 | 6,867 | -5% | 1 | 1 | 0% | 1,546 | 2,469 | +60% | 0 | 0 | — |
case-04 | pass→pass | 4,183 | 2,869 | -31% | 1 | 1 | 0% | 696 | 1,477 | +112% | 0 | 0 | — |
case-05 | pass→pass | 4,145 | 4,412 | +6% | 1 | 1 | 0% | 692 | 1,686 | +144% | 0 | 0 | — |
case-06 | pass→pass | 3,596 | 3,474 | -3% | 1 | 1 | 0% | 550 | 1,601 | +191% | 0 | 0 | — |
case-07 | pass→pass | 8,146 | 3,732 | -54% | 1 | 1 | 0% | 1,358 | 1,687 | +24% | 0 | 0 | — |
case-08 | pass→pass | 7,635 | 4,294 | -44% | 1 | 1 | 0% | 1,433 | 1,854 | +29% | 0 | 0 | — |
case-09 | pass→pass | 6,480 | 5,869 | -9% | 1 | 1 | 0% | 1,122 | 2,058 | +83% | 0 | 0 | — |
case-10 | pass→pass | 8,802 | 4,897 | -44% | 1 | 1 | 0% | 1,572 | 1,941 | +23% | 0 | 0 | — |
case-11 | pass→pass | 9,131 | 5,753 | -37% | 1 | 1 | 0% | 1,588 | 2,135 | +34% | 0 | 0 | — |
case-12 | pass→pass | 12,555 | 9,760 | -22% | 1 | 1 | 0% | 2,386 | 2,817 | +18% | 0 | 0 | — |
case-13 | pass→pass | 7,317 | 3,935 | -46% | 1 | 1 | 0% | 1,140 | 1,678 | +47% | 0 | 0 | — |
case-14 | pass→pass | 3,255 | 2,547 | -22% | 1 | 1 | 0% | 553 | 1,419 | +157% | 0 | 0 | — |
case-15 | pass→pass | 8,461 | 6,418 | -24% | 1 | 1 | 0% | 1,547 | 2,287 | +48% | 0 | 0 | — |
case-16 | pass→pass | 3,818 | 3,446 | -10% | 1 | 1 | 0% | 554 | 1,605 | +190% | 0 | 0 | — |
case-17 | pass→pass | 5,147 | 3,536 | -31% | 1 | 1 | 0% | 925 | 1,597 | +73% | 0 | 0 | — |
case-18 | pass→pass | 3,385 | 2,643 | -22% | 1 | 1 | 0% | 510 | 1,446 | +184% | 0 | 0 | — |
case-19 | fail→pass | 12,010 | 2,149 | -82% | 1 | 1 | 0% | 1,954 | 1,339 | -31% | 0 | 0 | — |
case-20 | pass→pass | 10,798 | 8,909 | -17% | 1 | 1 | 0% | 2,047 | 2,614 | +28% | 0 | 0 | — |
case-21 | pass→pass | 9,879 | 8,734 | -12% | 1 | 1 | 0% | 1,897 | 2,753 | +45% | 0 | 0 | — |
case-22 | pass→pass | 3,532 | 3,281 | -7% | 1 | 1 | 0% | 593 | 1,617 | +173% | 0 | 0 | — |
case-23 | pass→pass | 8,365 | 5,545 | -34% | 1 | 1 | 0% | 1,571 | 2,018 | +28% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.