- Home
- Skills
- Sarfraznawaz2005
- Agent Skills Collection
- Take Screenshots
take-screenshots_skill
- Python
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill sarfraznawaz2005/agent-skills-collection --skill take-screenshots- SKILL.md3.4 KB
Overview
This skill provides Windows screenshot capture with both programmatic full-screen grabs and interactive region selection. It saves JPEG output with configurable quality and scaling to reduce file size. The tool returns structured JSON to stdout so calling processes can parse results or errors programmatically.
How this skill works
You invoke the executable with command-line flags to choose mode (full or region), output path, and optional parameters like monitor index, quality, and scale. In full mode it captures one or all monitors; in region mode it displays an interactive selector and returns coordinates. The program writes a JSON success, error, or cancellation object to stdout and saves the image file to the provided path.
When to use it
- Capture an entire monitor or all monitors for full-screen diagnostics or documentation.
- Select a precise screen region for bug reports, UI snippets, or focused screenshots.
- Reduce image size before sending to models or over networks using JPEG quality and scale parameters.
- Automate screenshots from scripts or tools needing JSON output and consistent file paths.
- Collect screen evidence during automated workflows while recording monitor index and rectangle coordinates.
Best practices
- Always specify --out with a .jpg/.jpeg filename when you want compression; otherwise use lossless formats if available.
- Set --quality (1–100) and --scale (0.1–1.0) to balance visual fidelity and file size for downstream processing.
- Check the JSON response's ok field before using the saved file; handle cancelled: true for region mode.
- Use --monitor or --all explicitly in full mode to avoid ambiguous captures on multi-monitor systems.
- Provide a clear --prompt string in region mode to guide users during interactive selection.
Example use cases
- Automated nightly capture of the primary display for visual regression testing: --mode full --monitor 0 --out nightly.jpg --quality 80 --scale 0.5.
- Manual bug reporting: run region mode with a custom prompt to capture the offending UI element and attach coordinates from the JSON output.
- Send lightweight screenshots to an LLM by scaling to 0.5 and using JPEG quality 75 to reduce upload size.
- Capture all connected displays for multi-monitor troubleshooting with --mode full --all --out multi.jpg.
- Embed screenshot capture into a diagnostic script that parses JSON to record width, height, and monitorIndex for each capture.
FAQ
It prints a JSON object with ok:true plus path, mode, rect, width, and height; full mode also includes monitorIndex and all flags.
How do I reduce file size for model uploads?
Use a .jpg filename, set --quality to a lower value (e.g., 75) and --scale to a value below 1.0 (e.g., 0.5).
What happens if a user cancels region selection?
The tool writes a JSON object with ok:false and cancelled:true for region mode; handle this case in calling code.
What are common errors to handle?
Invalid monitor indices, permission or write errors for the output path, and timeouts during interactive selection; always check the ok and error fields.