Skip to content

Running Next.js on Bun with Bun-native APIs, supply-chain guardrails, and Next 16 deployment caveats.

CCM score
48 of 100
skills.sh installs
453
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers project scaffolding, dev, build, and production start under Bun, plus bun --bun runtime wiring in package.json scripts
  • Includes Bun SQLite and file API examples in server components, route handlers, and server actions, plus a Dockerfile and Vercel notes
  • Enforces supply-chain guardrails: trustedDependencies for post-install scripts, a 7-day minimumReleaseAge cooldown, and Socket package audits
  • Designed for developers building Next.js 16 apps on Bun, including those deploying via OpenNext to Cloudflare

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/secondsky/claude-skills
Categories
Frontend & UI Code, Backend & APIs
First seen
Jun 3, 2026

Questions

How do I run Next.js with Bun?

Add the bun-nextjs skill with npx -y skills add secondsky/claude-skills --skill bun-nextjs -y in your project. The skill then guides the agent to run Next.js on Bun as the runtime, using the bun --bun flag for dev, build and start scripts.

Can bun-nextjs help me use Bun APIs like bun:sqlite inside Next.js?

Yes, the skill shows how to use Bun APIs such as bun:sqlite and Bun.file inside Server Components, API routes and Server Actions. It also explains that serverExternalPackages in next.config must list bun:sqlite, and that Vercel edge runtime does not run Bun APIs.

Where does bun-nextjs stand in the Frontend and UI Code category?

bun-nextjs is listed in the Frontend and UI Code category on Claude Marketplaces, alongside vercel-react-best-practices, web-design-guidelines, design-taste-frontend, vercel-composition-patterns and lark-apps. It is aimed at developers who want Next.js with Bun rather than general React styling or design guidance.

More from secondsky/claude-skills

All 116

Similar to Bun Nextjs

More Frontend & UI Code