Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

vscode-playwright

БесплатноЗапускает вложенные скриптыНе проверен

Capture VS Code screenshots and self-contained browser animation scenes through Playwright. Use for editor evidence, slide imagery, or silent WebM scene clips.

microsoftот microsoft★ 1 654 звезды на GitHub

Об этом скилле

VS Code and Browser Capture Skill

Captures VS Code editor views, code walkthroughs, and Copilot Chat examples, and records self-contained browser animation scenes as silent WebM clips.

Overview

This skill provides a complete workflow for capturing high-quality VS Code screenshots suitable for embedding in slide decks, documentation, and other visual media. It handles server lifecycle management, viewport configuration, UI cleanup, and screenshot validation.

Two paths share the same constraints. Prefer the scripted path for any repeatable or unattended capture, including CI. Use the interactive Playwright MCP path for exploratory or one-off captures.

Scripted Capture

scripts/capture_vscode.py runs a YAML capture plan headless: it starts serve-web, applies capture settings, opens each file in Monaco, measures the rendered font, and writes one screenshot per capture. It drives Playwright directly, so it needs no MCP server and runs on a CI runner.

uv sync
uv run playwright install --with-deps chromium
uv run python scripts/capture_vscode.py --plan capture-plan.yml --workspace /path/to/repo

A plan names each capture's id, a workspace-relative file, and an output path relative to the plan directory, or to --output-root when given. An id is one filename-safe token of letters, digits, ., _, or -. An output is a relative .png path with / separators and no .., and the script refuses to write outside the output root or through a symlink:

resolution: 1920x1080
min_font_pt: 18
font_size: 26
theme: Default Dark Modern
captures:
  - id: marketplace-catalog
    file: .github/plugin/marketplace.json
    output: frames/marketplace-catalog.png

The script exits 0 only when every capture was written and met min_font_pt, and prints one JSON result on its last stdout line with each capture's measured rendered_font_size_pt, zoom, and source_resolution. A failed capture also writes debug-<id>.png. It rejects markdown targets at plan validation and fails when the dark theme does not apply, so a clashing light capture cannot pass. When piping its output in CI, run the step under shell: bash so pipefail preserves the exit code.

Browser Animation Recording

scripts/record_browser_video.py records one self-contained HTML animation to a silent WebM clip from ready-scene frames. The scene must set data-animation-ready="true" on its body after local assets and animation state are ready and define window.startAnimation() to reset narrative motion and timers. Recording starts at that handshake, not at page navigation. The browser context is offline, service workers are blocked, WebSocket traffic is intercepted without forwarding, and popups are closed. A synthetic origin serves only files below the approved asset root; traversal and escaping symlinks are rejected. The default root is the scene directory; use --asset-root for a caller-approved shared asset directory containing the scene. Do not grant the workspace or home directory as an asset root.

uv run python scripts/record_browser_video.py \
  --scene animation/scene-001/index.html \
  --output clips/scene-001.webm \
  --duration 8 \
  --resolution 1920x1080

The recorder writes a silent clip. Pair it with the matching narration WAV in a demo-video segment; that assembler trims or loops the browser clip to the declared narration duration and supplies the final audio. Frames are sampled at 24 fps using virtual scene time, then encoded with FFmpeg. Startup and closing browser frames are excluded; duration is accurate to a video-frame boundary.

Prerequisites

Scripted screenshots require the VS Code or VS Code Insiders CLI (code or code-insiders). Interactive VS Code capture also requires genuine Playwright MCP browser tools and curl. Browser animation recording requires uv, the skill environment with Playwright 1.48 or newer, Chromium, and FFmpeg with libvpx-vp9; it does not require VS Code or MCP.

Tool names in this skill use an mcp_microsoft_pla_browser_* prefix. The actual prefix is derived from the MCP server's registration name in your host, so it may differ, for example mcp_playwright_browser_*. Match the prefix your host exposes.

Verified Constraints

These three constraints were confirmed against a running serve-web instance. Each one invalidates an approach that looks reasonable but does not work.

  • User settings live in the browser's IndexedDB, not on disk. Seeding --server-data-dir/data/User/settings.json has no effect on VS Code Web. Write them through Preferences: Open User Settings (JSON) by dispatching a paste event, because paste avoids both EditContext key handling and bracket auto-closing, then save and reload the page. The reload closes the settings editor, which Insiders opens as a modal that holds focus, and applies window-level settings such as workspace trust. A persistent browser context keeps the settings across the reload.
Полный SKILL.md на GitHub

Установить vscode-playwright в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

pyproject.tomlscripts/capture_vscode.pyscripts/record_browser_video.pyuv.lock

FAQ

Что делает скилл vscode-playwright?

Capture VS Code screenshots and self-contained browser animation scenes through Playwright. Use for editor evidence, slide imagery, or silent WebM scene clips.

Как установить скилл vscode-playwright?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл vscode-playwright запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить vscode-playwright с