Agent skill · software engineering · secondsky

bun-cloudflare-workers

This skill should be used when the user asks about "Cloudflare Workers with Bun", "deploying Bun to Workers", "wrangler with Bun", "edge deployment", "Bun to Cloudflare", or building and deploying applications to Cloudflare Workers using Bun.

Why this skill is useful

Provides specific commands and patterns for deploying applications to Cloudflare Workers using Bun, which the AI may not reliably generate on its own.

What it needs

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

What this skill does

Bun Cloudflare Workers Build and deploy Cloudflare Workers using Bun for development. Quick Start Secure Installation Scaffolding tools like bunx create-cloudflare download and execute remote code. 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 wrangler.toml Basic Worker Using Hono KV Storage D1 Database Durable Objects R2 Storage Development with Bun Local Development Testing with Bun Miniflare for Testing Build for Production Environment Variables Scheduled Workers (Cron) Common Errors Error Cause Fix ------- ------- ----- Bun API not available Workers use V8 Use Web APIs only Module not found Build issue Check bundler config Script too large Exceeds 10MB Optimize bundle CPU time exceeded Long execution Optimize or use queues API Compatibility Workers support Web APIs, NOT Bun-specific APIs: Available Not Available ----------- --------------- fetch() Bun.file() Response Bun.serve() Request bun:sqlite URL bun:ffi crypto fs TextEncoder childprocess When to Load References Load references/bindings.md when: Advanced KV/D1/R2 patterns Queue workers Service bindings Load references/performance.md when: Bundle optimization Cold start reduction Caching strategies

How to use it

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

@skills secondsky/bun-cloudflare-workers

View the source on GitHub

Browse the @skills marketplace