screencapture-mac
Installation
SKILL.md
screencapture-mac
macOS ships screencapture, a fast CLI for grabbing the screen. Use it to see what the user sees when working on native GUI software. Web apps belong in a browser-automation tool; this skill is for everything else (SwiftUI/AppKit, Electron, Java/Swing, Qt, Tk, games, system UI, Finder, Xcode, etc.).
Core workflow
- Capture to the scratch directory with a unique filename. Pick the directory in this order: the session scratch directory when the host names one in its instructions (Claude Code calls it the scratchpad directory), else
$TMPDIR, else/tmp. A session directory is isolated from other sessions and from the user's project, so files there cannot collide or clutter shared space. SetOUTto that path and use it in every command below. - Read the image with the Read tool — Agent is multimodal and will see the PNG inline.
- Delete the file immediately after reading. The user wants temp space kept clean; never leave screenshots lying around.
Filename convention: $OUT/screencap-$(date +%s).png. The timestamp prevents collisions if you capture multiple times in one task.