mcpField
N
nextjs15-performance

nextjs15-performance

github.com/srbhrDevelopment28.9k223 installsUpdated 6d ago
Repository

About nextjs15-performance

nextjs15-performance is a coding skill that provides performance and security rules for work in a Next.js codebase. It guides developers on data fetching, bundle size, Server Actions, and production builds.

Key features

  1. 01Parallelize independent data fetches
  2. 02Reduce bundle size with direct imports
  3. 03Load heavy components dynamically
  4. 04Check authorization in Server Actions
  5. 05Use production build settings

Use cases

  1. 01Review Next.js data-fetching patterns
  2. 02Avoid unnecessary client-side bundle code
  3. 03Secure mutation actions with ownership checks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/srbhr/resume-matcher --skill nextjs15-performance

After installing, type/nextjs15-performancein Claude Code to confirm it loaded.

Details

From the project README

Before writing Next.js code

  1. Read docs/agent/architecture/nextjs-critical-fixes.md for full patterns
  2. Check existing components in apps/frontend/components/ for examples

Critical Rules (always apply)

Waterfalls
  • Use Promise.all() for independent fetches
  • Wrap slow data in <Suspense> boundaries
  • Defer await into branches where needed
Bundle Size
  • NO barrel imports: import X from 'lucide-react' ❌
  • YES direct imports: import X from 'lucide-react/dist/esm/icons/x' ✅
  • Use next/dynamic for heavy components (editors, charts, PDF viewers)
  • 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 npm run build && npm run start, NOT npm 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

Comments

Markdown supported