Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Clawdbot Cost Tracker

ASecurity

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.

651 stars
0 votes
0 copies
6 views
Added 2/10/2026
databashnodeapi

Works with

api

Security Analysis

A100/100

Scanned 2/12/2026

Install to Claude Code

$npx -y skills add sundial-org/awesome-openclaw-skills --skill clawdbot-cost-tracker --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clawdbot Cost Tracker?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Clawdbot Cost Tracker
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sundial-org-clawdbot-cost-tracker/badge)](https://www.skillsdirectory.com/skills/sundial-org-clawdbot-cost-tracker)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: clawdbot-cost-tracker
description: 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.
---

# Clawdbot Cost Tracker

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

## Quick Start

### Get Current Usage

```bash
# 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):

| Model | Input | Output | Avg Ratio |
|-------|-------|--------|-----------|
| claude-opus-4-5 | $15 | $75 | 30/70 |
| claude-sonnet-4 | $3 | $15 | 30/70 |
| codex-mini-latest | $1 | $5 | 30/70 |
| gpt-4o | $2.5 | $10 | 30/70 |
| gpt-4o-mini | $0.15 | $0.6 | 30/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`:

```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.

```bash
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.

```bash
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

Attribution

sundial-orgsundial-org
View sourceMore from sundial-org →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Rank Tracker

This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.

1821 votes

Youtube Competitor Analyzer

Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...

31 votes

Twitter Algorithm Optimizer

Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.

742580 votes

Weather Fetcher

Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API

661090 votes

Weather

Get current weather and forecasts (no API key required).

480640 votes
View all in data →