AgentStack
SKILL verified MIT Self-run

Codex Reset Credits

skill-snowylake-snowy-agent-skills-codex-reset-credits · by SnowyLake

Query the current Codex account's available rate limit reset credits and expiration times.

No reviews yet
0 installs
13 views
0.0% view→install

Install

$ agentstack add skill-snowylake-snowy-agent-skills-codex-reset-credits

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Codex Reset Credits? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Codex Reset Credits

目录

  • [概览](#概览)
  • [执行流程](#执行流程)
  • [输出要求](#输出要求)
  • [故障处理](#故障处理)

概览

查询当前机器上 Codex Desktop 登录账户的 rate limit reset credits, 包括可用数量, 获取时间, 过期时间, 兑换状态和来源标识.

优先使用 scripts/check_reset_credits.py, 它会从 ~/.codex/auth.json 读取当前 Codex 登录态, 调用 https://chatgpt.com/backend-api/wham/rate-limit-reset-credits, 并默认输出脱敏后的 Markdown 摘要.

执行流程

  1. 说明本操作会读取本机 ~/.codex/auth.json 并访问 chatgpt.com; 不要输出 access token.
  2. 运行脚本:
python scripts/check_reset_credits.py
  1. 如果当前 shell 不是 skill 目录, 使用脚本的完整路径运行.
  2. 如果运行环境限制网络, 文件系统或远程认证访问, 按当前宿主的权限流程请求必要授权后重试.
  3. 将脚本输出转述给用户. 默认输出已经脱敏, 且按 expires_at 从近到远排序.

可选参数:

  • --raw: 输出后端原始 JSON. 只有在用户明确需要排查接口字段时使用, 因为原始响应可能包含邮箱, 头像 URL 或用户标识.
  • --json: 输出脱敏后的 JSON 摘要, 适合需要机器读取时使用.
  • --auth PATH: 指定其他 auth.json 路径.
  • --timeout SECONDS: 调整请求超时时间.

输出要求

  • 不要输出或记录 access_token.
  • 默认不要展示完整 credit id; 如果用户需要排查, 只展示末尾 8 到 12 位即可.
  • 默认输出以下格式:
Available reset credit count: 2
Total earned count: 1

| 序号 | 状态 | 过期时间 (UTC+8) | 来源 |
| --- | --- | --- | --- |
| 1 | available | 2026-07-15 02:25:39 | @example |
  • 过期时间按当前设备本地时区显示, 表头自动标注 UTC offset, 格式为 YYYY-MM-DD HH:MM:SS.
  • 如果 status 不是 available, 保留该状态, 不要把它计入可用机会.
  • 不要把此接口当成稳定公开 API. 如果字段缺失或响应格式变化, 如实说明并展示可确认字段.

故障处理

  • ~/.codex/auth.json 不存在: 告诉用户当前机器没有可用 Codex 登录态, 需要先登录 Codex Desktop.
  • access_tokenaccount_id 缺失: 说明 auth 文件结构与预期不一致, 不要猜测 token 位置; 可在不输出敏感值的前提下检查顶层键名.
  • 401403: 说明登录态可能过期, 账户不匹配, 或后端权限拒绝; 建议用户重新登录 Codex Desktop 后重试.
  • 网络, DNS 或超时错误: 说明是访问 chatgpt.com 失败, 可稍后重试或在允许网络访问的环境中运行.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.