返回顶部
🇺🇸 English
🇨🇳 简体中文
🇨🇳 繁體中文
🇺🇸 English
🇯🇵 日本語
🇰🇷 한국어
🇫🇷 Français
🇩🇪 Deutsch
🇪🇸 Español
🇷🇺 Русский
c

costlens

Calculate OpenClaw usage cost from offline event logs, apply budget thresholds, and export operator-facing reports.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
471
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

costlens

# CostLens Turn JSON usage events into cost summaries, budget checks, and offline reports. ## When to use - You already have token usage events and need a quick spend summary. - You want a simple budget gate in local automation or CI. - You need an exportable JSON report without relying on a hosted billing dashboard. ## Commands ```bash node {baseDir}/bin/costlens.js monitor --events ./events.json --budget 10.00 --threshold 80 node {baseDir}/bin/costlens.js budget check --events ./events.json --budget 5.00 --format json node {baseDir}/bin/costlens.js report --events ./events.json --out ./reports/cost-report.json ``` ## Built-in default rates | Model | 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 | Events can override the defaults with `inputCostPer1k` and `outputCostPer1k`. ## Event shape ```json [ { "model": "gpt-4.1", "promptTokens": 1500, "completionTokens": 800, "timestamp": "2026-02-26T10:00:00Z" } ] ``` ## Output - Total calls, total tokens, and total cost - Per-model breakdowns for calls, tokens, and cost - Per-day spend trends - Budget usage percentage and alert level (`ok`, `warning`, or `critical`) ## Boundaries - Pricing is based on built-in defaults plus per-event overrides. It is not a live pricing feed. - CostLens is optimized for offline JSON analysis, not streaming metering or invoice reconciliation.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 costlens-1776298505 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 costlens-1776298505 技能

通过命令行安装

skillhub install costlens-1776298505

下载

⬇ 下载 costlens v1.0.1(免费)

文件大小: 10.68 KB | 发布时间: 2026-4-16 15:55

v1.0.1 最新 2026-4-16 15:55
README and SKILL.md compliance update for OpenClaw / ClawHub alignment.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部