Codex Reset Credit Monitor
Use this skill to manage a local reset-credit monitor for Codex.
Quick Start
When the user invokes $codex-reset-credit-monitor, decide the operation from the request:
- If the user invokes only
$codex-reset-credit-monitor with no extra instruction, run status.
- If the user invokes the skill with only a duration such as
10h, 1d, 10hours, or 10小时, install the scheduled task at that interval.
- Current count or expiry-time request: run
status.
- Record the current state or update history: run
snapshot.
- Explain recent changes: run
history or explain.
- Generate wrapper scripts or customize polling interval: run
task generate --hours N.
- Install, inspect, run, or remove the scheduled task: run the matching
task command. task install --hours N regenerates wrapper scripts before registering the task.
Bundled script commands:
$script = "$env:CODEX_HOME\skills\codex-reset-credit-monitor\scripts\reset_credit_monitor.py"
python $script
python $script 10h
python $script status
python $script snapshot
python $script history --days 30
python $script explain --days 30
python $script task generate --hours 6
python $script task generate --every 1d
python $script task install --hours 6
python $script task install --every 10小时
python $script task status
python $script task remove
If CODEX_HOME is not set, use your Codex home directory, usually ~/.codex.
Responsibilities
- Query current Codex reset credits from
https://chatgpt.com/backend-api/wham/rate-limit-reset-credits.
- Query current Codex usage windows from
https://chatgpt.com/backend-api/wham/usage.
- Write sanitized snapshots under
$CODEX_HOME\status_snapshots\reset_credit_monitor.
- Explain history changes from local JSONL snapshots.
- Generate local wrapper scripts for Windows Task Scheduler.
- Install, inspect, run, or remove the Windows Scheduled Task
CodexResetCreditMonitor.
- Render status output as a decision-oriented report with a conclusion, reset-credit table, usage-window table, and recommendations.
- Generated task wrappers preserve proxy environment variables when present and pause after printing the report so a user-triggered task window can be inspected.
Safety Rules
- Do not print tokens, raw
auth.json, mailbox address, user id, or account id.
- Treat the backend request as read-only; never redeem reset credits.
- For status output, prefer concise user-facing recommendations over raw field dumps.
- Prefer a 6-hour task interval unless the user explicitly asks otherwise.
- Accept user-defined intervals with
--hours N or duration expressions such as 10h, 1d, 10hours, 10小时; allowed range is 1 to 168 hours.
- Do not use Codex automations for periodic polling unless the user explicitly requests that; Windows Task Scheduler avoids model/token usage.
Output Files
Default output directory:
$CODEX_HOME\status_snapshots\reset_credit_monitor
Files:
latest.json: latest sanitized snapshot.
history.jsonl: append-only sanitized snapshot history.
monitor.log: task execution log lines.
task\run_monitor.cmd: wrapper script executed by Windows Task Scheduler.
task\install_task.ps1: generated install helper.
task\remove_task.ps1: generated remove helper.
task\task_config.json: generated task configuration metadata.
1---2name: codex-reset-credit-monitor3description: Monitor Codex usage-limit reset credits and manage a low-cost Windows Scheduled Task that periodically queries current reset-credit count, expiry times, local usage windows, snapshot history, and warning state. Use when the user asks to check Codex reset opportunities, see expiry times, explain reset-credit history, install or maintain a scheduled monitor, or troubleshoot the reset-credit monitoring task.4---56# Codex Reset Credit Monitor78Use this skill to manage a local reset-credit monitor for Codex.910## Quick Start1112When the user invokes `$codex-reset-credit-monitor`, decide the operation from the request:1314- If the user invokes only `$codex-reset-credit-monitor` with no extra instruction, run `status`.15- If the user invokes the skill with only a duration such as `10h`, `1d`, `10hours`, or `10小时`, install the scheduled task at that interval.16- Current count or expiry-time request: run `status`.17- Record the current state or update history: run `snapshot`.18- Explain recent changes: run `history` or `explain`.19- Generate wrapper scripts or customize polling interval: run `task generate --hours N`.20- Install, inspect, run, or remove the scheduled task: run the matching `task` command. `task install --hours N` regenerates wrapper scripts before registering the task.2122Bundled script commands:2324```powershell25$script = "$env:CODEX_HOME\skills\codex-reset-credit-monitor\scripts\reset_credit_monitor.py"26python $script27python $script 10h28python $script status29python $script snapshot30python $script history --days 3031python $script explain --days 3032python $script task generate --hours 633python $script task generate --every 1d34python $script task install --hours 635python $script task install --every 10小时36python $script task status37python $script task remove38```3940If `CODEX_HOME` is not set, use your Codex home directory, usually `~/.codex`.4142## Responsibilities4344- Query current Codex reset credits from `https://chatgpt.com/backend-api/wham/rate-limit-reset-credits`.45- Query current Codex usage windows from `https://chatgpt.com/backend-api/wham/usage`.46- Write sanitized snapshots under `$CODEX_HOME\status_snapshots\reset_credit_monitor`.47- Explain history changes from local JSONL snapshots.48- Generate local wrapper scripts for Windows Task Scheduler.49- Install, inspect, run, or remove the Windows Scheduled Task `CodexResetCreditMonitor`.50- Render status output as a decision-oriented report with a conclusion, reset-credit table, usage-window table, and recommendations.51- Generated task wrappers preserve proxy environment variables when present and pause after printing the report so a user-triggered task window can be inspected.5253## Safety Rules5455- Do not print tokens, raw `auth.json`, mailbox address, user id, or account id.56- Treat the backend request as read-only; never redeem reset credits.57- For status output, prefer concise user-facing recommendations over raw field dumps.58- Prefer a 6-hour task interval unless the user explicitly asks otherwise.59- Accept user-defined intervals with `--hours N` or duration expressions such as `10h`, `1d`, `10hours`, `10小时`; allowed range is 1 to 168 hours.60- Do not use Codex automations for periodic polling unless the user explicitly requests that; Windows Task Scheduler avoids model/token usage.6162## Output Files6364Default output directory:6566```text67$CODEX_HOME\status_snapshots\reset_credit_monitor68```6970Files:7172- `latest.json`: latest sanitized snapshot.73- `history.jsonl`: append-only sanitized snapshot history.74- `monitor.log`: task execution log lines.75- `task\run_monitor.cmd`: wrapper script executed by Windows Task Scheduler.76- `task\install_task.ps1`: generated install helper.77- `task\remove_task.ps1`: generated remove helper.78- `task\task_config.json`: generated task configuration metadata.