Electron Screenshot
Testing & Qualityelectron-screenshotElectron Screenshot is an Agent Skill for testing & quality published in the keybase/client repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
This skill should be used when the user asks to "take a desktop screenshot", "screenshot the electron app", "show me the desktop app", "what does the app look like", or mentions checking the Electron/desktop UI visually.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/keybase/client/blob/HEAD/skill/electron-screenshot/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/electron-screenshot, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Take a screenshot of the running Electron app via Playwright MCP and display it.
Prerequisites
The Electron app must be running with remote debugging enabled:
KB_ENABLE_REMOTE_DEBUG=1 yarn desktop:start:hot
This launches Electron with --remote-debugging-port=9222.
Steps
-
Close the DevTools tab first to avoid stale data. Use
browser_tabswith action=list, then action=close on the DevTools tab (usually index 0). -
Select the main app window tab (the one titled "Keybase: ..." — usually index 1 after DevTools is closed it becomes index 0). Use
browser_tabswith action=list then action=select. -
Take a screenshot with
browser_take_screenshot. -
The screenshot is saved to a temp file. Resize it for token efficiency:
sips -Z 800 <screenshot_path> --out /tmp/electron-screenshot.png -
Use the Read tool to display
/tmp/electron-screenshot.pngto the user.
Error Handling
- If Playwright MCP cannot connect, tell the user the Electron app may not be running with remote debugging. Suggest launching with
cd shared && KB_ENABLE_REMOTE_DEBUG=1 yarn desktop:start:hot. - If
sipsfails, fall back to displaying the original screenshot directly.
Notes
- Tab 0 is typically DevTools, Tab 1 is the main app, Tab 2 is the menubar. Always close DevTools first — when it's open,
browser_evaluateandbrowser_snapshotrun against DevTools instead of the app. - 800px max dimension gives good legibility with ~90% token savings.