nextjs-turbopack
Guides your agent in using Next.js 16+ with Turbopack for faster development. It helps optimize loading and debug build issues.
What it does
This tool helps you understand and use Turbopack, a new technology that speeds up the development of websites built with Next.js. It explains how Turbopack works, when to use it, and how it improves your website's speed.
When to use it
- ✓When developing websites with Next.js version 16 or higher.
- ✓When your website's development is slow to start or update.
- ✓When deciding between using Turbopack or Webpack for your project.
Example of what to ask your AI
“How can I make my Next.js website load faster during development?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
Turbopack is a 'bundling' system written in Rust that organizes your website's code. It uses a file-system cache to remember previous work, making updates much faster.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add affaan-m/ECC --skill nextjs-turbopackOr download just the file:
curl -L https://raw.githubusercontent.com/affaan-m/ECC/main/pi/core/skills/nextjs-turbopack/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Next.js and Turbopack
Next.js 16+ uses Turbopack by default for local development: an incremental bundler written in Rust that significantly speeds up dev startup and hot updates.
When to Use
- Turbopack (default dev): Use for day-to-day development. Faster cold start and HMR, especially in large apps.
- Webpack (legacy dev): Use only if you hit a Turbopack bug or rely on a webpack-only plugin in dev. Disable with
--webpack(or--no-turbopackdepending on your Next.js version; check the docs for your release). - Production: Production build behavior (
next build) may use Turbopack or webpack depending on Next.js version; check the official Next.js docs for your version.
Use when: developing or debugging Next.js 16+ apps, diagnosing slow dev startup or HMR, or optimizing production bundles.
How It Works
- Turbopack: Incremental bundler for Next.js dev. Uses file-system caching so restarts are much faster (e.g. 5–14x on large projects).
- Default in dev: From Next.js 16,
next devruns with Turbopack unless disabled. - File-system caching: Restarts reuse previous work; cache is typically under
.next; no extra config needed for basic use. - Bundle Analyzer (Next.js 16.1+): Experimental Bundle Analyzer to inspect output and find heavy dependencies; enable via config or experimental flag (see Next.js docs for your version).
Examples
Commands
next dev
next build
next start
Usage
Run next dev for local development with Turbopack. Use the Bundle Analyzer (see Next.js docs) to optimize code-splitting and trim large dependencies. Prefer App Router and server components where possible.
Middleware File Naming
Next.js 16 introduced proxy.ts as the middleware filename, replacing the older middleware.ts convention:
- Next.js 16+: use
proxy.tsat the project root - Pre-Next.js 16: use
middleware.tsat the project root
The filename change is tied to the Next.js version, not to which bundler (Turbopack or webpack) is in use. Always check the official docs for the version you are reviewing.
Do not flag proxy.ts as a misnamed or missing middleware file in Next.js 16 projects. The file is correct and intentional. Suggesting a rename to middleware.ts will break middleware execution.
Reference: Next.js proxy docs
Best Practices
- Stay on a recent Next.js 16.x for stable Turbopack and caching behavior.
- If dev is slow, ensure you're on Turbopack (default) and that the cache isn't being cleared unnecessarily.
- For production bundle size issues, use the official Next.js bundle analysis tooling for your version.
FAQ
What is Turbopack?
It's a tool that organizes your Next.js website's code so it runs faster, especially during development.
Why is my Next.js development slow?
You might not be using Turbopack (the latest default) or its cache might not be working correctly. Check the Next.js documentation for your version.
What changed with the middleware filename?
Starting with Next.js 16, the middleware file is now named `proxy.ts` instead of `middleware.ts`. This is an intentional change, not an error.
Details
Original description by the author
Next.js 16+ and Turbopack guidance — incremental Rust bundling, file-system caching, faster dev startup and HMR, Turbopack vs webpack tradeoffs, and the middleware.ts to proxy.ts filename change. Use when developing or debugging Next.js 16+ apps, diagnosing slow dev startup or hot reload, choosing between bundlers, or reviewing middleware/proxy file naming.
repo: affaan-m/ECC
Popularity
- GitHub stars
- 280k
- Ranking position
- #92
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
accessibility
Helps your agent create interfaces that everyone can use. Ensures websites and apps work well for people with disabilities, like those who are blind or have reduced mobility.
affaan-m/ECC
agent-architecture-audit
Makes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
affaan-m/ECC
agent-eval
Helps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
affaan-m/ECC
agent-harness-construction
Makes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
affaan-m/ECC
Similar skills
web-artifacts-builder
Helps your agent build complex HTML artifacts using modern technologies. Ideal for interfaces with state management and advanced components.
anthropics/skills
frontend-ui-engineering
Helps your agent build beautiful and easy-to-use user interfaces. Makes the output look professional and work well on different devices.
addyosmani/agent-skills
export-nextjs-handoff
Makes your agent turn designs into Next.js code. It creates components, styles, and notes to help the developer.
nexu-io/open-design