About export-standalone
A skill for exporting HTML pages as single files that work offline. It uses the Rust CLI monolith to inline page resources and can prevent remote resource loads after export.
Key features
- 01Inline page resources into one HTML file
- 02Process files with the monolith CLI
- 03Isolate exported files from remote loads
- 04Strip metadata
- 05Report output file size
Use cases
- 01Create offline pages to share by email or chat
- 02Archive HTML without CDN dependencies
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ bluzir/ claude-code-design --skill export-standaloneAfter installing, type/export-standalonein Claude Code to confirm it loaded.
Details
From the project READMEExport Standalone
Produce a single HTML file that works offline (no external dependencies). Uses monolith — a Rust CLI that inlines everything.
Preflight
Bash(which monolith)— check installed. If missing:- Tell user: "
monolithnot found. Install withbrew install monolith(macOS) and rerun." - Stop.
- Tell user: "
Steps
-
Resolve paths:
$0= input HTML (required)$1= output HTML (default:<input>-standalone.html)Bash(mkdir -p $(dirname <output>))if needed
-
Run monolith:
Bash(monolith "<input>" --isolate --no-metadata -o "<output>")Flags:
--isolate— CSP to prevent any remote resource loads after bundling--no-metadata— strip<!-- saved from ... -->metadata
-
Report:
Bash(stat -f%z "<output>")orBash(ls -la "<output>")for size- "Bundled
<input>→<output>(<size>KB). Works offline."
Tradeoffs
- Pros: single file, drop in email/chat, no CDN dependency, survives archive
- Cons: larger file size (5-10× original), no HMR, fonts often inlined as base64 (bigger)
- Interactivity preserved (React + Babel still run at load time), but network fetches fail by design
Comments
Markdown supported