Mtp Hot Reload
dotnet/skills
Set up or recover MTP hot reload for a long-lived console-host edit/re-run loop in a Microsoft Testing Platform project.
A skill your agent uses when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development.
$ npx skills add secondsky/claude-skills --skill bun-hot-reloading -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install secondsky/claude-skills bun-hot-reloading --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/bun/skills/bun-hot-reloading .claude/skills/bun-hot-reloading && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "bun-hot-reloading" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-hot-reloading into .claude/skills/bun-hot-reloading/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-hot-reloading", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-hot-reloadingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add secondsky/claude-skills --skill bun-hot-reloading -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install secondsky/claude-skills bun-hot-reloading --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/bun/skills/bun-hot-reloading .agents/skills/bun-hot-reloading && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "bun-hot-reloading" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-hot-reloading into .agents/skills/bun-hot-reloading/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-hot-reloading", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill bun-hot-reloading -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install secondsky/claude-skills bun-hot-reloading --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/bun/skills/bun-hot-reloading .cursor/skills/bun-hot-reloading && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "bun-hot-reloading" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-hot-reloading into .cursor/skills/bun-hot-reloading/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-hot-reloading", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/secondsky/claude-skills.git --path plugins/bun/skills/bun-hot-reloading--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add secondsky/claude-skills --skill bun-hot-reloading -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install secondsky/claude-skills bun-hot-reloading --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/bun/skills/bun-hot-reloading .gemini/skills/bun-hot-reloading && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "bun-hot-reloading" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-hot-reloading into .gemini/skills/bun-hot-reloading/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-hot-reloading", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install secondsky/claude-skills bun-hot-reloadingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add secondsky/claude-skills --skill bun-hot-reloading -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/bun/skills/bun-hot-reloading .github/skills/bun-hot-reloading && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "bun-hot-reloading" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-hot-reloading into .github/skills/bun-hot-reloading/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-hot-reloading", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill bun-hot-reloading -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install secondsky/claude-skills bun-hot-reloading --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/bun/skills/bun-hot-reloading .opencode/skills/bun-hot-reloading && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "bun-hot-reloading" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-hot-reloading into .opencode/skills/bun-hot-reloading/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-hot-reloading", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
bun-hot-reloadingA skill your agent uses when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development.
Bun Hot Reloading is an agent skill from secondsky/claude-skills. Use when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development. Covers watch mode, hot mode, and HTTP server reload.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.
Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
bunbunxFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use bunx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Bun Hot Reloading loads about 1.9k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 210 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 210 words, ~1,908 tokens.
.claude/skills/bun-hot-reloading/SKILL.md (or your agent's skills folder).Bun provides built-in hot reloading for faster development cycles.
| 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 |
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{
"scripts": {
"dev": "bun --watch run src/index.ts",
"dev:server": "bun --watch run src/server.ts",
"test:watch": "bun --watch test"
}
}.ts, .tsx, .js, .jsx change.json importsReloads modules in-place without restarting the process.
bun --hot run src/server.ts// 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.tsWhen you modify server.ts, the module reloads instantly while counter keeps its value.
// 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}`);// 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();
}// src/server.ts
import { createApp } from "./app";
const app = createApp();
const server = Bun.serve({
port: 3000,
fetch: app.fetch,
});
// Hot reload: recreate app
if (import.meta.hot) {
import.meta.hot.accept((newModule) => {
// Reload with new fetch handler
server.reload({
fetch: newModule.default.fetch,
});
});
}// src/server.ts
// Store in globalThis to survive reloads
globalThis.connections ??= new Set();
const server = Bun.serve({
port: 3000,
fetch(req) {
return new Response(`Connections: ${globalThis.connections.size}`);
},
websocket: {
open(ws) {
globalThis.connections.add(ws);
},
close(ws) {
globalThis.connections.delete(ws);
},
},
});
if (import.meta.hot) {
import.meta.hot.accept();
}// dev-server.ts
import { watch } from "fs";
const srcDir = "./src";
let server: ReturnType<typeof Bun.serve> | null = null;
async function startServer() {
// Dynamic import with cache busting
const module = await import(`./src/server.ts?t=${Date.now()}`);
if (server) {
// Bun 1.2+: server.stop() returns a Promise — await it so the old
// socket is fully torn down before we rebind the same port.
await server.stop();
}
server = Bun.serve(module.default);
console.log(`Server started on port ${server.port}`);
}
// Initial start
await startServer();
// Watch for changes
watch(srcDir, { recursive: true }, async (event, filename) => {
if (filename?.endsWith(".ts") || filename?.endsWith(".tsx")) {
console.log(`\n[${event}] ${filename}`);
await startServer();
}
});
console.log("Watching for changes...");// src/dev-server.ts
const clients = new Set<ServerWebSocket>();
const server = Bun.serve({
port: 3000,
fetch(req, server) {
if (req.headers.get("upgrade") === "websocket") {
server.upgrade(req);
return;
}
// Inject reload script in dev
const html = `
<!DOCTYPE html>
<html>
<body>
<h1>Hello!</h1>
<script>
const ws = new WebSocket('ws://localhost:3000');
ws.onmessage = (e) => {
if (e.data === 'reload') location.reload();
};
</script>
</body>
</html>
`;
return new Response(html, {
headers: { "Content-Type": "text/html" },
});
},
websocket: {
open(ws) {
clients.add(ws);
},
close(ws) {
clients.delete(ws);
},
},
});
// Notify clients on file change
watch("./src", { recursive: true }, () => {
clients.forEach((ws) => ws.send("reload"));
});For frontend development with HMR:
// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
hmr: true,
},
});# Use Bun to run Vite
bunx --bun vite# Watch tests
bun --watch test
# Watch specific file
bun --watch test src/utils.test.ts
# With bail (stop on first failure)
bun --watch test --bail// Check if running with --hot
const isHot = !!import.meta.hot;
// Check if running with --watch
const isWatch = process.env.BUN_WATCH === "1";
// Development mode
const isDev = process.env.NODE_ENV !== "production";
if (isDev) {
console.log("Running in development mode");
console.log(`Hot reload: ${isHot}`);
console.log(`Watch mode: ${isWatch}`);
}// ❌ State lost on hot reload
let cache = new Map();
// ✅ State preserved on hot reload
globalThis.cache ??= new Map();
const cache = globalThis.cache;// ❌ Interval keeps running after reload
setInterval(() => console.log("tick"), 1000);
// ✅ Clean up on dispose
const interval = setInterval(() => console.log("tick"), 1000);
if (import.meta.hot) {
import.meta.hot.dispose(() => {
clearInterval(interval);
});
}// ❌ Import not watched
const config = require("./config.json");
// ✅ Use import for watching
import config from "./config.json";| Error | Cause | Fix |
|---|---|---|
Changes not detected | File not imported | Check import chain |
State lost | Using --watch | Use --hot or globalThis |
Port in use | Server not stopped | await server.stop() before rebind |
Memory leak | No cleanup | Use dispose callback |
Load references/advanced-hmr.md when:
Load references/debugging.md when:
© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/bun/skills/bun-hot-reloading of secondsky/claude-skills.
Open the folder on GitHubat commit 8837836
Bun Hot Reloading next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Bun Hot Reloading this skillsecondsky/claude-skills | 227 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Mtp Hot Reloaddotnet/skills | 5.6k | 1 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Uloop Hot ReloadCyberAgentGameEntertainment/NovaShader | 1.6k | — | ~2k | Automated safety check: Pass | MIT | |
| Bun Runtimeaffaan-m/ECC | 275k | 1 repos | ~443 | Automated safety check: Notes | MIT | |
| Understanding Hot Reload LimitsrosuH/EasyWatermark | 1.9k | 1 repos | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| Mtp Hot Reloadmicrosoft/testfx | 1k | — | ~1.5k | Automated safety check: Pass | MIT |
dotnet/skills
Set up or recover MTP hot reload for a long-lived console-host edit/re-run loop in a Microsoft Testing Platform project.
CyberAgentGameEntertainment/NovaShader
Hot reload applies method-body edits and can add new methods and fields (added members are visible to edited code in the same reload within the same assembly); it can also change signatures: a…
affaan-m/ECC
Bun 作为运行时、包管理器、打包器和测试运行器。何时选择 Bun 而非 Node、迁移注意事项以及 Vercel 支持。
rosuH/EasyWatermark
A skill your agent uses to teach Claude exactly which Kotlin and Compose changes hot-reload under Compose HotSwan and which trigger a full incremental rebuild fallback.
microsoft/testfx
Suggests using Microsoft Testing Platform (MTP) hot reload to iterate fixes on failing tests without rebuilding.
affaan-m/ECC
A skill your agent uses to monitor and verify a deployed URL after releases — checks HTTP endpoints, SSE streams, static assets, console errors, and performance regressions after deploys, merges, or…
secondsky/claude-skills
TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.
secondsky/claude-skills
AutoAnimate (@formkit/auto-animate) zero-config animations for React.
secondsky/claude-skills
MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.
secondsky/claude-skills
This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…
secondsky/claude-skills
Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).
secondsky/claude-skills
Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.
A skill your agent uses when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development. Bun Hot Reloading is an agent skill from secondsky/claude-skills. Use when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development.
Bun Hot Reloading fits situations like: implementing hot reloading with Bun (--hot; automatic code reloading during development.
Run `npx skills add secondsky/claude-skills --skill bun-hot-reloading -a claude-code`. Or copy the skill folder (plugins/bun/skills/bun-hot-reloading in secondsky/claude-skills) into .claude/skills/bun-hot-reloading in your project. Claude Code loads it when a task matches its description.
Run `npx skills add secondsky/claude-skills --skill bun-hot-reloading -a codex`. Or copy the skill folder (plugins/bun/skills/bun-hot-reloading in secondsky/claude-skills) into .agents/skills/bun-hot-reloading in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill bun-hot-reloading -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bun-hot-reloading, .gemini/skills/bun-hot-reloading, .github/skills/bun-hot-reloading and .opencode/skills/bun-hot-reloading in your project.
Going by SKILL.md and its folder, Bun Hot Reloading needs the command-line tools its instructions call (bun and bunx).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Bun Hot Reloading is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Bun Hot Reloading: Mtp Hot Reload (dotnet/skills, 5.6k stars), Uloop Hot Reload (CyberAgentGameEntertainment/NovaShader, 1.6k stars), Bun Runtime (affaan-m/ECC, 275k stars) and Understanding Hot Reload Limits (rosuH/EasyWatermark, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.
Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.