writing-dev-server-tests

writing-dev-server-tests is a skill for Claude Code from twaldin/hone. It costs 36 tokens per session (796 once invoked), scanned A, original, MIT.

A guide for writing tests for a development server and hot module reloading (HMR), which updates running code when files change without a full restart. It covers test helpers and test areas such as CSS, plugins, HTML, React, and source maps.

In plain words
What is it for?
Use it when creating or modifying tests for a dev server, hot reload behavior, or related bundling features.
Why use it?
It provides a consistent way to check that development and production modes handle file changes, page loading, and bundling correctly.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { devTest, emptyHtmlFile } from "../bake-harness";.

Good fit Use it when creating or modifying tests for a dev server, hot reload behavior, or related bundling features.

Compare 6 skills from other repositories ↓
View source ↗ twaldin/hone
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/twaldin/hone
agentmods
npx agentmods add skills/twaldin/hone/writing-dev-server-tests

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/twaldin/hone/writing-dev-server-tests"><img src="https://agentmods.dev/badge/skills/twaldin/hone/writing-dev-server-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 796 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00036 $0.00796
Opus 5 $0.00018 $0.00398
Sonnet 5 $0.00007 $0.00159
Haiku 4.5 $0.00004 $0.00080

Measured yesterday against content hash 22beced2e694, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

writing-dev-server-tests scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

capsules/bun-module-loader/.candidate-5187e276/.claude/skills/writing-dev-server-tests/SKILL.md · 95 lines

How it starts

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

Writing HMR/Dev Server Tests

Dev server tests validate hot-reloading robustness and reliability.

File Structure

  • test/bake/bake-harness.ts - shared utilities: devTest, prodTest, devAndProductionTest, Dev class, Client class
  • test/bake/client-fixture.mjs - subprocess for Client (page loading, IPC queries)
  • test/bake/dev/*.test.ts - dev server and hot reload tests
  • test/bake/dev-and-prod.ts - tests running on both dev and production mode

Test Categories

  • bundle.test.ts - DevServer-specific bundling bugs
  • css.test.ts - CSS bundling issues
  • plugins.test.ts - development mode plugins
  • ecosystem.test.ts - library compatibility (prefer concrete bugs over full package tests)
  • esm.test.ts - ESM features in development
  • html.test.ts - HTML file handling
  • react-spa.test.ts - React, react-refresh transform, server components
  • sourcemap.test.ts - source map correctness

devTest Basics

import { devTest, emptyHtmlFile } from "../bake-harness";

devTest("html file is watched", {
  files: {
    "index.html": emptyHtmlFile({
      scripts: ["/script.ts"],
      body: "<h1>Hello</h1>",
    }),
    "script.ts": `console.log("hello");`,
  },
  async test(dev) {
    await dev.fetch("/").expect.toInclude("<h1>Hello</h1>");
    await dev.patch("index.html", { find: "Hello", replace: "World" });
    await dev.fetch("/").expect.toInclude("<h1>World</h1>");

    await using c = await dev.client("/");
    await c.expectMessage("hello");

    await c.expectReload(async () => {
      await dev.patch("index.html", { find: "World", replace: "Bar" });
    });
    await c.expectMessage("hello");
  },
});

Key APIs

  • files: Initial filesystem state
  • dev.fetch(): HTTP requests
  • dev.client(): Opens browser instance
  • dev.write/patch/delete: Filesystem mutations (wait for hot-reload automatically)
  • c.expectMessage(): Assert console.log output
  • c.expectReload(): Wrap code that causes hard reload

Read the full file on GitHub · 95 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. yesterday First seen · 95 lines · 36 tokens per session scan A 22beced2e694

Subscribe to this mod's changes

writing-dev-server-tests is a skill published in the GitHub repository twaldin/hone (47 stars, last pushed today), licensed MIT. It adds 36 tokens to every session and 796 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.

Related

Other skills, from other repositories

pi-validation-flow

Use when validating Pi monorepo changes after editing TypeScript, Svelte, package manifests, built-in registry, tests, repo tooling, skills, or docs.

spences10/my-pi · 37 tokens

bug-fix

A structured bug-fixing workflow that takes a problem from reproduction and evidence-based cause finding through approval, implementation, testing, and cleanup.

rushengzhou/sid-code · 62 tokens

accessibility-checks

Use when verifying accessibility (WCAG 2.2 AA) of a rendered UI in a real browser before reporting done — the omp-native replacement for the chrome-devtools a11y plugin. Runs a concrete ordered checklist with omp's builtin browser tool (open tab → tab.evaluate DOM query / elementFromPoint / getComputedStyle /…

jhlee0409/omni-harness-kit · 179 tokens

ui-verify-checks

Use when verifying a frontend UI change in a real browser before reporting done. The canonical 7-check list (real auth → render≠behavior → scroll containment → primary-button reachability → selection-state sync → responsive → console) + environment fail-fast rule (transport-unreachable vs HTTP error distinction) +…

jhlee0409/omni-harness-kit · 114 tokens

test-fix

Diagnose and minimally fix a failing test, then re-run.

terva-sh/terva · 17 tokens

p5js

Use when users request: p5.js sketches, creative coding, generative art, interactive visualizations, canvas animations, browser-based visual art, data viz, shader effects, or any p5.js project.

NousResearch/hermes-agent · 20 tokens