bun-dev-server

bun-dev-server is a skill for Claude Code from DaleSeo/bun-skills. It costs 38 tokens per session (3,026 once invoked), scanned C, original, MIT.

A development-server setup for Bun applications with hot module replacement (HMR), which updates code in a running app without a full restart.

In plain words
What is it for?
Use it to configure React refresh, live-reloading API servers, combined frontend and backend apps, or static file servers.
Why use it?
It shortens the feedback loop while building web apps or APIs by reloading changed code during development.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to configure React refresh, live-reloading API servers, combined frontend and backend apps, or static file servers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/daleseo/bun-skills/bun-dev-server
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 DaleSeo/bun-skills --skill bun-dev-server
Clone the repo
git clone --depth 1 https://github.com/DaleSeo/bun-skills

Made for: Claude Code.

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-dev-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/daleseo/bun-skills/bun-dev-server/github.svg)](https://agentmods.dev/skills/daleseo/bun-skills/bun-dev-server)
Your own site
<a href="https://agentmods.dev/skills/daleseo/bun-skills/bun-dev-server"><img src="https://agentmods.dev/badge/skills/daleseo/bun-skills/bun-dev-server/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-dev-server

Your own site · 80×15
<a href="https://agentmods.dev/skills/daleseo/bun-skills/bun-dev-server"><img src="https://agentmods.dev/badge/skills/daleseo/bun-skills/bun-dev-server.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,026 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00038 $0.03026
Opus 5.5 $0.00015 $0.01210
Sonnet 5.5 $0.00008 $0.00605
Haiku 4.5 $0.00004 $0.00303

Measured 3mo ago against content hash a5117b0b5bfe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

bun-dev-server scanned grade C with 2 findings 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 3mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

"clean": "rm -rf dist"

Makes network callslowCapability

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

async fetch(request, server) {
skills/bun-dev-server/SKILL.md · 546 lines

How it starts

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

Bun Development Server Setup

You are assisting with setting up a high-performance development server using Bun.serve with Hot Module Replacement (HMR) and React Fast Refresh.

Workflow

1. Determine Server Type

Ask the user what type of development server they need:

  • React/Frontend App: SPA with React Fast Refresh
  • API Server: REST/GraphQL API with auto-reload
  • Full-Stack App: Frontend + API combined
  • Static Server: File server with live reload

2. Check Prerequisites

# Verify Bun installation
bun --version

# Check if project has package.json
ls -la package.json

If no package.json exists, suggest running bun init first.

3. Install Dependencies

For React Apps:

bun add react react-dom
bun add -d @types/react @types/react-dom

For API with Hono (recommended):

bun add hono

For Full-Stack:

bun add react react-dom hono
bun add -d @types/react @types/react-dom

4. Create Server Configuration

React Development Server

Create server.ts in the project root:

import type { ServerWebSocket } from "bun";

const clients = new Set<ServerWebSocket<unknown>>();

const server = Bun.serve({
  port: 3000,

  async fetch(request, server) {
    const url = new URL(request.url);

    // WebSocket for HMR
    if (url.pathname === "/_hmr") {
      const upgraded = server.upgrade(request);
      if (upgraded) return undefined;
      return new Response("WebSocket upgrade failed", { status: 500 });
    }

    // Serve index.html for SPA routing
    if (url.pathname === "/" || !url.pathname.includes(".")) {
      return new Response(
        Bun.file("public/index.html"),
        { headers: { "Content-Type": "text/html" } }
      );
    }

    // Serve static files
    const filePath = `public${url.pathname}`;
    const file = Bun.file(filePath);

    if (await file.exists()) {
      return new Response(file);
    }

    return new Response("Not Found", { status: 404 });
  },

  websocket: {
    open(ws) {
      clients.add(ws);
      console.log("HMR client connected");
    },

    close(ws) {
      clients.delete(ws);
      console.log("HMR client disconnected");
    },

    message(ws, message) {
      // Handle client messages if needed
    },
  },
});

console.log(`🚀 Dev server running at http://localhost:${server.port}`);

// Watch for file changes
const watcher = Bun.file.watch(import.meta.dir + "/src", {
  recursive: true,
});

for await (const event of watcher) {
  if (event.kind === "change" && event.path.endsWith(".tsx")) {
    console.log(`📝 File changed: ${event.path}`);

    // Notify all connected clients to reload
    for (const client of clients) {
      client.send(JSON.stringify({ type: "reload" }));
    }
  }
}

Read the full file on GitHub · 546 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3mo ago First seen · 546 lines · 38 tokens per session scan C a5117b0b5bfe

Subscribe to this mod's changes

bun-dev-server is a skill published in the GitHub repository DaleSeo/bun-skills (4 stars, last pushed 10mo ago), licensed MIT. It adds 38 tokens to every session and 3,026 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

bun-dev-server compared with skills from other repositories

bun-dev-server next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bun-dev-serverDaleSeo/bun-skillsSkill410mo agoMITC38Claude Code
glycoengineeringsynthetic-sciences/openscienceSkill4.5k2d agoApache-2.0A75Claude Code, Codex
ensembl-databasesynthetic-sciences/openscienceSkill4.5k2d agoApache-2.0A45Claude Code, Codex
colab-finetuningsynthetic-sciences/openscienceSkill4.5k2d agoApache-2.0A67Claude Code, Codex
swarm-pr-reviewZaxbyHub/opencode-swarmSkill549todayMITA91Claude Code
loopZaxbyHub/opencode-swarmSkill549todayMITA72OpenCode
restore-internals-seams-in-finally-blocks-after-each-testZaxbyHub/opencode-swarmSkill549todayMITA26OpenCode