nextjs-bundle-optimizer

Installation
SKILL.md

Next.js Bundle & Build-Time Optimizer

Data-driven optimization loop for Next.js 16 applications. The skill orchestrates next experimental-analyze, builds, type checks, and tests to make verifiable improvements one change at a time.

When to Apply

Use this skill when:

  • The user wants to reduce bundle size / First Load JS / route bundles in a Next.js 16 app.
  • Production builds are slow and the user wants to diagnose and fix the bottleneck.
  • The user shares analyzer output, a screenshot of the treemap, or asks "why is <X> so big?"
  • A new dependency was added and bundles grew — they want to understand why and unwind it.
  • The user wants to set a performance budget and enforce it iteratively.

Why iterative (not "apply all optimizations at once")

Bundle optimization is full of foot-guns. Examples:

  • Moving a "client-only" dep behind next/dynamic can break SSR consumers that depended on its presence at first paint.
  • experimental.optimizePackageImports with the wrong package can mis-resolve subpath exports.
  • Aggressive modularizeImports regex rewrites can hit unintended modules.
Related skills

More from pproenca/dot-skills

Installs
2
GitHub Stars
141
First Seen
1 day ago