dtsola

Xiaoyaoclaw Usage Report — AI skill for Claude Code

AI community

OpenClaw usage & performance reporting - parse session JSONL for task duration, tool/skill/model usage, token consumption.

How to install Xiaoyaoclaw Usage Report

This entry records only its repository, not the path inside it, so there is no exact command to give. Open dtsola/xiaoyaoclaw-usage-report and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Xiaoyaoclaw Usage Report does

OpenClaw usage & performance reporting - parse session JSONL for task duration, tool/skill/model usage, token consumption. Zero dependency, local only, token-first (no cost dimension). 中文:OpenClaw 用量报告 - 任务耗时/工具/技能/模型/token 用量查询,零依赖纯本地

Alternatives in AI

  • Codeburn — Free, local tool to track AI coding token usage and cost across 37 tools and agents (Claude Code, Cursor, Code 9.7k ★
  • Ccstatusline — by sirmalloc - A highly customizable status line formatter for Claude Code CLI that displays model info, git b 5.5k ★
  • Manifest — Real-time cost observability for OpenClaw agents — track tokens, costs, messages, and model usage 4.1k ★

README

OpenClaw Usage Report 📊

🇨🇳 中文 | 🌐 English

OpenClaw Usage Report — parse session JSONL for task duration, tool/skill/model usage and token consumption, zero-dependency & local-only

回答「每次 agent 任务花了多久、用了哪些工具/技能/模型、消耗了多少 token」。 OpenClaw usage & performance reporting — how long each task took, which tools/skills/models were used, how many tokens were consumed.

![license](https://img.shields.io/badge/license-MIT-green) [![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-usage-report&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-usage-report)

为什么需要它

OpenClaw 没有内置 per-task 性能面板。想优化你的 agent,你却:

  • 不知道每次任务花了多久:没有耗时统计,只能靠感觉
  • 找不到最慢的工具:exec / web_fetch / process 谁是瓶颈,没有数据
  • token 消耗对不上账:每个 agent/模型吃了多少 token,一片模糊
  • 技能使用无迹可查:哪些 skill 被用过、用了几次,无人知晓

但数据其实一直在——本地 session JSONL(`state/agents/*/sessions/*.jsonl`)完整记录了每次任务/工具/模型调用的时间戳与 token 消耗。本工具直接消费这份数据:**零依赖 · 纯本地 · 数据不出机器**。

特性

  • ⏱️ 任务耗时:每次任务的窗口耗时 + 活跃耗时(排除用户思考间隔)
  • 🔢 模型 token:按 agent/模型聚合——调用次数、输入/输出 token(真实消耗 = input+output)
  • 🧮 模型耗时:近似估算(事件 ts 间隔,cap 10min),按 agent/模型聚合总耗时与平均
  • 🔧 工具耗时:按工具聚合次数/失败/总耗时/平均/最慢——直接定位瓶颈
  • 🧩 Skills 使用:从 read 调用推断——技能名、读取次数、使用 agent
  • 📈 每日趋势:每日输入/输出 token、调用数
  • 🤖 MCP 工具:与普通工具同构(toolCall/toolResult),天然覆盖
  • 🔒 零依赖纯本地:仅 Python 标准库,无外部依赖、无数据上传
  • Cron 日报可选项--today --json 挂定时任务,是否启用由你决定

安装

# ClawHub(推荐)
clawhub install xiaoyaoclaw-usage-report

# 或从 GitHub 手动安装
git clone https://github.com/dtsola/xiaoyaoclaw-usage-report
# 把 scripts/usage-report.py 放到你的脚本目录

使用

  1. 安装技能(ClawHub 或手动放入 skills 目录)
  2. 直接对 agent 说「跑今日用量报告」,agent 会自动:
    • 定位 usage-report 技能 → 检测 OpenClaw state 目录
    • 解析全部 agent 的 sess