← 返回 Skills 市场
Cost Tracking for Models
作者
vincentqiu
· GitHub ↗
· v1.0.2
5366
总下载
12
收藏
29
当前安装
3
版本数
在 OpenClaw 中安装
/install cost-report
功能描述
Track OpenClaw usage costs and provide detailed reports by date and model. Supports daily, weekly, and monthly report formats for Discord and other messaging channels.
安全使用建议
Review before installing. Use the shell script directly with simple documented flags if needed, avoid report_discord.sh and --show-errors when session errors may contain sensitive content, and do not pass untrusted CLI arguments until the wrapper is changed to use a safe argument-array API.
功能分析
Type: OpenClaw Skill
Name: cost-report
Version: 1.0.2
The OpenClaw Cost Tracker skill is benign. It is designed to parse local OpenClaw session log files (`~/.openclaw/agents/*/sessions/*.jsonl`) to generate usage cost reports. The `scripts/cost_report.sh` and `scripts/report_discord.sh` scripts use standard utilities like `jq`, `grep`, `date`, and `bc` to process data without making external network calls or attempting to access sensitive system files. The `cli.js` wrapper simply executes the shell script, and the `SKILL.md` and `README.md` files provide clear, non-malicious instructions for the agent, aligning perfectly with the stated purpose of cost tracking.
能力评估
Purpose & Capability
Reading OpenClaw session logs for cost totals is coherent and disclosed, but the artifacts also extract raw errorMessage values and a Kimi-specific error detail section that go beyond the documented cost-report examples.
Instruction Scope
The Node CLI builds shell command strings with forwarded arguments, which can allow crafted arguments to trigger unintended local shell execution.
Install Mechanism
Installation is simple and dependency-light, with jq documented; no postinstall script or hidden package dependency was found. The CLI does run chmod on its bundled shell script.
Credentials
The skill scans broad local OpenClaw agent session logs under ~/.openclaw/agents and may output model usage, token counts, costs, and raw error messages.
Persistence & Privilege
The package includes enabled cron example JSON for Discord delivery, but the artifacts do not show self-installing persistence or privilege escalation.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cost-report - 安装完成后,直接呼叫该 Skill 的名称或使用
/cost-report触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Big change: Cost tracking and reporting system fully refactored for OpenClaw, with easier automation and Discord-ready reporting.
- Renamed skill to openclaw-cost-tracker with new OpenClaw-compatible file paths and model details.
- Replaced old token-based scripts with shell scripts (cost_report.sh, report_discord.sh) using jq for accurate cost parsing.
- Added CLI entry point and configuration/examples for scheduling and formatting reports.
- Removed deprecated/inaccurate scripts for legacy Clawdbot.
- Supports daily, weekly, monthly, and custom date-range cost summaries, including model breakdown.
- Outputs results in formats ready for Discord and other messaging platforms.
v1.0.1
**Changelog for cost-report v1.0.1**
- Added a README.md with comprehensive usage and integration instructions.
- Introduced scripts/extract-cost.sh to extract and summarize actual API costs from session JSONL files.
- Updated documentation to emphasize tracking real API spending using session logs, not token counts.
- Legacy token-based estimation scripts are now clearly marked as deprecated.
v1.0.0
- Initial release of clawdbot-cost-tracker.
- Tracks AI model usage and estimates API costs for Claude, GPT, and Codex models.
- Provides model-specific pricing and simple cost calculation formula.
- Supports daily usage snapshots and cost calculations.
- Includes scripts for automating usage snapshots and cost reporting.
- Designed for integration with daily reporting workflows and supports region-specific color conventions.
元数据
常见问题
Cost Tracking for Models 是什么?
Track OpenClaw usage costs and provide detailed reports by date and model. Supports daily, weekly, and monthly report formats for Discord and other messaging channels. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 5366 次。
如何安装 Cost Tracking for Models?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cost-report」即可一键安装,无需额外配置。
Cost Tracking for Models 是免费的吗?
是的,Cost Tracking for Models 完全免费(开源免费),可自由下载、安装和使用。
Cost Tracking for Models 支持哪些平台?
Cost Tracking for Models 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux)。
谁开发了 Cost Tracking for Models?
由 vincentqiu(@vincentqiu)开发并维护,当前版本 v1.0.2。
推荐 Skills