← 返回 Skills 市场
Cost Tracking for Models
作者
vincentqiu
· GitHub ↗
· v1.0.2
5809
总下载
11
收藏
0
当前安装
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 main cost_report.sh script only with simple trusted flags if you need this functionality, avoid report_discord.sh and --show-errors when session errors may contain private prompts or identifiers, and treat automated Discord delivery as potentially sharing local session-derived data.
功能分析
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
Parsing OpenClaw session logs for cost totals is coherent with the stated purpose and the main log path is disclosed, but report_discord.sh unconditionally includes error reporting and adds Kimi-specific raw errorMessage output that is not clearly described in the user-facing skill instructions.
Instruction Scope
The documented examples focus on cost totals and model breakdowns, while the implementation includes --show-errors behavior and a Discord helper that surfaces diagnostic text from local logs. The CLI also constructs a shell command string from forwarded arguments, creating unintended command-execution risk for crafted arguments.
Install Mechanism
Installation is dependency-light, with jq declared and no package dependencies or postinstall script found. The CLI does run chmod on its bundled shell script at execution time, which is disclosed by code but not prominent in documentation.
Credentials
Reading local OpenClaw session logs is necessary for cost reporting, but broad traversal under ~/.openclaw/agents plus raw error extraction can reveal more sensitive session metadata than cost totals, especially when used with Discord/reporting workflows.
Persistence & Privilege
The artifact includes enabled cron example configuration for scheduled Discord delivery, but it does not appear to self-install persistence, escalate privileges, or create background workers on its own.
如何使用
- 确保已安装 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 插件,目前累计下载 5809 次。
如何安装 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