bun-hot-reloading

bun-hot-reloading is a skill for Claude Code, Codex from secondsky/claude-skills. It costs 42 tokens per session (1,909 once invoked), scanned A, original, MIT.

A Bun development setup for automatically reloading code when files change. It explains watch mode, which restarts the process, and hot mode, which reloads modules while keeping state.

In plain words
What is it for?
Use it to configure Bun watch scripts, hot-reload HTTP servers, and run tests whenever source files change.
Why use it?
It removes the need to stop and restart a development server after every edit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the bun plugin — 27 skills, 6 commands, 3 agents, 2 hooks shipped together

not rated 217repo +2 today A scan Socket: passSnyk: passSkillSpector: pass 42 tokens original MIT

Good fit Use it to configure Bun watch scripts, hot-reload HTTP servers, and run tests whenever source files change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/secondsky/claude-skills/bun-hot-reloading
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add secondsky/claude-skills --skill bun-hot-reloading
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code, Codex.

Or install bun, the plugin that ships this one along with the rest of its 27 skills, 6 commands, 3 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bun-hot-reloading

README.md
[![agentmods](https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-hot-reloading/github.svg)](https://agentmods.dev/skills/secondsky/claude-skills/bun-hot-reloading)
Your own site
<a href="https://agentmods.dev/skills/secondsky/claude-skills/bun-hot-reloading"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-hot-reloading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bun-hot-reloading

Your own site · 80×15
<a href="https://agentmods.dev/skills/secondsky/claude-skills/bun-hot-reloading"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-hot-reloading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 3 Apr 2026
  • Snyk pass 3 Apr 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.01909
Opus 5 $0.00021 $0.00955
Sonnet 5 $0.00008 $0.00382
Haiku 4.5 $0.00004 $0.00191

Measured 6d ago against content hash 296352f51396, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

bun-hot-reloading scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fetch(req: Request) {
plugins/bun/skills/bun-hot-reloading/SKILL.md · 388 lines

How it starts

The opening of the file, as written. The whole thing — 388 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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, .jsx change
  • Also watches .json imports
  • 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

export default {
  port: 3000,
  fetch(req: Request) {
    counter++;
    return new Response(`Request #${counter}`);
  },
};
bun --hot run src/server.ts

When you modify server.ts, the module reloads instantly while counter keeps its value.

Bun.serve with Hot Reload

// src/server.ts
const server = Bun.serve({
  port: 3000,
  fetch(req) {
    return new Response("Hello!");
  },
});

// Hot reload handler
if (import.meta.hot) {
  import.meta.hot.accept(() => {
    console.log("Hot reload!");
  });
}

console.log(`Server running on port ${server.port}`);

import.meta.hot API

// Check if hot reload is available
if (import.meta.hot) {
  // Accept updates to this module
  import.meta.hot.accept();

  // Accept with callback
  import.meta.hot.accept((newModule) => {
    console.log("Module updated:", newModule);
  });

  // Cleanup before reload
  import.meta.hot.dispose(() => {
    // Close connections, clear intervals, etc.
    clearInterval(myInterval);
  });

  // Decline hot reload (force full restart)
  import.meta.hot.decline();

  // Invalidate this module (trigger parent reload)
  import.meta.hot.invalidate();
}

Read the full file on GitHub · 388 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 388 lines · 42 tokens per session scan A 296352f51396

Subscribe to this mod's changes

bun-hot-reloading is a skill published in the GitHub repository secondsky/claude-skills (217 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 1,909 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

remember

Record why something is the way it is — a decision and its reasoning, a lesson that cost time, or a standing constraint. Use when the reasoning behind a choice would be expensive to reconstruct later.

ArcticFox2029/chamnan · 40 tokens

bootstrap

Set up chamnan in this repository for the first time — build the architecture index, measure how well the code describes itself, fill in missing file comments, and record a baseline. Run once per repo.

ArcticFox2029/chamnan · 41 tokens

resume

Write down where this stretch of work stopped, so the next session continues instead of restarting. Use at the end of a working session, or when handing the repository to someone else.

ArcticFox2029/chamnan · 36 tokens

milestone

Record a change that reshaped the repository — what moved, why it was worth doing, and which areas it touched. Use after a migration, a rewrite, or a decision that changed how part of the system works.

ArcticFox2029/chamnan · 44 tokens

capture

Write down a procedure worth keeping — a multi-step process, a trap that cost real time, or something that has now come up three times. Use it the moment you finish such a task, while the details are still exact.

ArcticFox2029/chamnan · 46 tokens

avoid-for

Avoid for loops (C-style, for...of, for...in) in TypeScript/JavaScript. Prefer higher-order Array methods like map, filter, find, some, every, reduce. Use when writing or reviewing loops or iteration over arrays, objects, Map, Set, or String.

ncaq/konoka · 63 tokens