Capture and send screenshots from remote macOS nodes without context bloat
Capture screenshots from remote macOS nodes and send them to users. Avoids context bloat by using proper file-based workflows instead of base64 encoding.
# WRONG: Base64 encoding a screenshot will blow up your context
nodes.run: base64 -i /tmp/screenshot.png # 200K+ tokens = instant failure
Use screen_record with minimal duration (1ms) to capture a single frame:
{
"action": "screen_record",
"node": "<node-id>",
"durationMs": 1
}
Returns: FILE:/tmp/openclaw-screen-record-<uuid>.mp4
Use ffmpeg on the gateway host to extract a PNG frame:
ffmpeg -i /tmp/openclaw-screen-record-<uuid>.mp4 \
-frames:v 1 -update 1 -y /tmp/screenshot.png 2>/dev/null
Send the image file directly via the message tool:
{
"action": "send",
"channel": "telegram",
"target": "<chat-id>",
"media": "/tmp/screenshot.png"
}
# 1. Capture
result = nodes(action="screen_record", node="mac-xxx", durationMs=1)
# Returns: FILE:/tmp/openclaw-screen-record-abc123.mp4
# 2. Extract frame
exec("ffmpeg -i /tmp/openclaw-screen-record-abc123.mp4 -frames:v 1 -update 1 -y /tmp/mac-ss.png 2>/dev/null")
# 3. Send to user
message(action="send", channel="telegram", target="123456", media="/tmp/mac-ss.png")
To analyze what's on screen, use the image tool after extraction:
{
"image": "/tmp/screenshot.png",
"prompt": "Describe what's visible on this macOS screen"
}
Find available macOS nodes:
{
"action": "status"
}
Look for nodes with platform: "macos" and connected: true.
| Issue | Cause | Fix |
|-------|-------|-----|
| Context overflow (200K+) | Used base64 encoding | Use file-based workflow |
| screen_record timeout | Node disconnected | Check nodes status |
| ffmpeg not found | Missing on gateway | Install ffmpeg |
| Empty/black screenshot | Screen locked | Unlock Mac first |
media parameternpx skills add shunkakinoki/macos-screenshot下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Edit PDFs with natural-language instructions using the nano-pdf CLI.
Control Sonos speakers (discover/status/play/volume/group).
Terminal Spotify playback/search via spogo (preferred) or spotify_player.
Capture frames or clips from RTSP/ONVIF cameras.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
Category:tools