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.
npx skills add OpenAEC-Foundation/OpenAEC-Workspace-Composer --skill vite-syntax-hmr-apigit clone --depth 1 https://github.com/OpenAEC-Foundation/OpenAEC-Workspace-ComposerWrote 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.
[](https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-syntax-hmr-api)<a href="https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-syntax-hmr-api"><img src="https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-syntax-hmr-api/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.
<a href="https://agentmods.dev/skills/openaec-foundation/openaec-workspace-composer/vite-syntax-hmr-api"><img src="https://agentmods.dev/badge/skills/openaec-foundation/openaec-workspace-composer/vite-syntax-hmr-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00157 | $0.02272 |
| Opus 5.5 | $0.00063 | $0.00909 |
| Sonnet 5.5 | $0.00031 | $0.00454 |
| Haiku 4.5 | $0.00016 | $0.00227 |
Grade A, and why
vite-syntax-hmr-api 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 2mo 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.
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.
How it starts
The opening of the file, as written. The whole thing — 285 lines — stays where its author put it; the contents beside it link to each section on GitHub.
vite-syntax-hmr-api
Quick Reference
ViteHotContext — Core Methods
| Method | Purpose | Key Constraint |
|---|---|---|
accept() |
Self-accept hot updates | Whitespace-sensitive static analysis |
accept(dep, cb) |
Accept single dependency update | Path MUST be relative |
accept(deps, cb) |
Accept multiple dependency updates | Array of relative paths |
dispose(cb) |
Cleanup before module replacement | Receives data object for state passing |
prune(cb) |
Cleanup when module removed from graph | Called when no longer imported |
invalidate(message?) |
Force propagation upward | MUST call accept() before invalidate() |
data |
Persistent object across updates | NEVER reassign — ALWAYS mutate properties |
on(event, cb) |
Listen to HMR events | 8 built-in events + custom |
off(event, cb) |
Remove event listener | Must pass same callback reference |
send(event, data?) |
Send custom event to server | Buffered if WebSocket not connected |
Built-in HMR Events
| Event | When Fired |
|---|---|
vite:beforeUpdate |
HMR update is about to be applied |
vite:afterUpdate |
HMR update has been applied |
vite:beforeFullReload |
Full page reload is imminent |
vite:beforePrune |
Modules are about to be pruned |
vite:invalidate |
A module has been invalidated via hot.invalidate() |
vite:error |
An error occurred (e.g., syntax error in updated module) |
vite:ws:disconnect |
WebSocket connection to dev server lost |
vite:ws:connect |
WebSocket connection (re-)established |
Critical Warnings
NEVER use HMR APIs without the guard pattern — production builds MUST tree-shake all HMR code:
if (import.meta.hot) {
// ALL HMR code goes here
}
NEVER add whitespace in import.meta.hot.accept( — Vite uses static analysis that is whitespace-sensitive. Writing import.meta.hot.accept ( or splitting across lines breaks HMR detection.
NEVER reassign import.meta.hot.data — the object reference is shared across updates. ALWAYS mutate properties on it:
What ships with it
3 files 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.
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.
- 2mo ago First seen · 285 lines · 157 tokens per session scan A cc7fb57fd841
vite-syntax-hmr-api is a skill published in the GitHub repository OpenAEC-Foundation/OpenAEC-Workspace-Composer (8 stars, last pushed 2mo ago), licensed MIT. It adds 157 tokens to every session and 2,272 once invoked, about $0.0006 per session on Opus 5.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-03.
vite-syntax-hmr-api compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| vite-syntax-hmr-apiOpenAEC-Foundation/OpenAEC-Workspace-Composer | Skill | 8 | 2mo ago | MIT | A | 157 | Claude Code |
| massing-bimibuilder/massing | Skill | 140 | 11d ago | MIT | A | 90 | Claude Code, Codex |
| naviscoord-setupHorizunGroup/naviscoord-mcp | Skill | 23 | 22d ago | MIT | A | 50 | Claude Code |
| aios-archArchSightLabs/archsight-aios | Skill | 37 | 2mo ago | Apache-2.0 | A | 57 | Claude Code, Codex |
| aios-productArchSightLabs/archsight-aios | Skill | 37 | 2mo ago | Apache-2.0 | A | 76 | Claude Code, Codex |
| aios-tender-writeArchSightLabs/archsight-aios | Skill | 37 | 2mo ago | Apache-2.0 | A | 59 | Claude Code, Codex |
| aios-construction-schemeArchSightLabs/archsight-aios | Skill | 37 | 2mo ago | Apache-2.0 | A | 58 | Claude Code, Codex |