nextjs15-performance
Original:🇺🇸 English
Translated
Next.js 15 critical performance fixes. Use when writing React components, data fetching, Server Actions, or optimizing bundle size.
2installs
Sourcesrbhr/resume-matcher
Added on
NPX Install
npx skill4agent add srbhr/resume-matcher nextjs15-performanceTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Before writing Next.js code
- Read for full patterns
docs/agent/architecture/nextjs-critical-fixes.md - Check existing components in for examples
apps/frontend/components/
Critical Rules (always apply)
Waterfalls
- Use for independent fetches
Promise.all() - Wrap slow data in boundaries
<Suspense> - Defer into branches where needed
await
Bundle Size
- NO barrel imports: ❌
import X from 'lucide-react' - YES direct imports: ✅
import X from 'lucide-react/dist/esm/icons/x' - Use for heavy components (editors, charts, PDF viewers)
next/dynamic - Defer analytics with
ssr: false
Server Actions
- ALWAYS check auth INSIDE the action, not just middleware
- Verify resource ownership before mutations
Production Build
- Users run , NOT
npm run build && npm run startnpm run dev - Docker must use standalone output, not dev mode
Quick Check Before PR
[ ] No sequential awaits for independent data
[ ] Icons imported directly
[ ] Heavy components use next/dynamic
[ ] Server Actions have auth inside
[ ] Suspense around slow fetches