Copilot Usage Skill for Openclaw

A specialized monitoring tool to track GitHub Copilot premium request usage, monthly quotas, and per-model billing statistics via the GitHub CLI.

hitman86r
v1.0.0
Apr 9, 2026
0
784
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install copilot-usage

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install copilot-usage using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Copilot Usage Skill?

The Copilot Usage Skill is a technical utility designed to bridge the gap in GitHub's native billing visibility. It enables developers to fetch real-time data regarding their Copilot premium request consumption, quota status, and overage costs directly from the command line. By integrating this into your Openclaw Skills collection, you gain a transparent dashboard that simplifies complex billing data.

Since the GitHub API does not natively expose specific plan quotas, this skill implements a local configuration system to track your progress against Free, Pro, Pro+, Business, or Enterprise limits. It provides a detailed breakdown of model-specific multipliers, ensuring you understand exactly how different LLMs impact your monthly usage and remaining balance.

Copilot Usage Skill Use Cases

  • Monitoring monthly Copilot premium request consumption to avoid unexpected overages.
  • Generating a usage report to see which AI models (like Claude or GPT-4o) are consuming the most quota.
  • Setting up automated alerts when usage crosses a specific percentage threshold.
  • Auditing billing stats for GitHub Business or Enterprise accounts to manage seats effectively.
  • Troubleshooting 403 Forbidden errors related to GitHub CLI billing scopes.

How Copilot Usage Skill Works

  1. The user authenticates the GitHub CLI (gh) with the mandatory manage_billing:copilot and user scopes.
  2. On the first execution, the skill identifies the absence of a local configuration and prompts the user to define their Copilot plan.
  3. The skill queries the GitHub REST API billing endpoints to retrieve grossQuantity data for the current or specified billing cycle.
  4. It applies reverse-calculation logic to the API response to determine actual prompt counts vs. weighted multiplier counts.
  5. A formatted dashboard is rendered in the terminal, displaying a progress bar, days until reset, and a model-by-model breakdown.

Copilot Usage Skill Setup

Ensure you have the GitHub CLI installed and authenticated. This skill requires a classic PAT as fine-grained tokens are not supported by billing endpoints.

# Authenticate with required scopes
gh auth login
gh auth refresh -s manage_billing:copilot

# Configure your specific Copilot plan (e.g., pro, pro+, business)
bash scripts/copilot-usage.sh --set-plan pro+

# Run the usage dashboard
bash scripts/copilot-usage.sh

Copilot Usage Skill Data Schema & Taxonomy

The skill manages persistent configuration and interprets GitHub API responses using the following structure:

Local Configuration

Stored at ~/.config/copilot-usage/config.json:

Key Type Description
plan String The GitHub Copilot plan type (e.g., pro+).
quota Integer The total monthly request limit for the plan.
set_at String ISO timestamp of when the plan was configured.

API Calculations

  • Actual Prompts: Calculated as grossQuantity / multiplier.
  • Billing Cycle: Filterable by --month and --year parameters.

Copilot Usage Skill Advanced Features

  • Multi-model transparency: Automatically calculates actual prompt counts by reversing GitHub model multipliers.
  • Automated threshold alerts: Use the copilot-alert.sh script to trigger notifications when reaching specific usage percentages.
  • JSON Export: Support for --json flags to pipe usage data into other Openclaw Skills or data pipelines.
  • Custom Billing Windows: Ability to query historical data for specific months and years to track usage trends over time.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*