Agent skill · software engineering · secondsky

bun-nextjs

This skill should be used when the user asks about "Next.js with Bun", "Bun and Next", "running Next.js on Bun", "Next.js development with Bun", "create-next-app with Bun", or building Next.js applications using Bun as the runtime.

Why this skill is useful

Provides specific commands and configurations for running Next.js applications with Bun, which the AI wouldn't reliably generate on its own.

What it needs

Requires bun installed locally. About 4k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.

What this skill does

Bun Next.js Run Next.js applications with Bun for faster development and builds. Quick 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 Use Bun as Runtime The --bun flag forces Next.js to use Bun's runtime instead of Node.js. Configuration next.config.js Using Bun APIs in Next.js Server Components API Routes File Operations Server Actions Proxy (formerly Middleware) In Next.js 16, middleware.ts is renamed to proxy.ts (the middleware name still works but is deprecated). Proxy runs on the Node.js runtime, not the Edge runtime. ⚠️ Deploying to Cloudflare via OpenNext? Keep middleware.ts. @opennextjs/cloudflare does not yet recognize the proxy.ts filename — renaming will silently disable your middleware on Cloudflare. Until OpenNext adds support, deploy with the classic middleware.ts (it still works in Next 16, just deprecated upstream). This caveat does not apply to Node.js/Vercel/Bun-native deployments. Environment Variables Deployment Build for Production Docker Vercel Note: Vercel's edge runtime uses V8, not Bun. Bun APIs work in: Server Components (Node.js runtime) API Routes (Node.js runtime) Server Actions (Node.js runtime) Performance Tips 1. Turbopack is the default in Next.js 16 (no flag needed): 2. Prefer Server Components - Less JavaScript sent to client 3. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills secondsky/bun-nextjs

View the source on GitHub

Browse the @skills marketplace