stitch::extract-static-html

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

9.0k|1.1k|Updated Jan 16, 2026
Ready to run
npx skills add https://github.com/google-labs-code/stitch-skills --skill stitch-extract-static-html-google-labs-code
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: stitch::extract-static-html
Source: https://github.com/google-labs-code/stitch-skills/tree/main/plugins/stitch-design/skills/extract-static-html
Command: npx skills add https://github.com/google-labs-code/stitch-skills --skill stitch-extract-static-html-google-labs-code

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Capturing the exact visual state of a web application for sharing, archival, or static deployment often requires manual work or complex tooling. This Skill automates extraction of fully rendered pages with all styling and assets embedded, eliminating the need to maintain running servers for sharing or archiving UI states. ## Core Features & Use Cases - Strategy A (Puppeteer): Headless browser snapshot with automatic CSS inlining, image base64 encoding, and support for any framework (React, Vue, Angular, Svelte, Next.js, Nuxt). - Strategy B (Browser Subagent): Interactive capture for pages requiring navigation, form interaction, or dynamic state changes before extraction. - Use Case: You have a React dashboard running locally on port 5173. Extract the homepage, pricing page, and dark-mode dashboard view as three standalone HTML files ready to upload to Stitch or share without needing the dev server. ## Quick Start Start your web application locally, then run the snapshot script with your app URL and desired output filename to generate a self-contained HTML file.

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 capture a web page as static HTML with inlined images?▼

Use the Puppeteer snapshot strategy to launch a headless browser, render your URL, and automatically inline all CSS and images as base64 data URIs. The resulting HTML runs standalone without requiring a server.

Which frameworks does static HTML extraction support?▼

Any framework works: React, Vue, Svelte, Angular, Next.js, Nuxt, plain HTML, and Storybook. The Puppeteer approach captures the rendered DOM and computed styles regardless of build tool or framework internals.

How do I capture a page that requires authentication?▼

Provide an authentication script exporting an async function that fills login forms, sets cookies, or injects tokens. The snapshot script runs this before re-navigating to your target URL.

Does extraction work with dark mode or theme variants?▼

Yes, use the --html-class flag to add CSS classes like 'dark' to the <html> element before capture, enabling Tailwind or custom theme logic to apply.

Why are images missing from the extracted HTML?▼

Images may not have finished loading; increase the --wait flag (e.g., --wait 3000 for Next.js). If using srcset attributes, verify the dev server is running—the script fetches optimized variants during capture.

Can I capture charts, graphs, or canvas elements?▼

Use the --inline-canvas flag to serialize <canvas> elements (ECharts, Chart.js, D3) as base64 PNG images, converting dynamic visualizations into static snapshots.