一键导入
visual-tester
Visually test web UIs using Chrome CDP — spot layout issues, interaction bugs, responsive breakage, and produce a structured report
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Visually test web UIs using Chrome CDP — spot layout issues, interaction bugs, responsive breakage, and produce a structured report
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage terminal sessions via cmux — spawn workspaces for dev servers, test runners, and background tasks. Read output, send commands, and orchestrate multi-terminal workflows.
Structured brainstorming that always follows the full execution chain: investigate → clarify → explore → validate design → write plan → create todos → create feature branch → execute with subagents. No shortcuts.
Aggressively remove grammatical scaffolding LLMs reconstruct while preserving meaning-carrying content. Output may be fragments. Use when compressing text for prompts, reducing token count, preparing context for LLM input, or making documentation more token-efficient. Applies LLM-aware compression rules that delete predictable grammar while preserving semantics.
Write system prompts, tool docs, and agent definitions. Combines research-backed prompt engineering (+15-30% measured improvements) with project XML conventions. Covers tag hierarchy, structural templates, high-impact interventions, anti-patterns.
Remote control tmux sessions for interactive CLIs (python, gdb, etc.) by sending keystrokes and scraping pane output.
Read this skill before making git commits
| name | visual-tester |
| description | Visually test web UIs using Chrome CDP — spot layout issues, interaction bugs, responsive breakage, and produce a structured report |
Ad-hoc visual QA for web UIs. You use Chrome CDP (scripts/cdp.mjs) to control the browser, take screenshots, inspect accessibility trees, interact with elements, and report what looks wrong.
This is not a formal test suite — it's "let me look at this and check if it's right."
You interact with the browser via the scripts/cdp.mjs CLI. Read the chrome-cdp skill for the full command reference.
chrome://inspect/#remote-debugging → toggle the switchscripts/cdp.mjs list
Pick the target from the list. Use the targetId prefix (e.g. 6BE827FA) for all subsequent commands.
scripts/cdp.mjs shot <target> /tmp/screenshot.png
If you get an image back, you're connected.
scripts/cdp.mjs snap <target>
scripts/cdp.mjs shot <target> /tmp/screenshot.png
Captures the viewport. Output includes DPR for coordinate conversion.
For text-heavy pages where you need to read content without a screenshot:
scripts/cdp.mjs snap <target>
Test at these breakpoints by changing the viewport via eval:
| Name | Width | Height |
|---|---|---|
| Mobile | 375 | 812 |
| Tablet | 768 | 1024 |
| Desktop | 1280 | 800 |
| Wide | 1920 | 1080 |
scripts/cdp.mjs evalraw <target> Emulation.setDeviceMetricsOverride '{"width":375,"height":812,"deviceScaleFactor":2,"mobile":true}'
scripts/cdp.mjs shot <target> /tmp/mobile.png
Reset to default after testing:
scripts/cdp.mjs evalraw <target> Emulation.clearDeviceMetricsOverride
Take a screenshot at each size. Look for:
You don't always need all four breakpoints. Use judgment — if it's a simple component, mobile + desktop may suffice.
scripts/cdp.mjs click <target> 'button[type="submit"]'
scripts/cdp.mjs shot <target> /tmp/after-click.png
Or click by coordinates (CSS pixels):
scripts/cdp.mjs clickxy <target> 200 350
Always screenshot after actions to verify the result.
scripts/cdp.mjs click <target> 'input[name="email"]'
scripts/cdp.mjs type <target> 'test@example.com'
scripts/cdp.mjs click <target> 'input[name="password"]'
scripts/cdp.mjs type <target> 'password123'
scripts/cdp.mjs click <target> 'button[type="submit"]'
scripts/cdp.mjs shot <target> /tmp/form-submitted.png
Check: validation messages styled correctly? Success/error states clear?
Use eval to trigger hover/focus for inspection:
scripts/cdp.mjs eval <target> "document.querySelector('button.primary').dispatchEvent(new MouseEvent('mouseover', {bubbles: true}))"
scripts/cdp.mjs shot <target> /tmp/hover.png
Click through different routes/pages. Verify:
scripts/cdp.mjs nav <target> http://localhost:3000/other-page
scripts/cdp.mjs shot <target> /tmp/other-page.png
Toggle color scheme emulation via CDP:
scripts/cdp.mjs evalraw <target> Emulation.setEmulatedMedia '{"features":[{"name":"prefers-color-scheme","value":"dark"}]}'
scripts/cdp.mjs shot <target> /tmp/dark-mode.png
scripts/cdp.mjs evalraw <target> Emulation.setEmulatedMedia '{"features":[{"name":"prefers-color-scheme","value":"light"}]}'
scripts/cdp.mjs shot <target> /tmp/light-mode.png
Check:
When you spot something off, inspect the styles via eval:
scripts/cdp.mjs eval <target> "JSON.stringify(window.getComputedStyle(document.querySelector('.suspect-element')).cssText)"
Or get specific properties:
scripts/cdp.mjs eval <target> "window.getComputedStyle(document.querySelector('.suspect-element')).getPropertyValue('margin-top')"
After testing, produce a structured report:
# Visual Test Report
**URL:** http://localhost:3000
**Date:** YYYY-MM-DD
**Viewports tested:** Mobile (375), Desktop (1280)
## Summary
Brief overall impression. Is this ready to ship? Major concerns?
## Findings
### P0 — Blockers (broken functionality, unusable UI)
#### [Finding title]
- **Location:** Page/component/element
- **Description:** What's wrong
- **Expected:** What it should look like/do
- **Suggested fix:** How to fix it
### P1 — Major (significant visual issues, poor UX)
...
### P2 — Minor (cosmetic issues, polish)
...
### P3 — Nits (nice-to-have improvements)
...
## What's Working Well
- List things that look good
- Positive observations help calibrate severity
| Level | Meaning | Examples |
|---|---|---|
| P0 | Broken / unusable | Button doesn't work, page crashes, content invisible |
| P1 | Major visual/UX issue | Layout broken on mobile, text unreadable, form unusable |
| P2 | Noticeable cosmetic issue | Misaligned elements, inconsistent spacing, wrong colors |
| P3 | Polish / nit | Slightly off margins, could-be-better hover states |
Before writing the report, restore the page to its original state. Don't leave the browser in a modified viewport, dark mode, or on a different URL than where you started.
scripts/cdp.mjs evalraw <target> Emulation.clearDeviceMetricsOverride
scripts/cdp.mjs evalraw <target> Emulation.setEmulatedMedia '{"features":[]}'
scripts/cdp.mjs nav <target> <original-url>
Note the original URL at the start of testing.
scripts/cdp.mjs eval <target> "JSON.stringify(window.__consoleErrors || 'no errors captured')"