1.1 KiB
1.1 KiB
| name | description |
|---|---|
| screenshot | 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
- Capture a fresh screenshot from the Mac:
curl -sf -X POST 'http://192.168.1.14:9123/capture?display=2' -o /tmp/latest_screenshot.png
-
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."
-
Only if curl succeeded (exit code 0), use the Read tool on
/tmp/latest_screenshot.pngto 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
/captureendpoint which takes a live screenshot viascreencapture - The file is automatically cleaned up server-side after serving
- Use
?display=2to capture a different display