Sigil: HTML Preview Server
SkillWeb & browsingUse when opening, serving, checking, listing, or stopping existing local HTML artifacts through a verified loopback server and direct browser handoff.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Sigil: HTML Preview Server skill
What this skill tells your AI
The instructions your AI receives, as published by cyberalchemyai/arcanum in formulae/html-preview-server/SKILL.md and read by ahel’s review.
- the user asks to open, serve, or preview an existing local
.htmlor.htmartifact; - the user asks for the localhost URL directly;
- the user asks which managed HTML previews were used recently or are currently online or offline;
- a generated static artifact needs HTTP-relative asset behavior;
- a managed preview server must be checked or stopped;
- a browser-visible validation should begin from one exact local artifact.
Do not use this sigil when:
- the user is asking to create, edit, critique, or redesign the HTML;
- the target already has a project-owned development-server command that the user explicitly selected;
- the request is remote deployment, public sharing, tunneling, or LAN exposure;
- the target is not a local HTML artifact or directory containing
index.html; - browser automation would perform consequential external actions.
- mode, defaulting to
open. - for
open,start,status, orstop: an exact local HTML path, or a directory containingindex.html.
Optional:
- explicit containing root;
- explicit port;
listresult limit from1through100;- consuming environment browser runtime;
- request to preserve or stop the server after inspection.
- Resolve the caller-supplied path without broad repository discovery.
- Require an existing
.htmlor.htmfile. A directory is accepted only when it containsindex.html. - Default the serving root to the HTML file's containing directory.
- When
--rootis supplied, resolve it and require the target's real path to remain inside that root. - Do not inspect or modify unrelated repository files.
Step 2 - Run the deterministic lifecycle helper
Use the installed package script:
node <skill-directory>/scripts/html-preview-server.mjs \
<open|start|status|stop> <html-path> \
[--root <directory>] [--port <port>]
- Bind only
127.0.0.1. - Use a dynamic port unless the caller requested an exact port.
- Reuse a healthy managed server for the same target.
- Reject traversal outside the real serving root.
- Do not expose directory listings.
- Store lifecycle state only in the operating system temporary directory.
- Treat the helper's JSON receipt as server lifecycle evidence, not browser or application evidence.
- After a successful
open,start, orstop, update the separate sanitized history under an owner-only lock. Retain no token, PID, authorization header, or stale URL in history. - Perform health and exact-byte work outside the history lock. Recover a stale history lock only when its owner is absent and its age exceeds the bounded stale threshold.
- Treat history as auxiliary evidence. If history persistence fails after a
primary lifecycle result is known, preserve that lifecycle result and return
history_update: failed; never report a completed stop as blocked.
Step 3 - Open directly when mode is open
- Consume the exact verified
urlfrom the helper receipt. - Use the active shared browser runtime to navigate that URL immediately. Do not ask the user for a second confirmation merely to open the local loopback page.
- Prefer the repository's already-provided browser runtime. Never create a
package.json, package root, or new dependency solely to obtain a browser. - Record whether navigation reached the expected URL, the observed page title, and any console errors.
- If a headed browser surface is unavailable, preserve the successful HTTP proof and return the clickable URL; do not claim a visible browser was opened.
- Do not follow external links or submit forms unless the user separately authorizes that browser interaction.
Step 4 - Preserve lifecycle intent
openandstartleave the managed server running so the returned URL remains usable.statusperforms no startup or shutdown.stopis idempotent and shuts down only a server that authenticates as the managed server for the exact target.- Report whether the server was started, reused, already stopped, or stopped.
Step 5 - List sanitized recent, online, and offline views
For list:
- Read only the owner-managed temporary state directory and sanitized history. Do not crawl for HTML, inspect arbitrary processes, or sweep ports.
- Merge retained history with compatible legacy live-state records.
- Classify an entry as
onlineonly when its state shape is valid, its token-authenticated health check passes, its target/root identity matches, and its exact target bytes verify at list time. - Classify every other retained target as
offlinewith a bounded reason such asstopped,no-live-state,stale-state,invalid-state,identity-conflict,target-missing, orverification-failed. - Set
url: nullfor every offline entry. A previously allocated loopback URL is not reusable evidence. - Define
recentas successful helperopenrequests ordered bylast_open_requested_at. This timestamp does not prove browser navigation. - Keep all targets that currently verify online and the 50 most recent offline history entries. Treat history as OS-temporary rather than durable cross-reboot storage.
- Return untruncated counts and at most the requested number of items per view.
liststarts, stops, repairs, and restarts nothing.
Step 6 - Close with a fixed receipt
Return the output contract. Keep HTTP reachability, browser observation, and application behavior as separate evidence fields.
- resolve one exact local HTML target;
- default to the containing directory without broad repository analysis;
- bind only to
127.0.0.1; - use a collision-resistant dynamic port by default;
- reuse a healthy same-target server rather than start a duplicate;
- list known targets without requiring the caller to remember an exact path;
- keep recent, online, and offline semantics explicit and deterministic;
- authenticate and exact-byte verify every entry classified online;
- retain only sanitized, owner-only, capped OS-temporary history;
- preserve truthful primary lifecycle receipts when auxiliary history fails;
- keep network verification outside the history critical section and recover only conservatively stale history locks;
- return no stale URL for an offline entry;
- verify the exact target URL over HTTP;
- reject path traversal and avoid directory listings;
- open the verified URL directly in
openmode when a browser runtime exists; - return the concrete clickable URL even when a headed browser is unavailable;
- keep the server alive after
openorstartand stop it only through explicitstopor caller-owned cleanup; - avoid new package roots and dependency installation;
- separate server, browser, and application proof.
- binding to
0.0.0.0, a LAN address, or a public tunnel by default; - using a fixed port without checking for collision;
- starting duplicate servers for one target;
- using
xdg-opensuccess as the only proof of reachability; - treating HTTP 200 as proof that the page is correct, accessible, or usable;
- treating browser navigation as proof of application readiness;
- serving a repository root when the containing directory is sufficient;
- silently widening the root to fix missing assets;
- installing Playwright, adding
package.json, or creating a package root only for preview; - stopping unrelated processes from unverified PID state;
- exposing health tokens, token fingerprints, PIDs, authorization headers, raw state, or stale URLs through aggregate output;
- treating
recentas proof that browser navigation occurred; - treating offline preview state as remote deployment or network status;
- making
liststart, stop, repair, or restart a server; - holding the aggregate history lock across health or exact-byte network checks;
- turning an auxiliary history-write failure into a false primary lifecycle failure;
- crawling the repository for HTML or scanning unmanaged processes and ports;
- leaving the user without the concrete URL or lifecycle state.
When the consuming repository has standard Arcanum observability, summarize the latest execution through the general post-run hook using:
- sigil:
html-preview-server; - tier:
formulae; - mode;
- target kind: file or directory-index;
- root policy: containing-directory or explicit-root;
- port policy: dynamic or explicit;
- server state: started, reused, running, stopped, already-stopped, or blocked;
- HTTP verification status;
- browser navigation: observed, unavailable, skipped, or failed;
- console error count when observed;
- for
list: history scope, known/recent/online/offline counts, ignored malformed record counts, and returned-item counts; - anti-pattern hits;
- workflow gaps;
- output-contract drift;
- reflection trigger.
Default reflection triggers are 5 meaningful executions, 10 generated receipts, 3 related workflow gaps, or 1 severe security or lifecycle gap.
## HTML Preview Server Result
- Mode: open | start | status | stop | list
- Target: <resolved path>
- Root: <resolved path>
- Server: started | reused | running | stopped | already-stopped | blocked
- URL: <verified loopback URL | none>
- HTTP verification: pass | fail | not run
- Browser navigation: observed | unavailable | skipped | failed
- Browser evidence: <title and console summary | none>
- State: <managed state path | none>
- History update: recorded | failed | not applicable
- Proof boundary: <what this run does and does not establish>
- Follow-up: <keep using URL | stop command | blocker>
For list, return the helper's sanitized JSON receipt containing:
receipt_version: html-preview-server/list-v1;- untruncated
known,recent,online, andofflinecounts; - limited
recent,online, andofflinearrays; - online URLs only;
- ignored malformed-record counts;
- the proof boundary separating helper
openrequests, managed-loopback health, browser navigation, and remote network status.
Signals
- GitHub stars
- 25
- Forks
- 3
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
html-preview-server- Source
- github.com/cyberalchemyai/arcanum