← Back to Skills Marketplace
vincentqiu

Cost Tracking for Models

by vincentqiu · GitHub ↗ · v1.0.2
darwinlinux ⚠ suspicious
5372
Downloads
12
Stars
29
Active Installs
3
Versions
Install in OpenClaw
/install cost-report
Description
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.
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cost-report
  3. After installation, invoke the skill by name or use /cost-report
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug cost-report
Version 1.0.2
License
All-time Installs 202
Active Installs 29
Total Versions 3
Frequently Asked Questions

What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 5372 downloads so far.

How do I install Cost Tracking for Models?

Run "/install cost-report" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cost Tracking for Models free?

Yes, Cost Tracking for Models is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Cost Tracking for Models support?

Cost Tracking for Models is cross-platform and runs anywhere OpenClaw / Claude Code is available (darwin, linux).

Who created Cost Tracking for Models?

It is built and maintained by vincentqiu (@vincentqiu); the current version is v1.0.2.

💬 Comments