跳到正文
Skillpedia
智能体7.4k · #13229

codexbar

它能做什么

这个技能使用 CodexBar 命令行工具,读取 AI 服务账户中的用量限额和剩余额度。适合想了解自己的 AI 套餐还剩多少的人。

适用场景

  • ✓你询问 Codex、Claude 或其他 AI 服务还剩多少用量的时候。
  • ✓你想查看速率限制或剩余额度的时候。
  • ✓你想知道用量限额何时重置的时候。

技能链接

https://github.com/steipete/agent-scripts/blob/main/skills/codexbar/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/steipete/agent-scripts/blob/main/skills/codexbar/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 (--provider accepts codex, claude, kimi, gemini, copilot, cursor, openrouter, and many more — see codexbar --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-swap stored backups, which produces two confusing readings. The currently active slot shows as having no stored credentials, because the live login is an active profile and its backup only materialises when you switch away. And claude-swap keeps a last seen percentage 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; only refresh token yes in claude-swap list --token-status is.
常见问题

它需要我的密码吗?

不需要。服务查询使用已有的登录会话,命令行中不放任何密钥。

如果 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能