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.

skills.sh installs
358
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill bun-nextjs --agent claude-code

Installs into .claude/skills of the current project.

Files

Bun Next.js

Run Next.js applications with Bun for faster development and builds.

Quick Start

# 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

Secure Installation

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:

  • Block post-install scripts — Bun disables them by default; allow specific packages via trustedDependencies in package.json
  • Cooldown period — Configure minimumReleaseAge in bunfig.toml to wait 7 days for new versions
  • Audit before installing — Run socket package score npm <pkg> or use socket npm install <pkg> to check packages

Load the dependency-upgrade skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.

Project Setup

package.json

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Category
Frontend Development
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1gentleman-programming avatarangular-performancegentleman-programming/gentleman-skillsAngular performance: NgOptimizedImage, @defer, lazy loading, SSR. Trigger: When optimizing Angular app performance, images, or lazy loading.353skills.sh installs
2sergiodxa avatarfrontend-js-best-practicessergiodxa/agent-skillsJavaScript performance optimization guidelines. Use when writing, reviewing, or refactoring JavaScript/TypeScript code to ensure optimal performance patterns. T336skills.sh installs
3wsimmonds avatarnextjs-advanced-routingwsimmonds/claude-nextjs-skillsGuide for advanced Next.js App Router patterns including Route Handlers, Parallel Routes, Intercepting Routes, Server Actions, error boundaries, draft mode, and336skills.sh installs
4secondsky avatarbun-nuxtsecondsky/claude-skillsUse when running Nuxt 3 with Bun runtime, building Vue/Nuxt apps with Bun, or configuring Nuxt projects to use Bun for development and production.323skills.sh installs
5patricio0312rev avatartailwind-gradient-builderpatricio0312rev/skillsCreates modern CSS gradients using Tailwind CSS including linear, radial, conic, mesh gradients, animated gradients, glassmorphism, and gradient text effects. U318skills.sh installs
6patricio0312rev avatarfrontend-refactor-plannerpatricio0312rev/skillsCreates safe refactor plans for messy UI code including component splitting strategies, state simplification, performance optimizations, and accessibility impro317skills.sh installs