From 95413443a0b56d33805bf4148da1fb2678ccf352 Mon Sep 17 00:00:00 2001 From: James Date: Sat, 28 Feb 2026 01:09:46 -0500 Subject: [PATCH] Add Claude Code skill: use /capture for on-demand screenshots The skill now uses POST /capture?display=2 instead of GET /screenshot, removing the need to manually take screenshots before fetching. Co-Authored-By: Claude Opus 4.6 --- SKILL.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 SKILL.md diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..def491f --- /dev/null +++ b/SKILL.md @@ -0,0 +1,34 @@ +--- +name: screenshot +description: Pull latest screenshot from Mac desktop +--- + +# Skill: Pull Latest Screenshot from Mac + +Captures a screenshot of Johan's Mac display and shows it. + +## Usage + +Run `/screenshot` to capture and display a screenshot. + +## Instructions + +1. Capture a fresh screenshot from the Mac: +```bash +curl -sf -X POST 'http://192.168.1.14:9123/capture?display=2' -o /tmp/latest_screenshot.png +``` + +2. **Check the exit code.** If curl failed (non-zero exit), do NOT try to Read the file. Instead tell the user: "Could not capture screenshot. Check if the screenshot server is running on the Mac." + +3. Only if curl succeeded (exit code 0), use the Read tool on `/tmp/latest_screenshot.png` to display it. + +## Error Handling + +- If curl fails to connect: the screenshot server may not be running on the Mac +- NEVER try to Read the output file if curl failed + +## Notes + +- Uses the `/capture` endpoint which takes a live screenshot via `screencapture` +- The file is automatically cleaned up server-side after serving +- Use `?display=2` to capture a different display