Bun Hot Reloading
Reload-focused Bun guide that contrasts --watch restarts with --hot in-place module reloads.
- CCM score
- 52 of 100
- skills.sh installs
- 418
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers
--watchprocess restarts and--hotmodule reloading, with a comparison table of state retention, speed, and use cases - Includes
import.meta.hotaccept, dispose, decline, and invalidate patterns, plus HTTP server reload withserver.reload() - Enforces cleanup through
disposecallbacks andglobalThisstate storage so intervals and state survive or stop correctly across reloads - Designed for Bun developers building HTTP servers, WebSocket live reload, or Vite-based frontend workflows
Install
$ npx -y skills add secondsky/claude-skills --skill bun-hot-reloading -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Bun Hot Reloading
Bun provides built-in hot reloading for faster development cycles.
Watch Mode vs Hot Mode
| Feature | --watch | --hot |
|---|---|---|
| Behavior | Restart process | Reload modules |
| State | Lost on reload | Preserved |
| Speed | ~20ms restart | Instant reload |
| Use case | Any file type | Bun.serve HTTP |
Watch Mode (--watch)
Restarts the entire process when files change.
# Basic watch mode
bun --watch run src/index.ts
# Watch specific script
bun --watch run dev
# Watch with test runner
bun --watch test
package.json Scripts
{
"scripts": {
"dev": "bun --watch run src/index.ts",
"dev:server": "bun --watch run src/server.ts",
"test:watch": "bun --watch test"
}
}
Watch Behavior
- Watches imported files automatically
- Triggers on any
.ts,.tsx,.js,.jsxchange - Also watches
.jsonimports - Restarts with fresh state
Hot Mode (--hot)
Reloads modules in-place without restarting the process.
bun --hot run src/server.ts
HTTP Server Hot Reload
// src/server.ts
let counter = 0; // State preserved across hot reloads
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Backend & APIs, Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the bun-hot-reloading skill help with?
The bun-hot-reloading skill covers hot reloading with Bun, including watch mode, hot mode and HTTP server reload during development. It explains when to use --watch, which restarts the whole process, versus --hot, which reloads modules in place and keeps state.
How do I install the bun-hot-reloading skill?
Run npx -y skills add secondsky/claude-skills --skill bun-hot-reloading -y in your project to install bun-hot-reloading. After that, the agent can set up Bun watch mode, hot mode and import.meta.hot handlers for your server code.
Which skills lead bun-hot-reloading in the Backend & APIs category?
On Claude Marketplaces, bun-hot-reloading is listed under Backend & APIs next to entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. This skill sets itself apart by focusing on Bun's own reload modes and HTTP server patterns.
When should I use --hot instead of --watch with bun-hot-reloading?
Use --hot when you want modules reloaded in place with state preserved, such as a Bun.serve HTTP server. Use --watch when you need a full process restart on any file type, including tests, since state is lost on each restart.
More from secondsky/claude-skills
All 116- Claude Hook Writer418
- Claude Code Bash Patterns417
- Plan Interview417
- Bun React Ssr416
- Bun Shell416
- Bun Websocket Server414
- Bun Redis412
- Ml Pipeline Automation412
- Nuxt Core411
- Nuxt Data411
- Bun Ffi409
- Bun Nuxt409
- Bun Jest Migration408
- Bun Macros407
- Multi Ai Consultant407
- Model Deployment405
- Graphql Implementation403
- Jest Generator402
- Thesys Generative Ui393
- Nuxt Studio391
- Maz Ui390
- Woocommerce Code Review389
- Woocommerce Backend Dev388
- Woocommerce Copy Guidelines384
Similar to Bun Hot Reloading
More Backend & APIsbun-http-serverSkillsecondsky/claude-skills424 installsBun.serve guide covering routing, body parsing, responses, TLS, and static files for HTTP servers.
HmrMCP serverpromplate60 starsDocumentation and tooling for hot module reloading and reactive programming in Python.
bun-runtimeSkillsecondsky/claude-skills438 installsFast all-in-one JavaScript runtime covering CLI flags, watch and hot modes, env loading, and module resolution.
hot-reload-optimizerSkillpatricio0312rev/skills268 installsConfig-driven HMR and dev-server tuning for Vite, Next.js, and webpack projects, covering dependency pre-bundling and caching.
compressionSkillpatternsdev/skills1.8K installsReference guide to JavaScript compression with Gzip and Brotli, covering static versus dynamic server-side setups.
websocket-developmentSkillmindrally/skills888 installsGuidelines for building real-time WebSocket applications with secure connections, scalable patterns, and tested reliability.