ui-screenshots
Qué hace
Esta herramienta toma 'capturas de pantalla' de sitios web o aplicaciones mientras los desarrollas. Te ayuda a ver cómo cambian visualmente las cosas.
Cuándo usarla
- ✓Para registrar cómo se ve un sitio web antes de hacer cambios.
- ✓Para mostrar estados específicos, como un menú que aparece al pasar el ratón por encima.
- ✓Para capturar solo una parte de la pantalla sin tener que volver a capturarla toda.
Link de la skill
https://github.com/github/awesome-copilot/blob/main/skills/ui-screenshots/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
“Haz una captura de pantalla de mi sitio web en http://mysite.com”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La herramienta usa un programa llamado Playwright para 'ver' el sitio web y tomar una captura completa. Después, usa otra herramienta (PIL) para recortar la imagen y mostrar solo la parte que quieres.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
UI Screenshots
Capture screenshots of web apps and graphical UIs during development to document visual changes.
When to Use This Skill
Use this skill when you need to:
- Capture the current state of a running web app
- Document a UI before and after a code change
- Screenshot interactive states (tooltips, hovers, selected elements)
- Capture specific sections of a page without re-screenshotting
Prerequisites
pip install playwright Pillow -q
playwright install chromium
Core Workflow
1. Take a raw full-page screenshot
from playwright.async_api import async_playwright
async def capture(url="http://localhost:3000", out="screenshot-raw.png", width=1400, height=5000):
async with async_playwright() as p:
browser = await p.chromium.launch()
page = await browser.new_page(viewport={"width": width, "height": height})
await page.goto(url, wait_until="networkidle")
await page.wait_for_timeout(4000) # let charts/animations render
await page.screenshot(path=out, full_page=True)
await browser.close()
- Use a tall viewport (height=5000) so the page renders everything without scrolling
wait_until="networkidle"+wait_for_timeout(4000)ensures async charts loadfull_page=Truecaptures the entire scrollable content
2. View the raw image, then crop with PIL
Do NOT try to get perfect crops via Playwright's clip parameter. It's unreliable with full-page captures.
from PIL import Image
img = Image.open("screenshot-raw.png")
cropped = img.crop((left, top, right, bottom)) # adjust based on what you see
cropped.save("screenshot-final.png")
- Take the raw screenshot
- View it to see actual pixel positions
- Crop with PIL based on what you see
- View the result — if not right, re-crop (instant, no re-screenshot needed)
3. Iterate on crop, not on capture
- Re-screenshotting is slow (browser launch + page load + render wait)
- Re-cropping is instant (just PIL)
- Get one good raw capture, then slice it as many ways as needed
4. Interactive states
element = page.locator("selector").first
await element.hover()
await page.wait_for_timeout(1000) # let tooltip appear
await page.screenshot(path="screenshot-hover.png", full_page=True)
For "selected" state without hover effect, move the mouse away after clicking:
await element.click()
await page.mouse.move(300, 300) # move away so hover doesn't show
await page.wait_for_timeout(500)
await page.screenshot(path="screenshot-selected.png", full_page=True)
5. Section-specific captures
Crop different sections from a single full-page screenshot:
img.crop((0, 200, 920, 900)).save("screenshot-header.png")
img.crop((0, 900, 920, 1600)).save("screenshot-main.png")
Guidelines
- Always capture before state BEFORE making any changes — if you forget, you have to revert code to get a before shot
- Before/after pairs must use the same viewport width and crop — otherwise the comparison is useless
- To get a "before" after you already changed code: use
git checkout HEAD~1 -- <files>to revert, screenshot, thengit checkout HEAD -- <files>to restore - For interactive states: capture before AND after for each state — don't assume the "normal" before covers all cases
- Use
device_scale_factor=1in Playwright to force 1x pixels so screenshots match what users see at 100% zoom - Charts need extra wait time — Plotly, D3, etc. render asynchronously; 4s minimum after networkidle
- Narrow viewport reveals rendering bugs — some border/alignment issues only appear at specific widths
Non-Web App Screenshots
For desktop apps (VS, WPF, WinForms, console apps, terminals) where Playwright can't reach.
mss + ctypes (recommended for desktop windows)
Find a window by title via Win32 API, capture its region with mss. Tested at ~33ms per capture.
import ctypes
from ctypes import c_int, Structure, byref, windll
import mss
from PIL import Image
user32 = windll.user32
def find_window(title_contains):
"""Find visible windows matching a title substring."""
results = []
WNDENUMPROC = ctypes.WINFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.c_void_p)
def cb(hwnd, _):
if user32.IsWindowVisible(hwnd):
buf = ctypes.create_unicode_buffer(256)
user32.GetWindowTextW(hwnd, buf, 256)
…
Preguntas frecuentes
¿Necesito instalar algo?
Sí, tienes que instalar las herramientas 'playwright' y 'Pillow' y, después, descargar los componentes de Playwright para el navegador Chromium.
¿Por qué no puedo recortar la captura directamente en Playwright?
Recortar directamente en Playwright puede ser poco preciso, sobre todo en páginas completas. Es más fácil hacer una captura completa y luego recortarla con PIL de forma precisa.
¿Qué pasa si quiero capturar una aplicación que no es web, como VS Code?
Para aplicaciones de escritorio puedes usar otro enfoque con las bibliotecas 'mss' y 'ctypes' para encontrar la ventana y capturarla, siempre que esté visible en pantalla.
Detalles
Descripción original del autor
Capture screenshots of web apps during development using Playwright and PIL. Supports full-page captures, interactive states, and an iterate-on-crop workflow that avoids slow re-screenshots.
repo: github/awesome-copilot
Popularidad
- Estrellas en GitHub
- 40 mil
- Posición en el ranking
- #7460
- Licencia
- MIT
- Actualizada
- 15/10/2026
Comentarios
- …
Más skills de este repositorio
acquire-codebase-knowledge
40 milAyuda a tu agente a entender y documentar un proyecto de código existente. Es útil para incorporar a nuevas personas o tener una visión general de la arquitectura.
acreadiness-assess
40 milPermite a tu agente evaluar qué tan preparado está un proyecto para la IA y generar un informe. Es útil para saber qué tan bien está listo un proyecto para usar herramientas de IA.
acreadiness-generate-instructions
40 milAyuda a tu agente a crear instrucciones para herramientas de IA basadas en una evaluación. Es útil para mejorar cómo la IA interactúa con el código y cerrar las brechas detectadas.
acreadiness-policy
40 milPermite a tu agente ayudar a definir o aplicar políticas para la evaluación de proyectos de IA. Es útil para estandarizar cómo se evalúan los proyectos y garantizar el cumplimiento.
Skills parecidas
canvas
394 milPermite que tu agente muestre un widget visual alojado en un panel de Mac conectado y después ocultar el panel o moverlo a otra página.
control-ui
394 milAyuda a tu agente a organizar y resolver problemas de la interfaz de control de OpenClaw, incluidas las sesiones, los paneles y las Gateways conectadas.
diagram-maker
394 milAyuda a tu agente a crear diagramas claros en SVG, HTML o Excalidraw editable para procesos, arquitectura de sistemas y bocetos de pizarra.