stitch::extract-static-html
O que ela faz
Esta skill captura uma página web renderizada como um único arquivo HTML que abre sozinho. É para designers e desenvolvedores que querem uma cópia estática de uma tela.
Quando usar
- ✓Quando você quer uma cópia HTML única de uma página para compartilhar ou revisar.
- ✓Quando precisa salvar um estado específico de tela antes de enviá-lo ao Stitch.
- ✓Quando quer um mockup estático de uma visualização sem o app ativo.
Link da skill
https://github.com/google-labs-code/stitch-skills/blob/main/plugins/stitch-design/skills/extract-static-html/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Salve a página atual de checkout do meu app local como um único arquivo HTML que eu possa compartilhar.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill carrega a página em um navegador sem interface, coloca os estilos e imagens dentro do arquivo e o grava, depois de perguntar qual método usar.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
|
Perguntas frequentes
Qual método ela recomenda?
A skill recomenda o método de captura com Puppeteer e pede que você escolha antes de começar.
Ela consegue clicar pela página antes?
Sim. Um segundo método pode interagir com a página, como clicar ou preencher formulários.
Funciona com páginas de login?
O método de captura funciona melhor com apps locais sem uma barreira de login.
Detalhes
Descrição original do 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'.
Popularidade
- Estrelas no GitHub
- 8,7 mil
- Posição no ranking
- #12343
- Licença
- Apache-2.0
- Atualizada em
- 17/08/2026
Comentários
- …
Mais skills deste repositório
stitch::react-components
8,7 milAjuda seu agente a transformar designs do Stitch em componentes React e Vite, ou atualizar componentes existentes para o design mais recente, com checagens.
stitch::react-native
8,7 milAjuda seu agente a converter designs web do Stitch em componentes React Native para apps de celular, ou atualizar telas móveis existentes para um design mais recente.
react-vite-dashboard
8,7 milAjuda seu agente a criar painéis React e Vite com muitos dados a partir de designs do Stitch, com TanStack Query e tokens de um arquivo DESIGN.md.
shadcn-ui
8,7 milAjuda seu agente a encontrar, instalar e personalizar componentes do shadcn/ui, peças de interface copiadas para o projeto, com Radix ou Base UI e Tailwind.
Skills parecidas
angular-developer
280 milAjuda seu agente a criar código Angular e a dar conselhos sobre a estrutura do projeto. É útil para iniciar novos projetos, criar partes do código ou melhorar a performance e acessibilidade.
frontend-a11y
280 milAjuda seu agente a tornar interfaces web acessíveis para todos. Ele garante que sites e apps funcionem bem com leitores de tela e navegação por teclado.
frontend-patterns
280 milFaz seu agente aplicar padrões modernos no desenvolvimento frontend. Ele otimiza performance, gerencia estado e segue boas práticas em React e Next.js.