stitch::extract-static-html
Qué hace
Esta skill captura una página web renderizada como un único archivo HTML que se abre por sí solo. Está pensada para diseñadores y desarrolladores que quieren una copia estática de una pantalla.
Cuándo usarla
- ✓Cuando quieres una copia HTML única de una página para compartirla o revisarla.
- ✓Cuando necesitas guardar un estado concreto de una pantalla antes de subirla a Stitch.
- ✓Cuando quieres una maqueta estática de una vista sin tener la app en marcha.
Link de la skill
https://github.com/google-labs-code/stitch-skills/blob/main/plugins/stitch-design/skills/extract-static-html/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Guarda la página de pago actual de mi app local como un único archivo HTML independiente que pueda compartir.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Carga la página en un navegador sin interfaz, incorpora los estilos y las imágenes en el archivo y lo guarda, después de preguntarte qué método usar.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Extract Static HTML
Extract a self-contained static HTML file from any web application.
Which Strategy to Use
You MUST ask the user to choose which strategy to use before proceeding. Present the options clearly, recommend Strategy A as the preferred default, and provide a brief pros/cons summary for each option to help them make an informed decision.
| Strategy A (Puppeteer) | Strategy B (Browser Subagent) | |
|---|---|---|
| When | App runs locally, no auth wall | Need to interact with page first (click, fill forms) |
| Fidelity | Highest — computed styles resolved | High — rendered DOM |
| Setup | Zero — no mock needed | Zero — no mock needed |
| Framework | Any | Any |
| Output | Writes to file — no size limit | May truncate in agent context |
[!WARNING] Checkpoint — User Confirmation Required. You MUST ask the user which strategy they prefer before proceeding. Present the comparison table above, recommend Strategy A as the default, and wait for explicit approval. Do NOT make the decision yourself or proceed until the user confirms.
Strategy A: Puppeteer Snapshot (Recommended)
Launches headless Chrome, captures the fully rendered DOM, and produces a self-contained HTML file with all CSS inlined and images as base64. Works with any framework — no MockPage.jsx needed.
Prerequisites
- App running locally (e.g.,
npm run dev) - Node.js with
puppeteeravailable (check:node -e "require('puppeteer')")
Workflow
Start the App and note the port.
[!WARNING] Checkpoint — User Confirmation Required. After starting the local server, you MUST pause and ask the user for confirmation before running the snapshot script or launching a browser subagent. Report the URL and port to the user so they can verify the app is running and rendering correctly. Do NOT proceed to the snapshot step until the user confirms.
Run the Snapshot Script:
npx tsx <SKILL_DIR>/scripts/snapshot.ts \ --url http://localhost:5173 \ --output .stitch/home.html \ --wait 2000Multiple pages — run once per route:
npx tsx <SKILL_DIR>/scripts/snapshot.ts \ --url http://localhost:5173 --output .stitch/home.html --wait 2000 npx tsx <SKILL_DIR>/scripts/snapshot.ts \ --url http://localhost:5173/pricing --output .stitch/pricing.html --wait 2000 npx tsx <SKILL_DIR>/scripts/snapshot.ts \ --url http://localhost:5173/dashboard --output .stitch/dashboard.html --wait 2000 --html-class darkClean Up Dev Server: If a local dev server was started specifically for snapshot extraction, make sure to stop the server process or terminate the background task once extraction is completed.
Script Flags
| Flag | Default | Description |
|---|---|---|
--url |
(required) | URL to capture |
--output |
(required) | Output file path |
--wait |
1000 |
Extra wait (ms) after network idle. Increase for lazy-loading apps. |
--viewport |
1280x800 |
Viewport size as WIDTHxHEIGHT |
--html-class |
— | Class(es) for <html> element (e.g., dark) |
--remove-fixed |
false |
Remove fixed/sticky elements (cookie banners, chat widgets) |
--full-height |
false |
Resize viewport to full scroll height |
--title |
— | Override page title (set to the route path, e.g. /dashboard or /settings/profile) |
--auth-script |
— | Path to a JS/TS module that exports a default async (page) => void function for authentication |
--inline-canvas |
false |
Convert <canvas> elements (ECharts, Chart.js, D3) to base64 <img> tags |
What It Does Automatically
- Captures all CSSOM rules from
document.styleSheets(preserves dynamic Vite/Tailwind dev styles and CSS-in-JS) - Inlines all
<link rel="stylesheet">→<style>blocks - Converts
<img>srcandsrcset→ base64 data URIs (skips external fonts) - Inlines same-origin and relative icon font files (
@font-face) as base64 data URIs so ligatures never render as ASCII text - Inlines
<source srcset>URLs as base64 - Removes failed/dead
srcsetentries so the browser falls back to the inlinedsrc - Removes
<script>tags, Vite HMR dev style blocks (createHotContext,import.meta.hot), and dev overlays - Resolves relative CSS
url()paths before inlining
Framework Notes
|
Preguntas frecuentes
¿Qué método recomienda?
La skill recomienda el método de instantánea con Puppeteer y te pide que elijas antes de empezar.
¿Puede hacer clic en una página antes?
Sí, un segundo método puede interactuar con la página, por ejemplo haciendo clic o rellenando formularios.
¿Funciona con páginas de inicio de sesión?
El método de instantánea funciona mejor con apps locales sin muro de inicio de sesión.
Detalles
Descripción original del autor
Extract self-contained static HTML from a built web application or React components by inlining CSS and images. Use this skill whenever you need to capture a specific UI state, share a static version of a page, or prepare assets for Stitch upload, even if the user just asks to 'save the HTML' or 'mock the view'.
Popularidad
- Estrellas en GitHub
- 8,7 mil
- Posición en el ranking
- #12343
- Licencia
- Apache-2.0
- Actualizada
- 17/8/2026
Comentarios
- …
Más skills de este repositorio
stitch::react-components
8,7 milAyuda a tu agente a convertir diseños de Stitch en componentes de React y Vite, o a actualizar componentes existentes para que coincidan con el diseño más reciente, con comprobaciones.
stitch::react-native
8,7 milAyuda a tu agente a convertir diseños web de Stitch en componentes de React Native para apps de teléfono, o a actualizar pantallas móviles existentes para que coincidan con un diseño más nuevo.
react-vite-dashboard
8,7 milAyuda a tu agente a crear paneles de React y Vite con muchos datos a partir de diseños de Stitch, con TanStack Query y tokens de diseño de un archivo DESIGN.md.
shadcn-ui
8,7 milAyuda a tu agente a encontrar, instalar y personalizar componentes de shadcn/ui, piezas de interfaz para copiar construidas con Radix o Base UI y Tailwind CSS.
Skills parecidas
angular-developer
280 milAyuda a tu agente con código de Angular y la estructura del proyecto. Útil para empezar proyectos, crear partes de código o mejorar el rendimiento y la accesibilidad.
frontend-a11y
280 milAyuda a tu agente a hacer que las interfaces web sean accesibles para todos. Asegura que sitios y apps funcionen bien con lectores de pantalla y navegación por teclado.
frontend-patterns
280 milHace que tu agente aplique patrones modernos en desarrollo frontend. Optimiza el rendimiento, gestiona el estado y sigue buenas prácticas en React y Next.js.