codexbar
它能做什么
这个技能使用 CodexBar 命令行工具,读取 AI 服务账户中的用量限额和剩余额度。适合想了解自己的 AI 套餐还剩多少的人。
适用场景
- ✓你询问 Codex、Claude 或其他 AI 服务还剩多少用量的时候。
- ✓你想查看速率限制或剩余额度的时候。
- ✓你想知道用量限额何时重置的时候。
技能链接
https://github.com/steipete/agent-scripts/blob/main/skills/codexbar/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我查一下 Claude 还剩多少用量,我的限额什么时候重置?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会运行 CodexBar 工具,它会读取已有的登录会话或命令行登录,然后报告限额和重置时间。命令中不会输入任何密钥。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
CodexBar
Use this when asked about AI subscription usage, rate limits, remaining credits, or "how much Codex/Claude/Kimi do I have left".
CLI
- Binary:
codexbar(Homebrew) - Default invocation honors the in-app provider toggles:
codexbar usage
codexbar usage --format json
- Specific provider (
--provideraccepts codex, claude, kimi, gemini, copilot, cursor, openrouter, and many more — seecodexbar --help):
codexbar usage --provider codex --json
codexbar usage --provider claude --json
- Multiple accounts:
--account <label>,--account-index <n>, or--all-accounts(single provider only).
Auth model
Provider fetches ride existing sessions — OAuth caches, CLI credentials, or browser cookies. No secrets are passed on the command line.
- Codex: OpenAI web dashboard via oauth; falls back to Codex CLI.
- Claude: claude.ai API via browser session cookie; falls back to Claude CLI. "No Claude session key found in browser cookies" means log in to claude.ai in a supported browser (or rely on the CLI fallback).
- Token-based providers read the CodexBar config file.
Dashboard endpoints
The menu bar app serves its dashboard on loopback. The page pulls
/dashboard/v1/snapshot and /cost; there is no /api/* namespace, so those
paths 404 rather than telling you that you guessed. The snapshot endpoint
requires auth, so when the CLI is unavailable the quickest honest check is to
open the dashboard in a browser.
usage --all-accounts polls every account serially and takes well over ninety
seconds. If it produces zero bytes on both stdout and stderr, it is not slow,
it is blocked: the CLI is a helper inside CodexBar.app, and a pending macOS
Gatekeeper prompt stops it dead with no output. Screenshot the screen before
debugging the command.
Interpreting output
- Errors for providers that were never configured are noise, not failures — only report providers the user actually uses.
- Report percentage left, pace vs. expected, and reset time; the pace line ("in deficit"/"in reserve") is the actionable bit.
- Claude rows read
claude-swapstored backups, which produces two confusing readings. The currently active slot shows as having no stored credentials, because the live login is anactive profileand its backup only materialises when you switch away. Andclaude-swapkeeps alast seenpercentage that keeps rendering for accounts whose credentials are gone, so a dead account can read as healthy for days. A plausible percentage is not proof of a working credential; onlyrefresh token yesinclaude-swap list --token-statusis.
常见问题
它需要我的密码吗?
不需要。服务查询使用已有的登录会话,命令行中不放任何密钥。
如果 Claude 提示找不到会话密钥怎么办?
技能建议你在受支持的浏览器中登录 claude.ai,或使用命令行的备用方式。
它能检查多个账户吗?
可以。它可以按标签或序号选择账户,也可以检查某个服务商的全部账户。
详情
作者的原始描述
AI service usage/quota via CodexBar CLI: Codex/OpenAI, Claude, Kimi and other provider limits, credits, reset times.
repo: steipete/agent-scripts
热度
- GitHub 星标
- 7.4k
- 排名
- #13229
- 许可证
- MIT
- 更新时间
- 2026/10/30
评论
- …
同一仓库的更多技能
beeper
7.4k帮你的智能体搜索本地 Beeper 聊天记录,找到消息,并判断模糊线索指的是哪个聊天或联系人。
cloudflare-registrar
7.4k帮你的智能体查询 Cloudflare Registrar 的域名价格和可用性,并在确认后注册或列出域名。
create-cli
7.4k帮你的智能体设计命令行工具的命令、参数、帮助文本、输出和错误提示,让人和脚本都能顺利使用。
frontend-design
7.4k帮你的智能体构建有独特风格、质量过硬的网页界面,给出清晰的设计方向,避免千篇一律的 AI 式布局。