Skip to content
SkillScript-led2,674 tokens in use

stitch::extract-static-html

Captures a running web app as one self-contained static HTML file with CSS, fonts and images inlined, using Puppeteer or a browser subagent.

10,975 stars on the repository Apache License 2.0google-labs-code/stitch-skills · plugins/stitch-design/skills/extract-static-html
npx skills add google-labs-code/stitch-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing stitch::extract-static-html costs

73tokens idle
2,674tokens in use

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Counts are approximate, made offline with cl100k_base.

Model dependence Script-led

Script-ledMixedModel-led

Most of this skill is scripts, so it behaves much the same whichever model runs it.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: scripts/extract_inline_html.ts, scripts/post_process.ts, scripts/snapshot.ts.

Touches

shelldeclared and detectednetworkdetectedwrites filesdeclared and detected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter8/15
  • Structure25/25
  • Examples15/15
  • Output15/15
  • Size15/15
  • Resources5/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Runs shell commands−2

    does this on the machine, as the frontmatter declares

    SKILL.md, line 61
  • Writes files−4

    does this on the machine, as the frontmatter declares

    SKILL.md, line 61
  • Reaches the network−10

    does this on the machine, and the frontmatter does not say so

    scripts/snapshot.ts, line 466

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity80
  • Maintenance52
  • Community68
  • Maturity32
  • Momentum40

This skill extracts a self-contained HTML file from a web application. Its default strategy launches headless Chrome through a snapshot script, captures the rendered DOM and computed CSS rules, and inlines images and icon fonts as base64.

A second strategy uses a browser subagent for pages that need clicks or form input first. A last-resort fallback flattens React components into a mock page.

What You Get

  • A single HTML file per route with styles and images inlined
  • Snapshot script flags for wait time, viewport, html class and title
  • Authentication script support for login-gated pages
  • Framework notes with recommended wait times

Common Use Cases

  • Capturing pages of a local app to upload to Stitch
  • Sharing a static version of a page without running the app
  • Saving a specific UI state such as dark mode or a chart view

What Makes It Unique

It resolves styles from the live stylesheet rules, so dynamic Tailwind and CSS-in-JS output survives, and it handles srcset images, icon fonts and canvas charts. Two checkpoints make the agent confirm the strategy and the running app before it launches a browser.

Under The Hood

The agent runs a bundled TypeScript snapshot script through npx tsx. It launches headless Chrome with Puppeteer, loads the local URL, optionally runs an auth script, and writes the HTML file to disk. A second script converts a flattened mock page, and a post-process script inlines local images. The agent starts and stops the local dev server.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers