Guide · Agent skill
How to use the Terminal Capture agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
Terminal Capture is an agent skill that lets an AI agent run the qwen-code command-line tool through a scripted scenario, type into it, wait for output, and save screenshots of the terminal. It is aimed at maintainers reviewing pull requests that change CLI output, and at developers who need screenshots of terminal interfaces for documentation. After this guide you will know what the skill needs, how to install it, how to ask for it in plain language, and what to check before running it.
Quick start
- 1Download the ZIP. Download the terminal-capture skill ZIP from this directory page.
- 2Unzip it into a skills folder. Unzip into ~/.claude/skills/ for personal use, or into .claude/skills/ in a project. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills instead.
- 3Check out qwen-code. Make sure the qwen-code repository is checked out, since the scripts and paths the skill uses live there.
- 4Install dependencies and the browser. Run npm install, then npx playwright install chromium for local use. Skip the browser install in CI verify contexts where it is pre-installed.
- 5Ask for a capture in plain language. Request a terminal screenshot or CLI visual test of a specific command, such as /about or /export.
- 6Review the output. Open the screenshots folder under integration-tests/terminal-capture/scenarios/screenshots/ and check each step's images before sharing them.
What does the Terminal Capture skill make the agent do?
An agent skill is a folder of instructions and files that an agent such as Claude can load when a task matches it. This one covers visual checks of command-line interfaces. The source describes a pipeline where node-pty runs a pseudo-terminal, its ANSI output is rendered by xterm.js inside a Playwright headless browser, and the result is saved as a screenshot.
The skill is written for the qwen-code repository and relies on its TypeScript test scripts. Its documented examples cover slash commands such as /about, /context, /auth and /export.
- Types text and key presses into the running CLI
- Waits for output to settle before capturing
- Saves screenshots per step, plus a full-length final screenshot
- Can capture frames during long output and build an animated GIF (needs ffmpeg)
Install the Terminal Capture skill
Download the skill ZIP from this directory page. Then choose one of the following locations, depending on whether you want it for yourself or for one project. For personal use, unzip the file into ~/.claude/skills/. For a single project, unzip it into the project's .claude/skills/ folder.
If you use the Claude apps instead, open Settings, go to Capabilities, then Skills, and upload the ZIP there.
- Personal: unzip into ~/.claude/skills/
- Project only: unzip into .claude/skills/ inside the project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Set up the qwen-code project
The skill does not work on its own. It expects the qwen-code repository to be checked out, because its scenario scripts and paths live there. The source lists these prerequisites: Node.js and npm, Playwright with the Chromium browser, the node-pty native module, a built qwen-code project that provides dist/cli.js, and ffmpeg if you want animated GIF output.
From the repository root, install dependencies and then the browser. The source notes that when QWEN_VERIFY_CHROMIUM=1 is set in CI, the browser is already installed and playwright install must not be run there.
- Node.js and npm, with dependencies installed by npm install
- Playwright browser: npx playwright install chromium (local use)
- node-pty native module; if it fails, run npm rebuild node-pty
- A built project that provides dist/cli.js
- ffmpeg, optional, only for animated GIFs
npm install && npx playwright install chromiumWrite a scenario and run it
A scenario is a TypeScript file in integration-tests/terminal-capture/scenarios/. It sets a name, the command to launch, the working directory, and a flow of steps. A type step sends text and, unless the next step is a key step, presses Enter and takes screenshots. A key step sends keys such as ArrowDown or Enter without auto-screenshots.
You can run one scenario file or a whole directory. Screenshots are written to integration-tests/terminal-capture/scenarios/screenshots/ in a folder named after the scenario.
- Single scenario: pass the path to one file in scenarios/
- Batch: pass the scenarios/ directory to run all of them
- Output files include 01-01.png (step 1 input), 01-02.png (step 1 result) and full-flow.png
npx tsx integration-tests/terminal-capture/run.ts integration-tests/terminal-capture/scenarios/about.tsHow to trigger the skill with natural requests
You do not need special syntax. The skill's description says it applies when reviewing PRs that affect CLI output, testing slash commands, generating visual documentation, or when the phrases 'terminal screenshot', 'CLI test', 'visual test' or 'terminal-capture' come up. Plain requests that include one of these ideas are the most reliable way to start it.
Because the skill runs real commands and a browser, be specific about which command or flow you want covered.
- 'Take a terminal screenshot of /about and show me the result'
- 'Run a CLI test on the /export flow and check the format menu'
- 'Review this PR and visually verify the output of /context'
- 'Make a visual test of the /auth menu, stopping before any API key is entered'
Safety notes before you run it
The skill runs scripts and uses the network. Scenarios can type credentials such as sk-xxx into the terminal, and those credentials can end up in saved screenshots. Do not run it with real API keys in shared or CI environments.
The skill also tells the agent to ask you before installing ffmpeg. If you decline, the scenario still runs, but GIF generation is skipped with a warning. Read each scenario's flow before running it, especially any step that types into an authentication prompt.
- Do not use real API keys in shared or CI setups
- Review screenshots before sharing them, since they may show typed text
- Check ffmpeg with which ffmpeg; the source shows brew install ffmpeg on macOS
Tips for reliable screenshots
Most blank or unstable captures come from timing or build problems. The source's troubleshooting guidance is to confirm the build succeeded and the spawn command is correct, and to add wait time to the scenario when output has not fully rendered. For streaming captures, delayMs lets you skip model thinking or approval time before the first frame.
Terminal size and appearance are set in the terminal options. The defaults in the source are 100 columns, 28 rows and a window title of Terminal.
- Blank screenshot: check the build and the spawn command
- Unstable output: add wait time to the scenario
- Browser not found: run npx playwright install chromium locally
- Streaming: set delayMs to skip waiting, and count to cap captures
What people use it for
- Reviewing a qwen-code pull request that changes the output of /about or /context
- Checking that the /export format menu opens and selects the right option
- Producing screenshots of interactive terminal flows for project documentation
- Running repeatable visual checks of a multi-step CLI flow across code changes
Frequently asked questions
Is the Terminal Capture skill free to use?
The listing states the licence is Apache-2.0. The skill itself is free under that licence, but you still need Node.js, Playwright and a built qwen-code checkout, and the browser download is about 170 MB according to the source.
What do I need to run the terminal-capture skill?
You need Node.js and npm, Playwright with the Chromium browser, the node-pty native module, and a built qwen-code project that provides dist/cli.js. ffmpeg is optional and only needed for animated GIF output.
Can I use the skill without the qwen-code repository?
The source says the skill is set up for the qwen-code repository and relies on its scripts and paths, so it is not meant to run without that repository checked out.
Where do I install the terminal-capture skill?
Unzip the downloaded ZIP into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, you can upload it under Settings → Capabilities → Skills.
Why does Playwright say the browser is not found?
The source gives this cause as the browser not being installed. For local development, run npx playwright install chromium. In CI verify runs, the browser should already be pre-installed, so report the failed pre-install step rather than installing it.
Are there alternatives to Terminal Capture?
The source does not compare this skill with other tools, so it does not say how it differs from other terminal screenshot options. It is best suited to visually checking qwen-code's interactive commands in a repository set up for it.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Terminal Capture suits qwen-code maintainers and developers who need repeatable screenshots of interactive CLI flows, particularly during PR review. Skip it if you do not have the qwen-code repository, if you would need to use real API keys in a shared or CI environment, or if reading plain command output is enough.
Download the skill