Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

macOS Screen Capture Automation

Teaches Claude to find macOS window IDs with Swift, adjust the view via AppleScript, and capture exact app windows with screencapture.

AutomationIntermediate1,323212AI score 8/10Last updated: Aug 8, 2026

What it does

Gives Claude a proven three-step workflow for programmatically capturing a specific application window on macOS:

  1. Find the window — Swift + CGWindowListCopyWindowInfo enumerates on-screen windows and returns the numeric Window ID (the only reliable route on macOS).
  2. Control the view — AppleScript (osascript) activates the app and, for Microsoft Excel, sets zoom, scrolls to a row/column, selects sheets and cell ranges.
  3. Capturescreencapture -x -l <WID> writes silent PNG/JPEG output, with sips for downscaling Retina 2x images.

It also documents timeout guards so osascript never hangs, a step-by-step Screen Recording permission triage flow, and a table of approaches that are confirmed to fail (System Events window id, PyObjC Quartz, etc.) so you skip the dead ends.

Who it's for

  • Technical writers producing repeatable screenshots for docs and release notes
  • Analysts capturing consistent views of Excel models or dashboards for reports
  • Developers automating visual QA / regression screenshots on macOS
  • Anyone who wants to "show Claude the screen" for review

Examples

  • Batch Excel report shots: open a workbook, set zoom to 130%, then scroll to row 1, row 45, and the "DCF" sheet to produce section_a.png, section_b.png, and dcf_overview.png.
  • Clean app-window docs images: run swift scripts/get_window_id.swift Chrome, grab the WID, and capture just the browser window without desktop clutter.
  • Permission debugging: when capture fails, print the --permission-hint screen checklist and jump straight to the Screen Recording pane in System Settings.

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the capture-screen folder from the GitHub repo daymade/claude-code-skills into my ~/.claude/skills/capture-screen/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/daymade/claude-code-skills.git /tmp/claude-code-skills && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-skills/capture-screen ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Prerequisites: macOS plus Xcode Command Line Tools. Run swift --version; if it fails, run xcode-select --install.
  2. Clone the repo: git clone https://github.com/daymade/claude-code-skills.git ~/claude-code-skills
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r ~/claude-code-skills/capture-screen ~/.claude/skills/
  5. Verify: ls ~/.claude/skills/capture-screen should show SKILL.md and a scripts/ directory.
  6. Grant permission: System Settings → Privacy & Security → Screen Recording, enable your terminal (Terminal/iTerm) or the Claude Code app, then restart that app.
  7. Test it: restart Claude Code and ask "capture the Chrome window", or run swift ~/.claude/skills/capture-screen/scripts/get_window_id.swift Chrome directly to confirm a WID is printed.