Vite · inspect by default
/vite-hmr
Diagnose broken, slow, or inconsistent hot-module updates
Use for broken development updates; react-effects handles lifecycle bugs visible during refresh.
Make it your own.
In Claude Code, use the slash command and add your context. In Codex, select vite-hmr from the just-vibe skill picker, then send the same brief.
Version 0.11.0 also supports /jv vite-hmr, /just-vibe vite-hmr and /jv:vite-hmr in Claude. See shortcut setup and context examples.
/just-vibe:vite-hmr Investigate why changes trigger full reloads and lose form state./just-vibe:vite-hmr Diagnose refresh failing behind a reverse proxy while direct localhost works./just-vibe:vite-hmr Inspect HMR configuration without starting a dev server; identify needed browser evidence.What the agent does
- Follow the file change from watcher to module graph to HMR connection and framework boundary, inspecting plugin boundaries and duplicate modules.
- Localize the failure, distinguishing transport loss, invalidation and a deliberate full reload from hot replacement.
Inputs
- affected file/component, development environment, and HMR logs or reproduction.
Optional context: scope, references, constraints, successCriteria, environment, mode, budget.
Scope
- Reads
- Watcher events, module invalidation, framework refresh, and proxy/network transport.
- Writes
- Inspect/plan: inspect or propose; save requested artifacts only. Apply: edit the requested local implementation and perform relevant bounded checks while preserving unrelated work. Live data changes, remote actions and paid jobs require their resolved target and existing session authorization.
- Mode
- Inspect; affected file/component, development environment, and HMR logs or reproduction. Apply for a requested fix.
- Prerequisites
- Project manifests, lockfile, Vite/framework/plugin versions, and existing build scripts. Verify current version-specific documentation when changing configuration. Requested isolated verification may generate disposable build/cache artifacts; inspect their scripts first and preserve product files.
Expected output
- Reproduction steps, the failing HMR boundary and a focused fix proposal; in apply mode, the applied fix with update and state-preservation checks.
How the work is checked
- A changed module updates correctly after remediation; unrelated state is preserved when the framework supports it.
When to stop or clarify
- Running the project's dev server is bounded local execution. Do not disable host protections or broadly relax filesystem access as a default fix.
Handling missing context
- Infer
- Read manifests, lockfile, installed Vite/plugins, entry points, aliases, modes and current build scripts.
- Assume
- Preserve existing tooling and base-path conventions; in apply mode, make a local focused change when the brief identifies the behavior, and otherwise propose it.
- Ask
- Ask if the intended serving subpath or deployment target cannot be inferred and would change generated URLs; do not ask for versions present in the lockfile.
Technical guidance
- Evidence
- Observe filesystem watcher, module invalidation, websocket transport and framework refresh boundary.
- Method
- Identify the first missing event and repair that layer; inspect proxy and container paths before changing host restrictions.
- Pitfall
- Full page reload and preserved hot state are different outcomes; disabling host checks is not a generic websocket repair.
- Check
- In apply mode or an owned copy, edit a leaf and a shared dependency, verify the expected refresh behavior, and check reconnection after an ordinary dev restart.
Situational decisions
When updates fail only through a proxy or container: Inspect websocket origin/port and mounted-path watching before relaxing host/filesystem protections.
The coding agent follows this workflow using its available tools. Installation does not grant service access or guarantee an outcome. Read the compatibility notes.