跳到正文
cccskills
免费在 GitHub 公开

clawdbot-cost-tracker

Track token use across Clawdbot sessions and estimate API costs for supported Claude, GPT, and Codex models. Save daily snapshots, compare usage between dates, and produce cost figures for daily or weekly spending reports.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Track Clawdbot AI model usage and estimate costs. Use when reporting daily/weekly costs, analyzing token usage across sessions, or monitoring AI spending. Supports Claude (opus/sonnet), GPT, and Codex models.

sundial-org/awesome-openclaw-skills星标 671(GitHub 671 + cccskills 0)
集成工具OpenAI

实测评分 未实测

查看安装方法

适用场景

  • Reviewing daily or weekly AI spending
  • Comparing token use across sessions
  • Tracking model usage over time

包含的文件(3)

  • SKILL.md2.4 KB
  • scripts/calculate-cost.js5.6 KB
  • scripts/snapshot-usage.js4.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Clawdbot Cost Tracker

Track token usage and estimate API costs across all Clawdbot sessions.

Quick Start

Get Current Usage

# Use sessions_list to get token data
sessions_list --limit 20 --messageLimit 0

Extract totalTokens and model from each session.

Calculate Cost

Model pricing (USD per million tokens):

ModelInputOutputAvg Ratio
claude-opus-4-5$15$7530/70
claude-sonnet-4$3$1530/70
codex-mini-latest$1$530/70
gpt-4o$2.5$1030/70
gpt-4o-mini$0.15$0.630/70

Cost formula (assuming 30% input, 70% output):

cost = tokens * (0.3 * input_price + 0.7 * output_price) / 1,000,000

Daily Tracking

Save Usage Snapshot

Store daily snapshots in memory/usage/YYYY-MM-DD.json:

{
  "date": "2026-01-29",
  "timestamp": "2026-01-29T08:20:00+08:00",
  "sessions": {
    "session_key": {
      "model": "claude-opus-4-5",
      "totalTokens": 123456,
      "channel": "discord"
    }
  },
  "summary": {
    "totalTokens": 250000,
    "byModel": {
      "claude-opus-4-5": 220000,
      "codex-mini-latest": 30000
    }
  }
}

Calculate Daily Cost

Compare consecutive days to get daily usage:

daily_tokens = today.totalTokens - yesterday.totalTokens
daily_cost = estimate_cost(daily_tokens, model)

Scripts

scripts/snapshot-usage.js

Creates a usage snapshot from current session data.

node scripts/snapshot-usage.js [output-dir]
# Default output: memory/usage/YYYY-MM-DD.json

scripts/calculate-cost.js

Calculates cost for a date range.

node scripts/calculate-cost.js [date]
# Default: today
# Output: JSON with token delta and estimated cost

Integration with Daily Report

Add to HEARTBEAT.md:

  1. Call sessions_list to get current tokens
  2. Load previous day's snapshot from memory/usage/
  3. Calculate delta and estimate cost
  4. Include in daily report format:
    💰 **Clawdbot Cost** (yesterday)
    • Used: 45.2k tokens
    • Estimated: ~$1.23
    

Color Conventions (Chinese Style)

For financial displays in Chinese context:

  • 🔴 Red = Up/Increase
  • 🟢 Green = Down/Decrease

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

1password

免费

Set up and use the 1Password command-line tool `op` to sign in, verify account access, and work with vault data. The skill covers single or multiple accounts and shows how to run commands or fill templates with secrets while limiting exposure in logs and files.

中文简介正在准备中。当前显示英语简介。

  • Set up the `op` command-line tool
  • Sign in and verify access to an account
  • Run a command with vault secrets
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Check live prices, price changes, and trading volume for Shanghai, Shenzhen, and Beijing stocks. Review intraday volume patterns and possible large-investor activity, and manage holdings with cost, quantity, and profit or loss summaries.

中文简介正在准备中。当前显示英语简介。

  • Checking current prices for A-share stocks
  • Reviewing intraday volume and large-investor signals
  • Managing a stock portfolio and checking profit or loss
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Scan HTML or JSX files and directories for accessibility issues such as missing image descriptions, form labels, and keyboard access problems. The skill identifies WCAG guideline failures and provides suggested code fixes alongside its findings.

中文简介正在准备中。当前显示英语简介。

  • Checking a new component before release
  • Auditing an inherited codebase
  • Preparing for an accessibility compliance review
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Plan A/B tests that compare page or product changes, with clear hypotheses, sample sizes, success metrics, and traffic allocation. Get a structured test plan and guidance for interpreting results and deciding what to try next.

中文简介正在准备中。当前显示英语简介。

  • Comparing signup button copy
  • Planning a pricing page experiment
  • Estimating sample size and test duration
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Turn LinkedIn profile URLs into coordinated account-based outreach. The workflow gathers profile details, enriches contacts with email and phone data, looks up mailing addresses, and prepares email, LinkedIn, and handwritten-letter touches with the specified services.

中文简介正在准备中。当前显示英语简介。

  • Building a multichannel campaign from LinkedIn prospect URLs
  • Enriching prospect records with work contact details
  • Coordinating email, LinkedIn, and handwritten mail outreach
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

accli

免费

Work with Apple Calendar on macOS to list calendars, find and view events, and check busy time slots across calendars. Create, update, or delete events with details such as dates, locations, and descriptions.

中文简介正在准备中。当前显示英语简介。

  • Reviewing events on a work or personal calendar
  • Checking availability before scheduling a meeting
  • Creating or updating a calendar event
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

查看 sundial-org 的全部技能

报告此技能的问题