stitch::extract-static-html

Extract self-contained static HTML from running web applications by inlining CSS and images.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/khulnasoft-bot/scalify --skill stitch-extract-static-html-khulnasoft-bot
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: stitch::extract-static-html
Source: https://github.com/khulnasoft-bot/scalify/tree/main/skills/plugins/stitch-design/skills/extract-static-html
Command: npx skills add https://github.com/khulnasoft-bot/scalify --skill stitch-extract-static-html-khulnasoft-bot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires puppeteer, @babel/parser, @babel/traverse, @babel/generator, tsx, and includes scripts (resource) components.

What problem does it solve? Capturing a specific UI state from a live web app as a single portable HTML file is difficult because styles, images, and scripts are spread across many resources. This Skill produces a fully self-contained static HTML snapshot with all CSS inlined and images embedded as base64, ready to share or upload to Stitch. ## Core Features & Use Cases - Puppeteer Snapshot (Strategy A): Launches headless Chrome against a locally running app (React, Next.js, Vue, Svelte, Storybook) and captures the fully rendered DOM with computed styles resolved, no size limits. - Browser Subagent Capture (Strategy B): Interacts with the page first (clicks, form fills, navigation) before extracting the rendered DOM for states unreachable by direct URL. - Static Fallback: Converts a manually flattened MockPage.jsx into HTML via Babel AST parsing when the app cannot run locally, then post-processes local images into base64. - Use Case: You built a React + Vite dashboard and need to share a static version of the home, pricing, and dark-mode dashboard pages with a designer for Stitch upload. ## Quick Start Ask the AI to extract a static HTML snapshot of your locally running app at http://localhost:5173 and save it to .stitch/home.html.

Frequently Asked Questions about stitch::extract-static-html

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract static HTML from a React app?▼

Run the app locally, then execute the snapshot script with Puppeteer pointing at your dev server URL, for example npx tsx snapshot.ts --url http://localhost:5173 --output .stitch/home.html. It inlines all stylesheets and converts images to base64 automatically.

Puppeteer snapshot vs browser subagent capture for HTML extraction?▼

Puppeteer snapshot is recommended when the app runs locally without an auth wall, offering the highest fidelity with computed styles and no output size limit. Browser subagent capture is better when you must interact with the page first, such as clicking buttons or filling forms.

Does the snapshot script work with Next.js and Tailwind?▼

Yes, it works with any framework including Next.js, Vue, Nuxt, Svelte, and Storybook. For Next.js use --wait 3000 for SSR hydration, and images from /_next/image are inlined as base64 while the dev server runs.

Why are images missing or broken in my extracted HTML?▼

Missing images usually mean the page had not finished loading, so increase the --wait flag. If images break after the server stops, verify srcset was inlined by checking the log for the inlined images count.

What are the limitations of the MockPage.jsx fallback method?▼

The MockPage.jsx fallback is a last resort for apps that cannot run locally, such as broken dependencies or auth walls. It requires manually flattening React components, hardcoding all data, and removing conditionals, so Strategy A is preferred whenever possible.