Agent skill · Frontend

single-file-bundling

Configure Vite with vite-plugin-singlefile for mandatory single-file HTML bundling of MCP Apps. All assets (JS, CSS, images, fonts) must be inlined into a single HTML file for sandboxed iframe compatibility.

a5c-aigithub.com/a5c-aiGitHub ↗
claude-codecodexcan modify filesMIT
Install
npx skills add a5c-ai/babysitter --skill single-file-bundling --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 10 KB
Bundled scripts: none
Allowed tools: ReadWriteEditBash
Path: library/specializations/ai-agents-conversational/skills/single-file-bundling/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,642
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# single-file-bundling Configure Vite with vite-plugin-singlefile to produce a single self-contained HTML file for MCP Apps running in sandboxed iframes. ## Overview MCP Apps run in sandboxed iframes with no same-origin server. This means: - **No relative asset URLs** -- `<script src="./main.js">` will not resolve - **No CSS file imports** -- `<link href="./styles.css">` will not load - **No image/font paths** -- relative paths to assets will fail - The **entire UI must be a single HTML file** with all JS, CSS, images, and fonts inlined `vite-plugin-singlefile` handles this by inlining all assets into one HTML file during the Vite build. This is **mandatory** for MCP Apps -- without it, the app will show a blank iframe. ## Capabilities ### Vite Configuration - Configure Vite with `vite-plugin-singlefile` - Set correct `base`, `build.outDir`, and entry point - Handle framework-specific Vite plugins (React, Vue, Svelte, Preact, Solid) ### Single HTML File Output - All JavaScript inlined as `<script>` tags - All CSS inlined as `<style>` tags - All images converted to data URIs - All fonts converted to base64 ### Two-Phase Build Setup - Phase 1: Vite bundles UI into `dist/mcp-app.html`

What's inside
Steps it walks through
  1. Overview
  2. Capabilities
  3. Vite Configuration
  4. Single HTML File Output
  5. Two-Phase Build Setup
  6. Hybrid Build Pipelines
  7. Usage
  8. Basic Vite Configuration
  9. React Vite Configuration
  10. Vue Vite Configuration
  11. Svelte Vite Configuration
  12. HTML Entry Point
  13. Package.json Build Scripts
  14. Server Reading the Bundled HTML
Ships with 1 file
  • README.md
Commands it runs
Required dev dependencies
npm install -D vite vite-plugin-singlefile
Framework-specific (pick one)
npm install -D @vitejs/plugin-react       # React
npm install -D @vitejs/plugin-vue         # Vue
npm install -D @sveltejs/vite-plugin-svelte  # Svelte
More from babysitter
All skills →
About this skill
What does the single-file-bundling skill do?

Configure Vite with vite-plugin-singlefile for mandatory single-file HTML bundling of MCP Apps. All assets (JS, CSS, images, fonts) must be inlined into a single HTML file for sandboxed iframe compatibility.

How do I install it?

Run `npx skills add a5c-ai/babysitter --skill single-file-bundling --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From a5c-ai/babysitter, a repository with 1,642 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going