benchmark-agents
Advanced AI agent benchmark scenarios that push Vercel's cutting-edge platform features —…
Turbopack expert guidance. Use when configuring the Next.js bundler, optimizing HMR, debugging build issues, or understanding the Turbopack vs Webpack differences.
$ npx -y skills add vercel/vercel-plugin --skill turbopack --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/turbopackContext preview
The summary Claude sees to decide when to auto-load this skill.
Turbopack expert guidance. Use when configuring the Next.js bundler, optimizing HMR, debugging build issues, or understanding the Turbopack vs Webpack differences.
name: turbopack
description: Turbopack expert guidance. Use when configuring the Next.js bundler, optimizing HMR, debugging build issues, or understanding the Turbopack vs Webpack differences.
metadata:
priority: 4
docs:
- "https://nextjs.org/docs/app/api-reference/turbopack"
- "https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"
sitemap: "https://nextjs.org/sitemap.xml"
pathPatterns:
- 'next.config.*'
bashPatterns:
- '\bnext\s+dev\s+--turbo\b'
- '\bnext\s+dev\s+--turbopack\b'
retrieval:
aliases:
- next bundler
- turbopack
- fast bundler
- hmr
intents:
- enable turbopack
- fix build issue
- speed up dev server
- configure bundler
entities:
- Turbopack
- HMR
- bundler
- next dev --turbopack
chainTo:
-
pattern: 'webpack\s*:\s*\(|webpack\s*\(config'
targetSkill: nextjs
message: 'Webpack config detected — loading Next.js guidance for migrating webpack customizations to Turbopack top-level config in Next.js 16.'
-
pattern: 'turbopack\s*:\s*\{|experimental\.turbo\b'
targetSkill: nextjs
message: 'Turbopack configuration detected — loading Next.js guidance for top-level turbopack config syntax in Next.js 16 (moved from experimental.turbo).'You are an expert in Turbopack — the Rust-powered JavaScript/TypeScript bundler built by Vercel. It is the default bundler in Next.js 16.
In Next.js 16, Turbopack config is top-level (moved from `experimental.turbo`):
// next.config.ts
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
turbopack: {
// Resolve aliases (like webpack resolve.alias)
resolveAlias: {
'old-package': 'new-package',
},
// Custom file extensions to resolve
resolveExtensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
},
}
export default nextConfigTurbopack handles CSS natively without additional configuration.
Import global CSS in your root layout:
// app/layout.tsx import './globals.css'
CSS Modules work out of the box with `.module.css` files:
// components/Button.tsx
import styles from './Button.module.css'
export function Button({ children }) {
return <button className={styles.primary}>{children}</button>
}Turbopack reads your `postcss.config.js` automatically. Tailwind CSS v4 works with zero config:
// postcss.config.js
module.exports = {
plugins: {
'@tailwindcss/postcss': {},
autoprefixer: {},
},
}Install `sass` and import `.scss` files directly — Turbopack compiles them natively:
npm install sass
import styles from './Component.module.scss'
Turbopack performs tree shaking at the module level in production builds. Key behaviors:
{
"name": "my-ui-lib",
"sideEffects": false
}**Next.js Bundle Analyzer (Next.js 16.1+, experimental)**: Integrated with Turbopack's module graph — inspect server and client modules with precise import tracing:
npx next experimental-analyze
Add `--output` to write the analysis to `.next/diagnostics/analyze` for sharing or diffing.
**Legacy `@next/bundle-analyzer`**: Still works as a fallback:
ANALYZE=true next build
// next.config.ts
import withBundleAnalyzer from '@next/bundle-analyzer'
const nextConfig = withBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
})({
// your config
})Turbopack runs many webpack loaders through `turbopack.rules` (only a core subset of the loader API is implemented, and only loaders that return JavaScript are supported; webpack plugins are not supported). Here is how to migrate common patterns:
| Webpack Loader | Turbopack Equivalent | |----------------|---------------------| | `css-loader` + `style-loader` | Built-in CSS support — remove loaders | | `sass-loader` | Built-in — install `sass` package | | `postcss-loader` | Built-in — reads `postcss.config.js` | | `file-loader` / `url-loader` | Built-in static asset handling | | `svgr` / `@svgr/webpack`
Comprehensive Vercel ecosystem plugin — relational knowledge graph, skills for every major product, specialized agents, and Vercel conventions. Turns any AI agent into a Vercel expert.
Repo: vercel-labs/vercel-plugin
Advanced AI agent benchmark scenarios that push Vercel's cutting-edge platform features —…
End-to-end benchmark suite for vercel-plugin. Runs realistic projects through skill…
Run vercel-plugin eval scenarios in Vercel Sandboxes instead of local WezTerm panels.…
Create and launch benchmark test projects to exercise vercel-plugin skill injection across…
Audit vercel-plugin performance on real-world projects. Extracts tool calls from Claude Code…
Release vercel-plugin — run gates, bump version, generate artifacts, commit, and push. Use…