convez.ai
SkillDesenvolvimento WebIntermediário
bluei98

HTML Screenshot Composer

bluei98/claudecode-skill-html-screenshot

Renderiza HTML em PC + Mobile como screenshot composto side-by-side

Ver no GitHub
InicialPluginScore · de 0 a 100

Skill para Claude Code que renderiza HTML local em viewports desktop e mobile, compondo-os lado a lado em uma única imagem PNG/JPEG. Utiliza Playwright com servidor HTTP local automático, normalizando alturas dos painéis e oferecendo 14 presets de fundo, gradientes customizáveis e modo página completa.

Instalação

$npx convez-ai bluei98/claudecode-skill-html-screenshot

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 7 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Gerar screenshots responsivos para documentação e PRs
  • Validar layouts em múltiplos dispositivos antes de deploy
  • Criar composições visuais para blog posts e apresentações
  • Batch processing de pastas HTML com saída estruturada

Veredito

Ferramenta prática e bem-executada que resolve um problema real de screenshot responsivo. Integração nativa com Claude Code e automação por pasta a torna especialmente útil para fluxos de desenvolvimento modernos.

README

A tradução para o português deste README ainda está na fila.

🖼️ html-screenshot

Render local HTML at PC + Mobile viewports and export them side-by-side as a single image. A Claude Code skill.


Why

Mobile responsive screenshots usually live in two places — DevTools, then external image tools — or get exported as separate per-device files that don't read well in PRs, blog posts, or chat. One composite image with consistent height and a contrasting canvas reads at a glance and embeds cleanly anywhere.

 ┌──────────────────────────┐ ┌──────┐
 │                          │ │      │
 │           PC             │ │ Mob  │   ← single PNG/JPEG
 │       (1920×1080)        │ │ ile  │     padded canvas, gradient bg
 │                          │ │      │     height-normalized panels
 └──────────────────────────┘ └──────┘

Features

  • ⚡ One command, one image — PC + Mobile composited side-by-side
  • 🎨 14 background presets + custom solid color or gradient (vertical / horizontal / diagonal)
  • 📐 Height-normalized panels so PC and Mobile align cleanly (no upscaling)
  • 📱 Optional tablet panel between PC and Mobile (--tablet)
  • 🌐 Local HTTP server auto-spawned per run — relative CSS / JS / img / fetch work without file:// quirks
  • 📂 File or folder input — recursive .html discovery, output mirrors source tree
  • 🔄 Full-page or viewport capture (--full-page)
  • 🧩 Per-device fallback with --separate (keeps original native pixel resolution)
  • 🤖 Built for Claude Code — invoke via /html-screenshot <path>

Quick start

# Single file → ./index.png next to source
/html-screenshot ./index.html

# Folder → ./site/screenshots/{tree}/{stem}.png
/html-screenshot ./site/ --full-page --tablet

# Fancy preset background, custom PC size
/html-screenshot ./page.html --bg sunset --pc-size 1440x900

Install

pip install playwright pillow
python -m playwright install chromium

Place the folder at ~/.claude/skills/html-screenshot/, or wire it as a git submodule.

Triggers

/html-screenshot · html screenshot · render HTML · webpage capture · PC mobile capture

Flags

FlagDefaultDescription
<path>—(required) HTML file or directory
--separateoffSave per-device files instead of compositing
--full-pageoffCapture full scrollable page instead of viewport
--pc-size <WxH>1920x1080PC viewport
--mobile-size <WxH>375x812Mobile viewport (iPhone X class)
--tabletoffAdd a tablet panel between PC and Mobile
--tablet-size <WxH>768x1024Tablet viewport
--only <pc|mobile|tablet>—Capture only the listed device(s) — repeatable
--gap <px>60Spacing between panels in composite
--padding <px>80Outer padding of the composite canvas
--canvas-size <WxH>—Fixed final image size (e.g. 854x533). Composite is scaled (contain) and letterboxed with the bg to fill this size exactly. Great for blog thumbnails / OG images.
--bg <value>slateBackground — preset name, solid color, or gradient
--out <dir>—Override output directory
--format <png|jpeg>pngOutput format
--quality <1-100>90JPEG quality
--wait <ms>300Extra delay after page load (animations)
--device-scale <n>autoDPR override (default: PC=1, Mobile/Tablet=2)
--port <n>randomLocal HTTP server port
--jsonoffPrint machine-readable summary

Backgrounds

--bg accepts three forms:

1. Preset names

PresetTypeColors
slate (default)solid#e2e8f0
white / black / darksolidwhite / black / #0f172a
purplegradient#667eea → #764ba2
sunsetgradient#ff7e5f → #feb47b
oceangradient#2193b0 → #6dd5ed
midnightgradient#0f2027 → #2c5364
mintgradient#a8e6cf → #3ec6e0
auroragradient#a18cd1 → #fbc2eb
forestgradient#134e5e → #71b280
firegradient#f12711 → #f5af19
candygradient#ee9ca7 → #ffdde1
skygradient#74b9ff → #a29bfe

2. Custom solid

Any CSS color name or #hex:

--bg "#1e293b"
--bg "lavender"

3. Custom gradient

color1,color2[,direction] where direction is diagonal (default), vertical, or horizontal:

--bg "#0f172a,#1e293b,vertical"
--bg "#667eea,#764ba2"          # diagonal

Output rules

InputDefault (composite)With --separate
./foo.html./foo.png./foo-pc.png, ./foo-mobile.png
./site/./site/screenshots/{tree}/{stem}.png./site/screenshots/{tree}/{stem}-{device}.png

In composite mode, panels are normalized to the smallest panel height (no upscaling), then placed left → right: PC → Tablet → Mobile.

Tips

💡 For long pages, prefer --full-page and consider --bg dark --padding 40 for a denser presentation image.

💡 --separate retains original per-device pixel resolution — useful when you need the raw frames for further compositing.

💡 The local HTTP server starts on a random free port and shuts down after capture — no leaked processes.

Roadmap

  • Optional device chrome (browser frame around PC, phone bezel around Mobile)
  • Drop shadow on panels
  • WebP output
  • Animated GIF / MP4 from scroll-through

PRs welcome.

License

MIT © Haru

Author

Built by Haru — building tools for makers and writers.

If this skill saved you time, a ⭐ on the repo means a lot.

Ver o original no GitHub

Bom para

Relacionados