Ot Aiops
支持多协议工业设备数据采集与智能诊断,具备高风险写入防护机制。
生成 OpenClaw 代理的可视化状态卡片,支持 PNG/SVG/JSON 格式,适用于消息渠道分享。
openclaw skills install @lucal6/claw-insights-snapshot命令、参数、文件名以原文为准
启动时提示: "我正在为您生成 OpenClaw 代理的可视化状态卡片。"
快照是一种由服务器渲染的可视化状态卡片——不是浏览器截图。基于 Satori 技术,可在约 200 毫秒内完成渲染,无需依赖浏览器。
输出结果专为聊天场景设计:紧凑、移动端可读性强,视觉上足够美观,适合分享。卡片可一次性展示令牌使用量、会话活动、错误计数和网关健康状态。
支持格式:PNG(默认)、SVG 或原始 JSON,适用于程序化使用。
curl -X POST http://127.0.0.1:41041/api/snapshot \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"detail":"standard","range":"6h","theme":"dark"}' \
-o snapshot.png无认证模式:使用 claw-insights start --no-auth 启动服务后,可省略 Authorization 头部。
响应包含 Content-Disposition 头部,附带时间戳文件名。
claw-insights snapshot # 保存至 ~/.claw-insights/snapshots/
claw-insights snapshot --quick -o status.png # 生成紧凑型移动端快照
claw-insights snapshot --format json | jq . # 输出 JSON 到标准输出
claw-insights snapshot --dry-run # 仅预览参数CLI 参数:--format、--detail、--range、--theme、--lang、-o <路径>、-t <token>、--port、--quick、--dry-run。运行 claw-insights snapshot --help 查看完整用法。
| 字段 | 默认值(REST / CLI) | 可选值 | 描述 |
|---|---|---|---|
detail | standard | compact / standard / full | 详细程度 |
format | png | png / svg / json | 输出格式 |
range | 24h(REST) / 6h(CLI) | 30m / 1h / 6h / 12h / 24h | 指标的时间范围 |
theme | dark | dark / light | 颜色主题 |
lang | en | en / zh | 语言 |
注意: REST API 与 CLI 的默认
range值不同。REST 默认为24h(全天概览),CLI 默认为6h(快速状态检查)。两者均接受相同的取值范围。
适用于任意消息渠道——Slack、Telegram、Discord、WhatsApp 等。
# 1. 生成紧凑型状态卡片
curl -X POST http://127.0.0.1:41041/api/snapshot \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"detail":"compact","range":"6h"}' \
-o /tmp/status.png
# 2. 通过频道工具或 API 发送
# 紧凑模式优化用于移动端聊天气泡。建议:
compact — 适合聊天消息(仅摘要数字,图像较小)standard — 适合每日检查(包含会话列表与图表)full — 适合报告与存档# 生成 24 小时范围的完整快照
curl -X POST http://127.0.0.1:41041/api/snapshot \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"detail":"full","range":"24h"}' \
-o /tmp/daily-report.png# 获取原始数据为 JSON 格式
curl -X POST http://127.0.0.1:41041/api/snapshot \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"format":"json","range":"6h"}' \
-o metrics.jsonJSON Schema:参见 [references/json-schema.md](references/json-schema.md)
| 状态码 | 原因 | 解决方法 |
|---|---|---|
401 | 缺失或无效的令牌 | 检查 Bearer Token,或使用 --no-auth 模式 |
502 | OpenClaw 网关未运行 | 执行 openclaw gateway start |
500 | 内部服务器错误 | 查看日志:~/.claw-insights/logs/ |
| 连接被拒绝 | claw-insights 未运行 | 执行 claw-insights start |
已收录 1 个 Skill