copilot-usage
Installation
SKILL.md
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