Token导航 LogoToken导航TokenDH.com
研究检索external-serviceclawhub未标认证来源可访问clear审计提醒

daily-cost-report每日成本报告

Agent Skill

daily-cost-report 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,053

周安装

260

GitHub Stars

公开资料未说明

下载量

2,122
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:daily-cost-report(每日成本报告)
来源仓库:https://github.com/kjvarga/daily-cost-report
安装命令:
openclaw skills install daily-cost-report
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install daily-cost-report

简介

按代理、型号和渠道生成详细的每日 OpenClaw 成本报告,并具有 HTML 电子邮件格式和可选的自动交付功能。

SKILL.md

name
daily-cost-report
description
Generate daily OpenClaw cost reports with breakdown by agent/model/channel. Use when: daily cron job, on-demand cost analysis, cost auditing. Generates HTML-formatted email reports.
emoji
📊
requires
env

Daily Cost Report 📊

Generate comprehensive OpenClaw usage and cost reports with breakdowns by agent, model, and channel. Supports both on-demand analysis and automated daily email delivery.

Quick Start

# Generate report for yesterday (markdown)
{baseDir}/scripts/daily-cost-report.sh yesterday

# Generate report for a specific date
{baseDir}/scripts/daily-cost-report.sh 2026-03-18

# Generate report for today
{baseDir}/scripts/daily-cost-report.sh today

# Generate HTML-formatted email report
{baseDir}/scripts/daily-cost-report-email.sh yesterday

# Send email report to recipient
{baseDir}/scripts/send-cost-report.sh kjvarga@gmail.com yesterday

What It Does

The daily cost report analyzes OpenClaw session data for a specified date range and generates:

  • Total cost and token usage across all agents, models, and channels
  • Per-agent breakdown showing which agents consumed the most resources
  • Per-model breakdown showing cost distribution across Claude models, Deepseek, GPT, etc.
  • Per-channel breakdown showing usage from Telegram, CLI, web, etc.
  • Top sessions by cost identifying the most expensive individual sessions
  • Prompt cache metrics showing cache write/read tokens and cost savings

Reports use the current pricing for:

  • Claude Haiku 4.5
  • Claude Sonnet 4.5
  • Claude Opus 4.6
  • Deepseek V3.2
  • OpenAI GPT-4o-mini

Cache pricing (read/write) is factored into cost calculations.

Scripts

daily-cost-report.sh

Core report generator. Queries OpenClaw sessions via openclaw sessions --all-agents --json, filters by date range, calculates costs using model-specific pricing, and generates markdown output.

Output: /tmp/cost-report-YYYY-MM-DD.md

daily-cost-report-email.sh

Wraps the markdown report in an HTML email template with styled tables, summary metrics, and visual hierarchy.

Output: /tmp/cost-report-YYYY-MM-DD.html

send-cost-report.sh

Sends the HTML report via email using the mail command. Falls back to saving the file if mail delivery fails.

Usage: send-cost-report.sh <recipient-email> [date]

Cron Usage

The daily cost report is typically scheduled as a cron job in ~/.openclaw/cron/jobs.json:

{
  "id": "daily-cost-report",
  "agentId": "worker",
  "name": "main-daily-cost-report",
  "enabled": true,
  "schedule": {
    "kind": "cron",
    "expr": "0 8 * * *",
    "tz": "America/Vancouver"
  },
  "sessionTarget": "isolated",
  "wakeMode": "now",
  "payload": {
    "kind": "agentTurn",
    "message": "Generate yesterday's cost report and send to kjvarga@gmail.com"
  },
  "delivery": {
    "mode": "announce",
    "channel": "telegram",
    "to": "7918443630"
  }
}

The cron job invokes the skill, which then calls the appropriate scripts.

Manual Invocation from Agent

When Karl asks for a cost report:

# From any agent with exec access
exec(command: "bash ~/.openclaw/workspace/skills/daily-cost-report/scripts/daily-cost-report.sh yesterday")

# Or to generate and send email
exec(command: "bash ~/.openclaw/workspace/skills/daily-cost-report/scripts/send-cost-report.sh kjvarga@gmail.com yesterday")

Report Format

The report includes:

  1. Summary section - Total cost, tokens, cache metrics, savings
  2. Cost by Agent - Which agents are most active/expensive
  3. Cost by Model - Model-level resource consumption
  4. Cost by Channel - Usage by Telegram, CLI, web, etc.
  5. Top Sessions - Highest-cost individual sessions

All monetary values are in USD with 4 decimal precision. Token counts are formatted with thousands separators for readability.

Date Handling

Scripts accept:

  • yesterday (default) - Previous calendar day
  • today - Current calendar day
  • YYYY-MM-DD - Specific date

Date parsing is compatible with both macOS (date -v-1d) and Linux (date -d "yesterday").

Requirements

  • OpenClaw CLI: openclaw sessions --all-agents --json
  • jq for JSON processing
  • awk for aggregation
  • mail command (for email delivery)
  • bash 4+ (for associative arrays)

Cost

This skill costs nothing — it only reads session metadata that OpenClaw already tracks. No external API calls.

Example Output

# OpenClaw Daily Cost Report 🐈‍⬛
**Date:** 2026-03-18  
**Generated:** 2026-03-19 08:00:00 PDT

---

## Summary

| Metric | Value |
|--------|-------|
| **Total Cost** | $2.4567 |
| **Total Tokens** | 1,234,567 |
| **Input Tokens** | 987,654 |
| **Output Tokens** | 246,913 |
| **Cache Write Tokens** | 123,456 |
| **Cache Read Tokens** | 456,789 |
| **Cache Savings** | $0.3245 |

---

## Cost by Agent

| Agent | Cost | Tokens | Input | Output |
|-------|------|--------|-------|--------|
| main | $1.2345 | 654,321 | 543,210 | 111,111 |
| worker | $0.8901 | 400,000 | 320,000 | 80,000 |
| research | $0.3321 | 180,246 | 124,444 | 55,802 |
...

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

75.73%
按下载量换算1,607

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills