Install
$ agentstack add skill-snowylake-snowy-agent-skills-codex-reset-credits ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
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 摘要.
执行流程
- 说明本操作会读取本机
~/.codex/auth.json并访问chatgpt.com; 不要输出 access token. - 运行脚本:
python scripts/check_reset_credits.py
- 如果当前 shell 不是 skill 目录, 使用脚本的完整路径运行.
- 如果运行环境限制网络, 文件系统或远程认证访问, 按当前宿主的权限流程请求必要授权后重试.
- 将脚本输出转述给用户. 默认输出已经脱敏, 且按
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_token或account_id缺失: 说明 auth 文件结构与预期不一致, 不要猜测 token 位置; 可在不输出敏感值的前提下检查顶层键名.401或403: 说明登录态可能过期, 账户不匹配, 或后端权限拒绝; 建议用户重新登录 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.
- Author: SnowyLake
- Source: SnowyLake/snowy-agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.