costlensOpenClaw 成本和 Token 使用监控工具。从事件日志计算模型调用成本,支持预算告警和多维度报表(按模型/按天)。
Install via ClawdBot CLI:
clawdbot install mike007jd/costlensOpenClaw 成本和 Token 使用监控工具。
| 模型 | Input/1k | Output/1k |
|------|----------|-----------|
| gpt-4.1 | $0.01 | $0.03 |
| gpt-4o-mini | $0.00015 | $0.0006 |
| claude-3-5-sonnet | $0.003 | $0.015 |
| default | $0.002 | $0.008 |
事件可覆盖默认费率:inputCostPer1k, outputCostPer1k
[
{
"model": "gpt-4.1",
"promptTokens": 1500,
"completionTokens": 800,
"timestamp": "2026-02-26T10:00:00Z"
}
]
# 监控(表格输出)
node bin/costlens.js monitor --events ./events.json --budget 10.00 --threshold 80
# 预算检查(超支时退出码 2)
node bin/costlens.js budget check --events ./events.json --budget 5.00 --format json
# 导出报表
node bin/costlens.js report --events ./events.json --out ./reports/cost-report.json
Generated Mar 1, 2026
A startup using multiple LLMs for product features tracks spending across models like GPT-4.1 and Claude to optimize usage and stay within a tight budget. CostLens provides real-time alerts when costs approach thresholds, preventing unexpected overruns.
A large corporation implements AI tools across departments and uses CostLens to generate detailed reports on token usage and costs per model and day. This helps enforce budget policies and audit compliance with internal spending guidelines.
Researchers running experiments with various LLMs need to monitor token consumption and costs to allocate grant funds efficiently. CostLens allows them to check budgets and export reports for funding documentation and analysis.
A SaaS provider offering AI-powered services to clients uses CostLens to track per-model costs and identify high-expense areas. This data informs pricing strategies and helps maintain profitability by adjusting usage or model selection.
Offer CostLens as a cloud service with tiered plans based on features like advanced reporting or higher alert thresholds. Revenue comes from monthly subscriptions, targeting businesses needing continuous cost oversight.
Sell perpetual licenses or annual contracts to large organizations for on-premises deployment or custom integrations. Revenue is generated through upfront fees and optional support packages for ongoing maintenance.
Provide a free basic version of CostLens for individual developers or small teams, with paid upgrades for advanced features like multi-user access or historical data analysis. Revenue comes from converting free users to premium plans.
💬 Integration Tip
Integrate CostLens into CI/CD pipelines to automatically check budgets after deployments, ensuring cost compliance without manual intervention.
Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag,...
Essential Docker commands and workflows for container management, image operations, and debugging.
Tool discovery and shell one-liner reference for sysadmin, DevOps, and security tasks. AUTO-CONSULT this skill when the user is: troubleshooting network issues, debugging processes, analyzing logs, working with SSL/TLS, managing DNS, testing HTTP endpoints, auditing security, working with containers, writing shell scripts, or asks 'what tool should I use for X'. Source: github.com/trimstray/the-book-of-secret-knowledge
Deploy applications and manage projects with complete CLI reference. Commands for deployments, projects, domains, environment variables, and live documentation access.
Monitor topics of interest and proactively alert when important developments occur. Use when user wants automated monitoring of specific subjects (e.g., product releases, price changes, news topics, technology updates). Supports scheduled web searches, AI-powered importance scoring, smart alerts vs weekly digests, and memory-aware contextual summaries.