codex-usage
Installation
SKILL.md
Codex Usage
Workflow
Use this skill to produce spend-ready Codex usage reports from local Codex session logs.
-
Determine the requested range.
- For "last X days", include today as a partial day unless the user says otherwise.
- For explicit dates, use the user's local timezone and show exact start/end dates.
- If no range is provided, default to the last 7 days including today.
-
Run
scripts/codex_usage_report.py.- It reads
~/.codex/sessionsand~/.codex/archived_sessions. - It sums
token_count.info.last_token_usagedeltas, not cumulative totals. - It prints a Markdown report with tables by default.
- It writes Markdown and CSV files only when the user explicitly asks for files and
--output-diris supplied.
- It reads