terminal-capture
Skill by QwenLM
Automates screenshot tests of terminal UI output for CLI commands. Used to visually check CLI changes during PR reviews and to test slash commands in the qwen-code project.
Install terminal-capture
Built from the published package, never by AI.
git clone --depth 1 https://github.com/QwenLM/qwen-code /tmp/qwen-code && mkdir -p ~/.claude/skills && cp -r /tmp/qwen-code/.qwen/skills/terminal-capture ~/.claude/skills/terminal-captureRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/QwenLM/qwen-code /tmp/qwen-code && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/qwen-code/.qwen/skills/terminal-capture ~/.gemini/antigravity-cli/skills/terminal-captureAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Terminal Capture is a skill for automating screenshot tests of terminal user interfaces. It runs CLI commands in a pseudo-terminal (node-pty), renders the ANSI output in xterm.js inside headless Playwright, and saves screenshots. Scenarios are written as TypeScript config files that list a spawn command and interaction steps such as typed text, slash commands and key presses.
The skill is aimed at developers working on the qwen-code CLI. The source says it applies when reviewing pull requests that change CLI output, testing slash commands such as /about, /context, /auth and /export, and generating visual documentation. Screenshots go to a folder per scenario, and streaming scenarios can produce an animated GIF.
Written from the project's SKILL.md and checked against it.
What it can do
- Scenario configurationDefines a spawn command, terminal settings and flow steps in a TypeScript file.
- Text and slash commandsTypes text or slash commands into the CLI, with Enter pressed automatically.
- Key pressesSends keys such as ArrowDown, Tab and Enter for menu selection.
- Automatic screenshotsCaptures the input state and execution result for each flow step.
- Streaming captureTakes frames at intervals during long output and can build an animated GIF.
- Explicit capturesUses capture for the viewport and captureFull for the full scrollback buffer.
- Batch runsRuns a single scenario file or every scenario in a directory.
- Terminal stylingSets columns, rows, theme, window title and font size for screenshots.
What you need
- Node.js and npm
- Playwright with Chromium
- node-pty native module
- ffmpeg (optional, for GIF output)
Try asking
- Run the /about terminal capture scenario and show me the screenshots.
- Write a terminal capture scenario that tests /export with the Tab key.
- Capture visual screenshots of this PR's CLI output changes.
Good to know
- Do not run playwright install when QWEN_VERIFY_CHROMIUM=1 is set in CI.
- GIF generation needs ffmpeg and is skipped with a warning if it is not installed.
- Streaming capture stops early if output is unchanged for 3 intervals.
- Some scenarios need added wait time when terminal output is not fully rendered.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .qwen/skills/terminal-capture/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB
Alternatives to terminal-capture
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
terminal-capture: common questions
Does this run a real terminal?
It uses node-pty as a pseudo-terminal, and xterm.js renders the output inside headless Playwright. The screenshots show that rendered output.
Where are the screenshots saved?
They are saved in integration-tests/terminal-capture/scenarios/screenshots/ in a folder named after each scenario.
Can it capture long-running commands?
Yes. Streaming captures frames at a set interval during long output, and it can generate an animated GIF when ffmpeg is installed.
How do I install terminal-capture?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is terminal-capture free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is terminal-capture safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to terminal-capture?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
