desktop-screenshots
БесплатноЗапускает вложенные скриптыНе проверенCapture screenshots and video of Robin's real desktop shell (Electron) in the sandbox, against the local mock backend, for PR evidence. Use for any UI change…
от langchain-ai★ 11 279 звёзд на GitHubОб этом скилле
Desktop screenshots
A browser page with window.openSweDesktop stubbed is a mock: it has no native tab strip, title bar, window size or pointer.
Capture desktop-facing changes in the real shell (desktop/) under Xvfb, signed in to the mock backend, with scripts/desktop.cjs.
Paths below are relative to open-swe/.
Set up once per sandbox
The global image preinstalls the desktop's dependencies, its Electron binary, xdotool and Inter; on an older image, install what is missing:
pnpm install --frozen-lockfile --filter 'open-swe-desktop...'
(cd desktop/node_modules/electron && node install.js)
apt-get install -y --no-install-recommends xdotool fonts-inter
Build the shell: pnpm --dir desktop run build.
Start the backend with background_execute, never in the foreground:
docker run -d -p 55432:5432 -e POSTGRES_PASSWORD=pw postgres:16
POSTGRES_URI=postgresql://postgres:pw@localhost:55432/postgres bash tests/e2e/dev-mock.sh
The UI comes up on http://127.0.0.1:3000; the first page load compiles slowly.
Restarting dev-mock.sh loses the mock threads' message content, so seed again after a restart.
Build the base and PR archives
The shell loads the dashboard from a ui.json.gz archive, so build one per side and copy each out before the next build overwrites it:
pnpm --filter open-swe-dashboard run build && cp ui/.output/desktop/ui.json.gz /tmp/cap/base.ui.json.gz
git apply /tmp/pr.diff # only the PR's diff, onto current main
pnpm --filter open-swe-dashboard run build && cp ui/.output/desktop/ui.json.gz /tmp/cap/pr.ui.json.gz
Capture
node .agents/skills/desktop-screenshots/scripts/desktop.cjs seed "Write a haiku about sidebars"
node .agents/skills/desktop-screenshots/scripts/desktop.cjs still /tmp/cap/pr.ui.json.gz /tmp/cap/pr.png /agents 1280x800
seed types a prompt into the composer once it is a live editor ([data-testid=composer-editor][data-lexical-editor="true"]) and prints the new thread's id; getByPlaceholder().fill() does not reach the Lexical editor.
still takes an optional fifth argument, a selector to wait for before the shot, such as '[data-testid="user-message"]' on a thread.
still prints the platform fonts of the first text on the page; expect Inter, not Liberation Sans.
For hover states and video, require the module from a script:
const { Desktop } = require("/workspace/langchainplus/open-swe/.agents/skills/desktop-screenshots/scripts/desktop.cjs");
const desktop = await Desktop.launch("/tmp/cap/pr.ui.json.gz", { width: 720, height: 820 });
await desktop.goto(`/agents/${threadId}`, '[data-testid="user-message"]'); // wait for an element the shot needs
await desktop.newTab(); // the tab strip shows only with more than one tab
const clip = await desktop.record("/tmp/cap/pr.mp4");
await desktop.move(2, 300); // the real X pointer, in content coordinates
await desktop.page.waitForTimeout(800);
await clip.stop();
await desktop.grab("/tmp/cap/pr.png");
await desktop.close();
Desktop.launch starts Xvfb on :99 if needed, sets the osw_session cookie from /control/login?login=alice in session.defaultSession, and sets dark theme through localStorage['open-swe-theme'].
goto waits for a selector (by default a main that is not the loading skeleton), because the dashboard keeps an invalidation stream open and networkidle may never arrive.
The window is a BaseWindow, so size it with setSize (setContentSize), not BrowserWindow APIs.
desktop.page stays the first app tab after newTab; Playwright locators on it still work for clicks, but use move for anything that depends on the pointer, such as hover and edge peeks.
Use the same size, route, data and pointer path for base and PR, and convert each clip to a GIF for the PR description as the screenshot guidance describes.
What the captures show
They render on Linux: Inter stands in for the macOS system font (SF Pro cannot be redistributed), and there are no traffic lights, only the 90px gap left for them at the top left. Say so in the caption.
Gotchas
- Do not
pkill -f <pattern>inside abackground_executecommand whose own command line contains that pattern: it kills itself. Stop the earlier task withbackground_taskinstead. - One capture launches one shell; close it before the next launch, since each launch gets fresh state.
Установить desktop-screenshots в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл desktop-screenshots?
Capture screenshots and video of Robin's real desktop shell (Electron) in the sandbox, against the local mock backend, for PR evidence. Use for any UI change that shows in the desktop app, instead of a browser with a stubbed `window.openSweDesktop`.
Как установить скилл desktop-screenshots?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл desktop-screenshots запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic