返回顶部
c

claw-insights-snapshot爪印快照

Generate visual status cards for your OpenClaw agent as PNG, SVG, or JSON. The rendered cards are designed for social sharing and mobile-friendly channels — cute, compact, and informative at a glance. Use when pushing agent status to Slack, Telegram, Discord, WhatsApp, or any chat channel, generating visual reports of token usage and session activity, extracting metrics programmatically, or scheduling periodic status updates via cron.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
174
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

claw-insights-snapshot

快照状态卡片

启动时提示:我正在为您的 OpenClaw 代理生成可视化状态卡片。

什么是快照?

快照是服务端渲染的可视化状态卡片——而非浏览器截图。基于 Satori 技术,无需浏览器依赖,约 200 毫秒即可完成渲染。

输出结果专为聊天场景优化:紧凑布局、移动端可读性强、视觉美观便于分享。可一目了然地展示令牌用量、会话活动、错误计数和网关健康状态。

支持格式:PNG(默认)、SVG 或用于程序化调用的原始 JSON。

REST API

bash
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 响应头。

CLI 命令行

bash
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 <令牌>、--port、--quick、--dry-run。运行 claw-insights snapshot --help 查看完整用法。

参数

字段默认值(REST / CLI)可选值描述
detailstandardcompact / 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(快速状态检查)。两者均接受相同的可选值。

如何选择详细程度?

  • - compact — 仅显示摘要数字(会话数、总令牌数、错误数)。最适合嵌入聊天消息。
  • standard — 会话列表 + 指标图表。大多数场景的默认选项。
  • full — 完整内容:会话列表、所有图表、事件日志。最适合报告和归档。

常见工作流程

推送状态卡片到频道

适用于任何消息频道——Slack、Telegram、Discord、WhatsApp 等。

bash

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 — 最适合报告和归档

定时状态报告

bash

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

程序化指标提取

bash

以 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.json

JSON 架构:参见 references/json-schema.md

错误处理

状态码原因解决方法
401令牌缺失或无效检查 Bearer 令牌,或使用 --no-auth 模式
502
OpenClaw 网关未运行 | 执行 openclaw gateway start | | 500 | 服务器内部错误 | 检查日志:~/.claw-insights/logs/ | | 连接被拒绝 | claw-insights 未运行 | 执行 claw-insights start |

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 claw-insights-snapshot-1776368161 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 claw-insights-snapshot-1776368161 技能

通过命令行安装

skillhub install claw-insights-snapshot-1776368161

下载

⬇ 下载 claw-insights-snapshot v1.0.0(免费)

文件大小: 4.28 KB | 发布时间: 2026-4-17 14:21

v1.0.0 最新 2026-4-17 14:21
Initial release of claw-insights-snapshot.

- Generate visual status cards (PNG, SVG, or JSON) for your OpenClaw agent, optimized for mobile and social sharing.
- Supports compact, standard, and full detail levels for various reporting needs.
- Offers both REST API and CLI usage with flexible parameters and flags.
- Enables quick sharing to Slack, Telegram, Discord, WhatsApp, or other chat channels.
- Provides programmatic JSON metrics extraction and options for scheduled updates.
- Clear error handling and usage guidance included.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部