usage-costs

Report AI token usage and estimate USD costs from OpenClaw logs.

5|1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/netanel-abergel/pa-skills --skill usage-costs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: usage-costs
Source: https://github.com/netanel-abergel/pa-skills/tree/main/skills/usage-costs
Command: npx skills add https://github.com/netanel-abergel/pa-skills --skill usage-costs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates the guesswork around how many AI tokens have been consumed and what monetary cost they represent across sessions, cron jobs, and sub‑agents.

Core Features & Use Cases

  • Live Session Report – Pull current token counts from openclaw status --deep for the main session and cached data.
  • Cron History Report – Summarize input and output tokens from recent cron run logs to calculate daily spend.
  • Weekly & Session Summaries – Aggregate token usage from token-history.jsonl to provide per‑day breakdowns and per‑session cost estimates.
  • Provider‑Specific Pricing – Apply model‑specific rates (e.g., Claude Sonnet) to convert token counts into USD values.

Quick Start

Ask the assistant: “How much did today cost?”

Frequently Asked Questions about usage-costs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check AI token usage and calculate costs for an OpenClaw session?

To check AI token usage and calculate costs for an OpenClaw session, you can request a live session report. The system pulls current token counts from `openclaw status --deep` and applies model-specific pricing to estimate USD values.

How can I estimate daily AI spend from cron run logs?

You can estimate daily AI spend from cron run logs by generating a cron history report. The system summarizes input and output tokens from recent cron run logs and applies provider-specific rates to calculate the monetary cost.

Can I get a weekly breakdown of token usage and costs from token-history logs?

Yes, you can get a weekly breakdown of token usage and costs from token-history logs. The system aggregates data from `token-history.jsonl` to provide per-day token breakdowns and per-session USD cost estimates.

Does the cost estimation apply specific pricing rates for different AI models?

Yes, the cost estimation applies specific pricing rates for different AI models. It uses provider-specific rates, such as Claude Sonnet pricing, to convert raw token counts into accurate USD cost estimates.

What's the best way to track sub-agent token consumption and calculate the total cost?

The best way to track sub-agent token consumption and calculate total cost is by requesting a usage report. The system collects token counts via OpenClaw status commands and applies model-specific pricing to generate USD cost estimates for sub-agent activity.