screenshot · davila7 — Claude Code skill: capture the desktop on request
Takes a picture of the whole screen, a single app window or a pixel region when the agent has no built-in capture route for the task.
npx claude-code-templates@latest --skill media/screenshotWhat screenshot does
The skill kicks in on an explicit request for a desktop screenshot, or when the tool you are working with cannot grab the screen itself. For browsers and Electron apps the author points to Playwright or agent-browser first, and Figma files go through a Figma MCP server. This one covers plain desktop apps that lack a better capture path.
Two helpers do the work: take_screenshot.py on macOS and Linux, take_screenshot.ps1 on Windows. The Python version handles a full-screen grab, a --region x,y,w,h box, the frontmost window, and app name lookup with an optional window title filter — those last two are macOS only. Where the file lands follows three rules: your own path if you gave one, the OS screenshot folder if not, and temp when the agent needs the image for itself.
On macOS, capturing a window or app requires Screen Recording access, so the helper is run through ensure_macos_permissions.sh. The Linux helper picks the first tool it finds among scrot, gnome-screenshot and ImageMagick import. Without one of them the capture fails, so install one before you rely on it.
Raw OS examples with screencapture, scrot and gnome-screenshot are included as fallbacks. Python 3 or PowerShell is needed, depending on the system.
What it helps with
- take a full-screen shot into a given file
- grab one app window by its name
- cut out a rectangular pixel area
- feed the agent a screenshot for a visual check
- compare a live UI against a design capture
Example prompts for the agent
- Take a screenshot of my screen and save it to
output/screen.png - Capture the Claude app window and tell me what is on it
- Screenshot region 100,200,800,600 into the temp folder
How to install screenshot
1claude-code-templates
npx claude-code-templates@latest --skill media/screenshot2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill screenshot -a claude-code3Manually: put the files in place
~/.claude/skills/screenshot/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/screenshot/
Manually: put the files in place
.agents/skills/screenshot/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/screenshot/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates screenshot2Manually: put the files in place
.github/skills/screenshot/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/media/screenshotManually: put the files in place
.devin/skills/screenshot/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about screenshot
How do I install screenshot in Claude Code?
With the templates CLI: npx claude-code-templates@latest --skill media/screenshot. Or add it from the repo: npx skills add davila7/claude-code-templates --skill screenshot -a claude-code. The skill file ends up at ~/.claude/skills/screenshot/SKILL.md.
What does the screenshot skill do?
It runs a bundled script for your OS that grabs the screen, a window or a pixel region, then prints a path for each file it saved. The agent opens those paths in order to look at the result.
Why can't I capture an app window on Linux?
The --app, --window-name and --list-windows options exist only in the macOS helper. On Linux you get --active-window and --window-id, and pixel regions require scrot or ImageMagick import.
Similar skills
All skills for Agent setup: memory, context, orchestration →screenshot by other authors comes first.