Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add uvwt/agentdock-skills --skill grok-quotagit clone --depth 1 https://github.com/uvwt/agentdock-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/uvwt/agentdock-skills/grok-quota)<a href="https://agentmods.dev/skills/uvwt/agentdock-skills/grok-quota"><img src="https://agentmods.dev/badge/skills/uvwt/agentdock-skills/grok-quota/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/uvwt/agentdock-skills/grok-quota"><img src="https://agentmods.dev/badge/skills/uvwt/agentdock-skills/grok-quota.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.01248 |
| Opus 5 | $0.00019 | $0.00624 |
| Sonnet 5 | $0.00008 | $0.00250 |
| Haiku 4.5 | $0.00004 | $0.00125 |
Grade A, and why
grok-quota scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Grok Quota
查询 Grok Build / GrokChat 的详细额度、套餐、周周期和月度积分。实现跟随 CPA 管理面板当前使用的 xAI Billing 协议。
动作
status:只读扫描本机 xAI OAuth 凭据,返回脱敏账号引用、token/refresh token 是否存在及过期状态;不发起额度请求。query:优先调用两条只读 Billing 接口并合并结果;正常情况下不发起模型请求,也不消耗模型 token。只有 Billing 接口不可用时,才回退到最小 Responses 探测。
额度语义
CPA 新版管理面板会并行读取:
GET https://cli-chat-proxy.grok.com/v1/billing?format=credits- 周期类型、周限额已用比例、周期开始/结束时间。
productUsage中的 GrokChat、GrokBuild 等产品已用比例。
GET https://cli-chat-proxy.grok.com/v1/billing- 月度积分上限、已用积分、账期开始/结束时间。
- 按量付费上限和已用金额。
Skill 合并两条响应并返回:
- 套餐:当前已知
US$150对应 SuperGrok,US$1500对应 SuperGrok Heavy。 - 周限额:已用百分比、剩余百分比和重置时间。
- 产品拆分:GrokChat、GrokBuild 等各自已用/剩余百分比。
- 月度积分:已用、上限、剩余的美分和美元值,以及账期重置时间。
- 按量付费:是否启用、上限、已用和剩余金额。
当两条 Billing 接口均无法提供有效数据时,query 才向 /v1/responses 发起一个最小请求。回退探测只用于判断可用性或解析 429 中的 subscription:free-usage-exhausted,可能消耗少量 token;此时会明确返回 exact_details_available=false。
凭据来源
Skill 不接受 access token、refresh token 或 Cookie 作为输入。它只从外部 JSON auth 文件读取 xAI OAuth 凭据。
支持以下凭据来源:
- 官方 Grok Build CLI:
$GROK_HOME/auth.json或当前系统用户的~/.grok/auth.json。 - 输入
auth_file:一个绝对 JSON 文件路径。 - 输入
auth_dir:一个绝对目录路径。 - 环境变量
GROK_QUOTA_AUTH_FILE。 - 环境变量
GROK_QUOTA_AUTH_DIR或CLIPROXY_AUTH_DIR。 - 未配置显式来源时,扫描
~/.cli-proxy-api/与~/.config/cli-proxy-api/。
即使已经配置 CPA auth 目录,Skill 仍会同时检查官方 Grok Build CLI 的 auth.json。多个账号时,先运行 status 获取脱敏 account_ref,再把该值传给 query。OAuth access token 过期时,Skill 可使用 auth 文件中的 refresh token 和对应 OIDC client ID 在内存中刷新一次,但不会改写原文件。
推荐通过 Skill 独立环境配置 CPA auth 目录:
GROK_QUOTA_AUTH_DIR=/path/to/cli-proxy-api/auths
输入示例
状态检查:
{
"skill_action": "status"
}
查询唯一账号:
{
"skill_action": "query"
}
指定账号与回退探测模型:
{
"skill_action": "query",
"account_ref": "脱敏账号引用",
"model": "grok-4.5",
"timeout_seconds": 20
}
安全边界
- 不在输入、输出、日志或 Skill 包中保存/返回 access token、refresh token、ID token、Authorization header、邮箱、subject 或原始文件名。
- 账号只使用稳定的短哈希
account_ref表示。 - 带凭据的额度请求只允许访问固定的
cli-chat-proxy.grok.com/v1/billing、/v1/billing?format=credits和回退/v1/responses;OAuth 刷新只允许访问 xAI OIDC discovery 返回的*.x.aiHTTPS endpoint。 - OAuth 刷新只在内存中生效,不修改 CLIProxyAPI 登录态。
- 不读取非 xAI/Grok 类型的 auth 文件。
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 109 lines · 38 tokens per session scan A 6b4413ac870d
grok-quota is a skill published in the GitHub repository uvwt/agentdock-skills (3 stars, last pushed 11d ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,248 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
stock-liquidity
Analyze stock liquidity using bid-ask spreads, volume profiles, order book depth, market impact estimates, and turnover ratios via Yahoo Finance data. Use this skill whenever the user asks about liquidity, trading costs, bid-ask spread, market depth, volume analysis, slippage, market impact, turnover ratio, or how…
company-valuation
Estimate the intrinsic value of a public company using DCF, relative (peer multiple) and sum-of-parts (SOTP) methods, then triangulate to an implied share price with upside/downside versus the current market price. Use this skill whenever the user asks: "what is AAPL worth", "valuation of NVDA", "fair value of TSLA"…
fintel-data
Query Fintel (fintel.io) institutional market intelligence via the REST API at https://api.fintel.io/v1 with FINTELAPIKEY (X-API-KEY header), or the official MCP server at https://mcp.fintel.io/mcp. Read-only data: short interest, borrow rate/fee and shares available to borrow, daily short volume, fails-to-deliver…
estimate-analysis
Deep-dive into analyst estimates and revision trends for any stock using Yahoo Finance data. Use when the user wants to understand analyst estimate direction, how EPS or revenue forecasts changed over time, compare estimate distributions, or analyze growth projections across periods. Triggers: "estimate analysis for…
earnings-preview
Generate a pre-earnings briefing for any stock using Yahoo Finance data. Use this skill whenever the user wants to prepare for an upcoming earnings report, understand what analysts expect, review a company's beat/miss track record, or get a quick overview before an earnings call. Triggers include: "earnings preview…
earnings-recap
Generate a post-earnings analysis for any stock using Yahoo Finance data. Use when the user wants to review what happened after earnings, understand beat/miss results, see stock reaction, or get an earnings recap. Triggers: "AAPL earnings recap", "how did TSLA earnings go", "MSFT earnings results", "did NVDA beat…