agentleFS
thehahndevthehahndev/claude-skills/unbundle-design-export/SKILL.md

unbundle-design-export

Skill0 starsChanged 5 months agoMITView on GitHub

Converts a Claude Design export bundle (typically named index.html, usually 1-5 MB) into plain static files - HTML, CSS, and font files with no JavaScript required. Use this skill whenever the user mentions a Claude Design export, a bundled HTML file from Claude Design, or asks to unbundle, extract, or convert a Claude Design project. Also trigger this skill if the user has a large single-file HTML export and wants to separate it into individual CSS and font files.

  • Installs packages

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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. Distinctive:

    Run the bundled script, passing the directory that contains the export:

    line 28
  2. Very specific:

    No npm install needed — the script uses only Node.js built-ins.

    line 34
  3. Distinctive:

    If the script exits with an error: stop immediately. Do not delete the backup file.

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

What this skill does

Claude Design exports are single self-extracting HTML files. They pack all assets — fonts, CSS, and JavaScript — as base64+gzip blobs inside custom <script> tags. When opened in a browser, a runtime unpacker reconstructs these assets on the fly.

This skill decodes those blobs and produces a clean, static file structure:

project/
├── index.html    <- plain HTML (no script tags)
├── css/
│   └── app.css   <- all extracted styles
└── fonts/
    ├── font-1.woff2
    └── ... (all font files)

The JavaScript in the bundle is Claude Design's own edit-mode overlay (React + a TweaksPanel component). It is not user content and can be safely discarded for static deployment.


How to perform the extraction

Run the bundled script, passing the directory that contains the export:

node <path-to-this-skill>/scripts/extract_bundle.mjs <project-directory>

No npm install needed — the script uses only Node.js built-ins. It:

  • locates the bundle file in the project directory (index.html, index.php, or any .html/.php file containing a __bundler/manifest block)
  • backs up the original bundle to _original_bundle<ext>.bak before touching it
  • decodes the fonts into fonts/ and the styles into css/app.css
  • strips the Claude Design runtime <script> tags and Google Fonts preconnect hints
  • overwrites the bundle file with clean static HTML that links css/app.css

If the script exits with an error: stop immediately. Do not delete the backup file. Report the full error output to the user and wait for instructions.


Done when

The task is not complete until every item on this list is verified. Each item must be confirmed by actively reading or inspecting the relevant file — do not assume correctness based on the extraction script having run without errors. Complete any unmet item before reporting success.

  • CSS link present: read the output HTML file and confirm it contains <link rel="stylesheet" href="css/app.css"> inside <head>
  • CSS non-empty: read css/app.css and confirm it contains actual CSS rules (not an empty or whitespace-only file)
  • Fonts extracted: list the fonts/ directory and confirm at least one .woff2 file is present
  • No script tags: read the output HTML file and confirm it contains zero <script occurrences — if any remain, resolve them per the Troubleshooting section before proceeding
  • Backup removed last: only after every item above has passed, delete the _original_bundle*.bak file from the project directory. If any check failed, keep the backup — it is the only remaining copy of the original export — and report the failure instead.

Troubleshooting

"No Claude Design bundle found" — The file may be named differently. Check that __bundler/manifest appears in the file, then pass the filename explicitly as a second argument: node <path-to-this-skill>/scripts/extract_bundle.mjs <project-directory> <bundle-filename>.

Script tags remain after extraction — Read the HTML file and list every remaining <script> tag. Show the list to the user and ask explicitly whether each should be kept or removed. Do not decide independently. Do not mark the task complete until the user has answered and the appropriate action has been taken.

node not found — Node.js must be installed. Download from nodejs.org. Version 18+ is recommended (ESM support).

If the user wants JavaScript preserved — Some projects include interactive components. In that case, keep the text/jsx asset, compile it with Babel (npx babel --presets @babel/preset-react), write it to js/app.js, and add a <script src="js/app.js"> tag. React and ReactDOM from the manifest can also be extracted and served locally.

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.