
This gets Next.js running on Bun instead of Node.js, which means faster dependency installs and dev server startup. It covers the essentials: using the `--bun` flag to force Bun's runtime, accessing Bun-specific APIs like `bun:sqlite` in server components and API routes, and working around the fact that Vercel's edge runtime still uses V8. The security section on blocking post-install scripts and setting cooldown periods for new packages is more thorough than most quickstarts bother with. If you're already bought into Bun for speed gains and want to use it with Next.js without fighting the tooling, this walks through the setup and gotchas.
$ npx -y skills add secondsky/claude-skills --skill bun-nextjs --agent claude-codeInstalls into .claude/skills of the current project.
Run Next.js applications with Bun for faster development and builds.
# Create new Next.js project with Bun
bunx create-next-app@latest my-app
cd my-app
# Install dependencies
bun install
# Development
bun run dev
# Build
bun run build
# Production
bun run start
Scaffolding tools like bunx create-next-app download and execute remote code. Multiple install contexts (local, Docker) require pinning versions in both. Before running, follow supply chain security best practices:
trustedDependencies in package.jsonminimumReleaseAge in bunfig.toml to wait 7 days for new versionssocket package score npm <pkg> or use socket npm install <pkg> to check packagesLoad the dependency-upgrade skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.
Sponsors