/install copilot-usage
Copilot Usage Skill
Fetch and display GitHub Copilot premium request usage via the GitHub REST API.
Important API Limitations
The GitHub Billing API does not expose the plan quota (e.g., 50, 300, or 1500 requests/month). This information is not available in any endpoint. Therefore:
- The user must configure their plan once — stored in
~/.config/copilot-usage/config.json - On first run, the script detects missing config and prompts the user to set their plan
Explain this limitation clearly to the user when asking for their plan. Reference: https://docs.github.com/en/rest/billing/usage
Auth Requirements
- Requires
ghCLI authenticated with scopes:manage_billing:copilot+user - Fine-grained tokens are not supported by GitHub billing endpoints — classic PAT required
- Check:
gh auth status - Fix:
gh auth loginthengh auth refresh -s manage_billing:copilot
Usage
bash scripts/copilot-usage.sh # current month
bash scripts/copilot-usage.sh --month 3 --year 2026 # specific month
bash scripts/copilot-usage.sh --model claude # filter by model
bash scripts/copilot-usage.sh --json # raw JSON output
bash scripts/copilot-usage.sh --set-plan pro+ # configure plan
bash scripts/copilot-alert.sh --threshold 80 # quota alert check
Model Multipliers
The grossQuantity returned by the API already includes the multiplier. The script reverse-calculates the actual number of prompts sent and shows both values. See references/multipliers.md for the full table.
Key insight: actual_prompts = grossQuantity / multiplier
What the Dashboard Shows
- Monthly quota used vs. remaining (requires plan config)
- Progress bar with percentage
- Overage count and cost
- Per-model breakdown with multiplier, gross requests, and estimated actual prompts
- Days until monthly reset
- Warning if plan config is missing or stale
Config File
Stored at ~/.config/copilot-usage/config.json:
{
"plan": "pro+",
"quota": 1500,
"set_at": "2026-04-08"
}
Handling Errors
- 403 Forbidden — token lacks billing scope:
gh auth refresh -s manage_billing:copilot - 404 Not Found — verify endpoint path or plan eligibility (org/enterprise users must use org-level endpoints)
- Config missing — run
bash scripts/copilot-usage.sh --set-plan \x3Cplan>
API Endpoints
See references/api.md for full endpoint documentation and response schemas.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install copilot-usage - 安装完成后,直接呼叫该 Skill 的名称或使用
/copilot-usage触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Copilot Usage 是什么?
Display GitHub Copilot premium request usage, quota, billing stats, and per-model multipliers for the authenticated user. Use when the user asks about their... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 87 次。
如何安装 Copilot Usage?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install copilot-usage」即可一键安装,无需额外配置。
Copilot Usage 是免费的吗?
是的,Copilot Usage 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Copilot Usage 支持哪些平台?
Copilot Usage 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Copilot Usage?
由 Hitman86R(@hitman86r)开发并维护,当前版本 v1.0.0。