laguagu/claude-code-nextjs-skills / skills/next-best-practices
next-best-practices
VerifiedNext.js App Router best practices covering file conventions, RSC boundaries, async APIs, data patterns, hydration errors, metadata, route handlers, image/font optimization, and bundling. Use when writing or reviewing Next.js code to prevent hydration errors, RSC violations, data waterfalls, and configuration mistakes.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.5 KB |
| async-patterns.md | markdown | 788 B |
| bundling.md | markdown | 1.4 KB |
| data-patterns.md | markdown | 1.3 KB |
| debug-tricks.md | markdown | 872 B |
| directives.md | markdown | 785 B |
| error-handling.md | markdown | 1.4 KB |
| file-conventions.md | markdown | 1.1 KB |
| font.md | markdown | 821 B |
| functions.md | markdown | 911 B |
| hydration-error.md | markdown | 1.2 KB |
| image.md | markdown | 1.1 KB |
| metadata.md | markdown | 1.2 KB |
| parallel-routes.md | markdown | 1.1 KB |
| route-handlers.md | markdown | 1.2 KB |
| rsc-boundaries.md | markdown | 1.1 KB |
| runtime-selection.md | markdown | 849 B |
| scripts.md | markdown | 788 B |
| self-hosting.md | markdown | 1.7 KB |
| suspense-boundaries.md | markdown | 1.1 KB |
image.md
View on GitHub# Image delivery
Prefer the project's `next/image` setup where optimization fits; SVG, external
loaders, authenticated images or static export may need a different delivery
contract. A blanket component substitution can break those cases.
Reserve layout space with intrinsic dimensions or a sized `fill` container.
Use accurate responsive `sizes`; placeholders do not reserve space on their
own. Set useful alt text or empty alt for decoration.
Restrict remote patterns to intended sources. Verify loader, SVG and quality
allowlist behavior in the installed version. Static export needs an appropriate
loader or unoptimized delivery.
Next.js 16 defaults also include a 4-hour `minimumCacheTTL`, blocked local-IP
upstreams and at most 3 redirects.
Load the actual LCP image early without preloading every hero candidate. Current
Next.js favors eager/fetchPriority in many cases and deprecates `priority`;
choose from the installed [Image reference](https://nextjs.org/docs/app/api-reference/components/image).
Measure delivered dimensions/bytes and layout shift in the real responsive view.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |