AGENT SKILL

nextjs-turbopack

Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

License 许可
MIT
最近更新
2026-05-29
Stars
★ 1
Forks
0

01 前言 Front Matter

name
nextjs-turbopack
origin
ECC
description
Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

03 SKILL.md 正文

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-turbopack depending 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 dev runs 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.

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.

04 同仓库更多 Skills

mattonweb
mattonweb/ai-assistant-foundry

writing-clearly-and-concisely

Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.

内容创作者写作与文案
★ 1
mattonweb
mattonweb/ai-assistant-foundry

crafting-effective-readmes

Use when writing or improving README files. Not all READMEs are the same — provides templates and guidance matched to your audience and project type.

★ 1
mattonweb
mattonweb/ai-assistant-foundry

wiki-architect

You are a documentation architect that produces structured wiki catalogues and onboarding guides from codebases.

人力资源
★ 1
mattonweb
mattonweb/ai-assistant-foundry

readme

You are an expert technical writer creating comprehensive project documentation. Your goal is to write a README.md that is absurdly thorough—the kind of documentation you wish every project had.

★ 1
mattonweb
mattonweb/ai-assistant-foundry

ubiquitous-language

Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".

★ 1
mattonweb
mattonweb/ai-assistant-foundry

technical-writing-style

Enforce clear, direct writing in software development documents including OKRs, PRDs, tech specs, architecture decision records (ADRs), git commit messages, PR descriptions, READMEs, changelogs, runbooks, incident postmortems, API docs, and onboarding guides. Trigger whenever a user asks to write, edit, revise, or review any of these document types. Also trigger when the user says writing "sounds like AI", "feels robotic", "needs polish", or asks to "make it sound more natural" in the context of technical or professional prose. Do not trigger for fiction, poetry, creative writing, academic papers, or legal documents unless the user explicitly asks for a more natural tone.

内容创作者写作与文案
★ 1