capture-screen
Capture Screen
Create clear, captioned screenshot files for a Jira story's acceptance criteria (AC). Use agent-browser to control the page and capture every raw image. Use shoot.mjs --caption-only to add captions.
Requirements
- Node 22+,
agent-browser, and Chrome, Chromium, or Edge for captioning. SetCHROME=<path>if the caption script cannot find the browser. - If the CLI is missing, install it with
npm install -g agent-browser, or substitutenpx --yes agent-browserforagent-browserbelow. If its browser is missing, runagent-browser install(ornpx --yes agent-browser install). - Run
agent-browser skills get corefor the installed version's instructions. See the quick start. - Python 3 is needed only for the optional login redirect. On Windows, use
py -3 -Iorpython -Iifpython3is unavailable.
Report installation or browser access failures. Do not claim the page was verified if it could not be opened.
1. Plan the screenshots
Read the Jira story's AC and the screenshot list in the latest CR comment. For a subtask, read the parent story's AC. Plan enough images to show each requested state, such as before and after, open and closed, or an empty state.
Run node scripts/screen-dir.mjs <ISSUE-KEY>. It creates an owner-only directory and prints its absolute path. Call that path <dir> below and quote it in shell commands. Create <dir>/raw and write <dir>/shots.json. The directory is: