mcpField
E
export-standalone

export-standalone

github.com/bluzirDevelopment10745 installsUpdated 27w ago
Repository

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

  1. 01Inline page resources into one HTML file
  2. 02Process files with the monolith CLI
  3. 03Isolate exported files from remote loads
  4. 04Strip metadata
  5. 05Report output file size

Use cases

  1. 01Create offline pages to share by email or chat
  2. 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-standalone

After installing, type/export-standalonein Claude Code to confirm it loaded.

Details

From the project README

Export Standalone

Produce a single HTML file that works offline (no external dependencies). Uses monolith — a Rust CLI that inlines everything.

Preflight

  1. Bash(which monolith) — check installed. If missing:
    • Tell user: "monolith not found. Install with brew install monolith (macOS) and rerun."
    • Stop.

Steps

  1. Resolve paths:

    • $0 = input HTML (required)
    • $1 = output HTML (default: <input>-standalone.html)
    • Bash(mkdir -p $(dirname <output>)) if needed
  2. 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
  3. Report:

    • Bash(stat -f%z "<output>") or Bash(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