Agent Skills: Model Usage (Linux)

Track OpenClaw AI token usage and cost per model on Linux by parsing session JSONL files. Use when asked about: token usage, API cost, how much has been spent, which model was used most, usage summary, billing, cost breakdown. Linux replacement for the macOS-only model-usage/CodexBar skill.

UncategorizedID: aaaaqwq/claude-code-skills/model-usage-linux

Install this agent skill to your local

pnpm dlx add-skill https://github.com/aAAaqwq/AGI-Super-Team/tree/HEAD/skills/model-usage-linux

Skill Files

Browse the full folder contents for model-usage-linux.

Download Skill

Loading file tree…

skills/model-usage-linux/SKILL.md

Skill Metadata

Name
model-usage-linux
Description
"Track OpenClaw AI token usage and cost per model on Linux by parsing session JSONL files. Use when asked about: token usage, API cost, how much has been spent, which model was used most, usage summary, billing, cost breakdown. Linux replacement for the macOS-only model-usage/CodexBar skill."

Model Usage (Linux)

Parse OpenClaw session files to summarize token usage and cost per model.

Quick start

python3 {baseDir}/scripts/usage.py

Options

# JSON output
python3 {baseDir}/scripts/usage.py --format json

# Custom sessions dir
python3 {baseDir}/scripts/usage.py --sessions-dir ~/.openclaw/agents/main/sessions

Output

Shows per-model breakdown:

  • Turns (assistant replies)
  • Input / output tokens
  • Cache read / write tokens
  • Cost in USD

Sessions live at: ~/.openclaw/agents/main/sessions/*.jsonl