# Usage Analysis

> Read and analyze live OpenAI Codex account usage limits from the local authenticated app server. For users of the OpenAI Codex app/CLI only. Use when the agent needs to report current 5-hour or weekly usage, reset times, average weekly percentage used per elapsed day, sustainable percentage remaining per day, pace against the window, or available reset credits without opening the GUI.

- Skill: `dreamers-laboratory/usage-analysis` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add dreamers-laboratory/usage-analysis`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dreamers-laboratory/usage-analysis/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: dreamers-laboratory (https://skillmd.com/u/dreamers-laboratory)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/dreamers-laboratory/usage-analysis

---


# Codex Usage Analysis

Run `python3 scripts/report_usage.py` and return its result tersely: answer first, preserve every number, explain only material caveats, then stop.

## Rules

- Use the local authenticated `account/rateLimits/read` app-server method. Never inspect, print, or copy authentication tokens.
- Identify windows by `windowDurationMins`: `300` is 5 hours and `10080` is 7 days. Do not assume `primary` or `secondary` always maps to one duration.
- Keep general and model-specific limit buckets separate. Never combine percentages from different pools.
- For each weekly window report:
  - used and remaining percentage;
  - elapsed and remaining days;
  - average used per elapsed day: `usedPercent / elapsedDays`;
  - sustainable remaining per day: `(100 - usedPercent) / remainingDays`;
  - **the even-usage target explicitly:** `100 * elapsedDays / (elapsedDays + remainingDays)` percent used by now, and `100 / (elapsedDays + remainingDays)` percent per day across the full weekly window;
  - actual points ahead of or behind that target: `usedPercent - evenUsageTarget`. Say the target in prose, rather than only reporting "N points over/under even pace."
- For each 5-hour window report used, remaining, and reset time. Say `not reported` when a pool has no 5-hour window.
- Treat backend `resetsAt` as authoritative. Do not describe a window as fixed or rolling unless current official documentation establishes that behavior.
- Percentages are backend-rounded integers; derived pace values are estimates. Use the machine's local timezone unless the user requests another.
- Mention available reset-credit count, but never redeem one without explicit authorization.
- If the sandbox blocks the local state runtime, request scoped permission to run this script. Do not work around it by extracting credentials.

Use `python3 scripts/report_usage.py --json` when another tool needs structured output.

