Screenshot capture

From PramodDutta/qaskills · View interactive version

Screenshot capture is an AI agent skill from the GitHub repository PramodDutta/qaskills. Cross-platform desktop and application screenshot capture for visual testing, UI verification, and automated visual comparison across macOS, Linux, and Windows.

How to use this skill

Skill file

Screenshot Capture Testing

Cross-platform screenshot capture for visual testing, UI verification, and automated comparison. Supports full screen, specific app/window, and pixel region captures.

Tool Priority

macOS Capture

Full screen

screencapture -x output/screen.png

Pixel region (x,y,w,h)

screencapture -x -R100,200,800,600 output/region.png

Specific window by ID

screencapture -x -l12345 output/window.png

Interactive selection

screencapture -x -i output/interactive.png

Linux Capture

Using scrot

# Full screen
scrot output/screen.png

# Pixel region
scrot -a 100,200,800,600 output/region.png

# Active window
scrot -u output/window.png

Using gnome-screenshot

gnome-screenshot -f output/screen.png
gnome-screenshot -w -f output/window.png

Using ImageMagick

import -window root output/screen.png
import -window root -crop 800x600+100+200 output/region.png

Windows Capture (PowerShell)

# Full screen
powershell -ExecutionPolicy Bypass -File take_screenshot.ps1

# Pixel region
powershell -ExecutionPolicy Bypass -File take_screenshot.ps1 -Region 100,200,800,600

# Active window
powershell -ExecutionPolicy Bypass -File take_screenshot.ps1 -ActiveWindow

Visual Testing Workflow

  1. Capture baseline — Take reference screenshots of correct UI state
  2. Capture current — Take screenshots of current UI state after changes
  3. Compare — Diff the screenshots to detect visual regressions
  4. Report — Generate visual diff reports with highlighted changes

Multi-Display Behavior

Error Handling

Best Practices

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.