Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

Capture Screen (macOS)

Find, control, and screenshot specific macOS application windows programmatically using Swift, AppleScript, and screencapture.

AutomationIntermediate1,348215AI score 9/10Last updated: Aug 24, 2026

What it does

  • Locates a numeric Window ID by app or title keyword using Swift + CGWindowListCopyWindowInfo (the only reliable route on macOS).
  • Prepares the view before capture via AppleScript: activate an app, set Excel zoom, scroll to a row/column, switch sheets, select cell ranges.
  • Captures just that window with screencapture -x -l <WID>, supports PNG/JPEG/delay/region, and downsizes Retina 2x output with sips.
  • Documents a "failed approaches" table (System Events window id, PyObjC Quartz) so you avoid dead ends.
  • Includes a Screen Recording permission triage checklist plus one-liners to open the right System Settings pane.

Who it's for

  • macOS users who repeatedly produce screenshots for docs, guides, or release notes.
  • Analysts capturing several consistent views of the same Excel workbook or dashboard.
  • Developers and technical writers automating demo imagery or visual checks.

Examples

  1. "Open model.xlsx, set zoom to 130%, and capture the Summary sheet at rows 1 and 45" → opens the file, sets the view, re-fetches the WID, writes two PNGs.
  2. "Grab only the Chrome window" → swift scripts/get_window_id.swift Chrome, then capture by that WID.
  3. When capture fails with ERROR: Failed to enumerate windows, it opens the Privacy & Security → Screen Recording pane and walks the permission checklist.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/daymade/claude-code-skills/HEAD/capture-screen/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

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. Open Terminal (Applications → Utilities → Terminal).
  2. Clone the repo: git clone https://github.com/daymade/claude-code-skills.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy this skill only: cp -r claude-code-skills/capture-screen ~/.claude/skills/
  5. Make sure Swift is available: xcode-select --install (skip if Xcode Command Line Tools are installed).
  6. Grant Screen Recording permission to your terminal (or the app running Claude Code) in System Settings → Privacy & Security → Screen Recording, then restart that app.
  7. Restart Claude Code and ask something like "capture the Excel window" to trigger the skill.