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★ 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.jsonhas no effect on VS Code Web. Write them throughPreferences: 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.
Установить vscode-playwright в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic