← ClaudeAtlas

costlisted

Report token usage and USD cost for AI agent sessions by parsing logs from pi, Claude Code, OpenAI Codex, opencode, and Hermes Agent. Prices are auto-refreshed weekly from the LiteLLM catalog. Use when the user asks about cost, spend, token usage, "how much did this session cost", or invokes /cost.
gaia-research/skill-cost · ★ 2 · AI & Automation · score 71
Install: claude install-skill gaia-research/skill-cost
# cost — Multi-Harness Token Cost Report Reads session usage records written by AI agent harnesses on this machine and reports persisted token usage plus a **public-rate USD estimate** per session. Prices come from [BerriAI/litellm](https://github.com/BerriAI/litellm)'s canonical `model_prices_and_context_window.json` catalog and auto-refresh weekly. ## Supported harnesses Auto-detected from `~`: | Harness | Session storage | |--------------|-----------------------------------------| | pi | `~/.pi/agent/sessions/**/*.jsonl` | | Claude Code | `~/.claude/projects/**/*.jsonl` | | OpenAI Codex | `~/.codex/sessions/**/*.jsonl` | | opencode | `~/.local/share/opencode/**/*.jsonl` | | Hermes Agent | `$HERMES_HOME/state.db` | Hermes is read through SQLite in `mode=ro`. The parser queries only `sessions` and `session_model_usage`; it never reads transcript rows from `messages`. Adding a new line-oriented harness = one small `parse_*` function in `cost.py`. ## Run ```bash # [default] the newest logical session across all harnesses python3 cost.py # Latest session per harness in current cwd python3 cost.py --latest # Every session across every harness python3 cost.py --all --list # Today only, per-model breakdown python3 cost.py --today --by-model # Since a date, one harness only python3 cost.py --since 2026-07-01 --harness claude-code python3 cost.py --harness hermes # Filter by working di