qwenlm/qwen-code/terminal-capture
- community
Checking that the SKILL.md file is still in the repository.
Automates terminal UI screenshot testing for CLI commands. Applies
Install
npx vskill@latest install qwenlm/qwen-code/terminal-captureSKILL.md
Terminal Capture — CLI Terminal Screenshot Automation
Drive terminal interactions and screenshots via TypeScript configuration, used for visual verification during PR reviews.
Prerequisites
Ensure the following dependencies are installed before running:
CI / verify context: whenQWEN_VERIFY_CHROMIUM=1is set, the browseris already installed andPLAYWRIGHT_BROWSERS_PATHpoints at it. Do notrunplaywright install— it downloads ~170 MB and fails on system depsthe agent user cannot install.
Architecture
Core files:
integration-tests/terminal-capture/terminal-capture.ts
Low-level PTY, xterm.js, and Playwright engine.
integration-tests/terminal-capture/scenario-runner.ts
Scenario executor for config, interactions, and screenshots.
integration-tests/terminal-capture/run.ts
CLI entry point for batch scenario runs.
integration-tests/terminal-capture/scenarios/*.ts
Scenario configuration files.
Quick Start
1. Write Scenario Configuration
Create a .ts file under integration-tests/terminal-capture/scenarios/:
2. Run
3. Output
Screenshots are saved to integration-tests/terminal-capture/scenarios/screenshots/{name}/:
| File | Description | |
|---|---|---|
01-01.png | Step 1 input state | |
01-02.png | Step 1 execution result | |
02-01.png | Step 2 input state | |
02-02.png | Step 2 execution result | |
full-flow.png | Final state full-length screenshot |
FlowStep API
Each flow step can contain the following fields:
type: string — Input Text
Automatic behavior: Input text → Screenshot (01) → Enter → stable output → Screenshot (02).
Special rule: If the next step is key, do not auto-press Enter (hand over control to the key sequence).
key: string | string[] — Send Key Press
Used for menu selection, Tab completion, and other interactions. Does not auto-press Enter or auto-screenshot.
Supported key names: ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Enter, Tab, Escape, Backspace, Space, Home, End, PageUp, PageDown, Delete
Auto-screenshot is triggered after the key sequence ends (when the next step is not a key).
streaming — Capture During Execution
Capture multiple screenshots at intervals during long-running output (e.g., progress bars). Optionally generates an animated GIF.
delayMs(optional): Milliseconds to wait after pressing Enter before
starting captures. Useful for skipping model thinking/approval time.
- Captures stop early if terminal output is unchanged for 3 consecutive
intervals.
- Duplicate frames (no output change) are automatically skipped.
GIF prerequisite: If the scenario uses streaming with GIF enabled (default), check if ffmpeg is installed before running. If not, ask the user whether they'd like to install it:
If the user declines, the scenario still runs. GIF generation is skipped with a warning.
capture / captureFull — Explicit Screenshot
Use as a standalone step, or override automatic naming:
Scenario Examples
Basic: Input + Command
Secondary Menu Selection (/auth)
Tab Completion Selection (/export)
Array Batch (Multiple Scenarios in One File)
Integration with PR Review
This tool is commonly used for visual verification during PR reviews.
Troubleshooting
- Playwright error
browser not found
Cause: browser not installed. Solution: npx playwright install chromium (local dev only — in CI verify runs, this means the pre-install step failed; report it, do not install).
- Blank screenshot
Cause: process starts slowly or build failed. Solution: check build success and the spawn command.
- PTY-related errors
Cause: node-pty native module not compiled. Solution: npm rebuild node-pty.
- Unstable screenshot output
Cause: terminal output not fully rendered. Solution: add scenario wait time.
Full ScenarioConfig Type
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.qwen/skills/terminal-capture/SKILL.md
Popularity
- Repository stars
- 20,230
- Repository forks
- 1,787
- Repository npm downloads, 7 days
- 93,338
- 7-day trend score
- 75
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 17 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/qwenlm/qwen-code/terminal-capture)