agentleFS
crywolfecrywolfe/claude-code-design/.claude/skills/export-standalone/SKILL.md

export-standalone

Skill0 starsChanged 7 days agoMITView on GitHub

Bundle an HTML artifact into a single self-contained file with all CSS/JS/images inlined as data URLs. Requires `monolith` CLI (brew install monolith).

  • Installs packages

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the output directory does not exist: Bash(mkdir -p <output-dir>) with the literal directory (no command substitution)

    line 23
  2. Distinctive:

    Run monolith on the nodev copy:

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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)
    • If the output directory does not exist: Bash(mkdir -p <output-dir>) with the literal directory (no command substitution)
  2. Drop dev-only tooling (live reload, editor overlay, sketch pad: preview-time tools, not part of the design) with code, not by hand. Create the cleaned copy next to the input so relative references still resolve:
    Bash(node scripts/prepare-publish.mjs artifacts/<dir>/<name>.html --strip-only --out artifacts/<dir>/<name>-nodev.html)
    Non-zero exit: stop and show the output (exit 4 = dev-only content survived). Run monolith on that copy only, never on the original.
  3. Run monolith on the nodev copy:
    Bash(monolith --isolate --no-metadata "<name>-nodev.html" -o "<output>")
    The flags come first — the permission grant is the literal prefix monolith --isolate --no-metadata. Flags:
    • --isolate — CSP to prevent any remote resource loads after bundling
    • --no-metadata — strip <!-- saved from ... --> metadata
  4. 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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.