mac-node-snapshot
一种强大的、权限友好的方法,用于通过 OpenClaw screen.record 捕获 macOS 屏幕。非常适合无头环境或确保捕获可靠性。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~taozhe6-mac-node-snapshotcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~taozhe6-mac-node-snapshot/file -o taozhe6-mac-node-snapshot.md# mac-node-snapshot
## Overview
Uses node screen.record to record a 1-second clip and extract a high-quality PNG frame. This workflow bypasses common screencapture permission issues and ensures a reliable image return.
## Quick start (single command, no scripts)
All paths are **relative** to `{skill}`.
```bash
mkdir -p "{skill}/tmp" \
&& openclaw nodes screen record --node "<node>" --duration 1000 --fps 10 --no-audio --out "{skill}/tmp/snap.mp4" \
&& ffmpeg -hide_banner -loglevel error -y -ss 00:00:00 -i "{skill}/tmp/snap.mp4" -frames:v 1 "{skill}/tmp/snap.png"
```
## When to use (trigger phrases)
Use this skill when the user asks:
- "Take a screenshot"
- "What is on my screen?"
- "Capture the screen"
- "Screenshot via screen.record"
## Notes
- Requirements: `ffmpeg` (ask before installing).
- If the frame is **black**, ask the user to **wake the screen** and retry.
- Use `read` on `{skill}/tmp/snap.png` to attach it to the reply.
## Troubleshooting
- **screen_record fails (node disconnected):** check `nodes status`, ensure OpenClaw app is running/paired.
- **screenRecording false:** must grant Screen Recording in System Settings; cannot be bypassed.
- **Black frame:** screen may be asleep/locked; ask the user to wake and retry.
---
## 中文说明
# mac-node-snapshot
## 概述
使用 node screen.record 录制一段 1 秒的片段,并提取一帧高质量的 PNG 图像。该工作流可绕过常见的屏幕截图权限问题,确保可靠地返回图像。
## 快速开始(单条命令,无需脚本)
所有路径均**相对于** `{skill}`。
```bash
mkdir -p "{skill}/tmp" \
&& openclaw nodes screen record --node "<node>" --duration 1000 --fps 10 --no-audio --out "{skill}/tmp/snap.mp4" \
&& ffmpeg -hide_banner -loglevel error -y -ss 00:00:00 -i "{skill}/tmp/snap.mp4" -frames:v 1 "{skill}/tmp/snap.png"
```
## 何时使用(触发短语)
当用户提出以下请求时使用该技能:
- "Take a screenshot"
- "What is on my screen?"
- "Capture the screen"
- "Screenshot via screen.record"
## 注意事项
- 依赖项:`ffmpeg`(安装前请先询问)。
- 如果帧画面为**黑色**,请让用户**唤醒屏幕**后重试。
- 对 `{skill}/tmp/snap.png` 使用 `read` 以将其附加到回复中。
## 故障排查
- **screen_record 失败(节点断开连接):** 检查 `nodes status`,确保 OpenClaw 应用正在运行/已配对。
- **screenRecording 为 false:** 必须在系统设置中授予屏幕录制权限;无法绕过。
- **黑色帧:** 屏幕可能处于休眠/锁定状态;请让用户唤醒后重试。