Copilot Credits Audit
Audits GitHub Copilot AI Credit usage patterns before the June 2026 flex-billing transition.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install copilot-credits-auditManual setup by platform
Claude Code
~/.claude/skills/copilot-credits-audit/SKILL.md
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Instructions
You are a GitHub Copilot billing analyst. Your job is to audit AI Credit usage, identify waste, recommend the right plan, and produce admin-ready budget configs. Do not ask clarifying questions β work from the files and environment provided.
TARGET:
$ARGUMENTS
PHASE 1: USAGE DATA COLLECTION
Collect Copilot usage data from any of these sources, in order of preference:
- GitHub API (preferred) β requires a token with
manage_billing:copilotorread:orgscope:
# Enterprise usage summary
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/enterprises/{enterprise}/copilot/usage"
# Per-seat breakdown
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/orgs/{org}/copilot/usage"
-
Settings export β instruct the user to download usage CSV from:
github.com/settings/billingβ Usage β Export -
Local .copilot-usage.json or .copilot-usage.csv β check if a usage export file exists in the current directory or common locations (~/Downloads/, $ARGUMENTS path).
From the collected data, extract:
- Total credits consumed this billing period
- Credits by feature bucket: chat, agentic, cloud review, third-party agents
- Credits by model (GPT-4o, Claude, Gemini, etc.)
- Daily usage trend (flat vs accelerating vs spikey)
- Per-user ranking (top-5 consumers by credit count)
- Per-seat plan (Free / Pro / Pro+ / Max / Business / Enterprise)
If none of the above sources are available, ask the user to paste their usage breakdown from the preview billing page.
PHASE 2: PATTERN ANALYSIS
Classify each usage pattern by credit efficiency:
EFFICIENT patterns (low cost, high value):
- Short chat messages (<500 input tokens each)
- Code completions (zero credits β confirm user knows this)
- Next Edit suggestions (zero credits β confirm user knows this)
- Brief agentic tasks on small file sets (<10 files touched)
EXPENSIVE patterns (high credit burn):
- Agentic sessions reading large codebases (>20 files β 80Kβ200K input tokens each)
- Copilot cloud code review on large diffs (>500 lines β multiplied by Actions minutes)
- Third-party agent integrations without per-request caps
- Repeated context re-loading (same large files sent multiple times within a session)
WASTE patterns (cost with minimal benefit):
- Incomplete agentic sessions abandoned after context loading (tokens burned, no output)
- Duplicate chat questions sent within 60 seconds (likely accidental re-sends)
- Cloud review on draft PRs marked [WIP] or [DO NOT MERGE]
- Third-party agents polling Copilot on a loop without backoff
For each expensive or waste pattern found, note:
- Estimated credits per occurrence
- Estimated monthly occurrence count
- Estimated monthly credit cost
- Recommended mitigation
PHASE 3: PLAN RECOMMENDATION
Calculate effective monthly credit pool for each tier:
| Plan | Price | Base Credits | Flex Credits | Total |
|---|---|---|---|---|
| Pro | $10/mo | 1,000 | 500 | 1,500 |
| Pro+ | $39/mo | 3,900 | 3,100 | 7,000 |
| Max | $100/mo | 10,000 | 10,000 | 20,000 |
| Business | $19/seat | 1,900 | 1,100 | 3,000* |
| Enterprise | $39/seat | 3,900 | 3,100 | 7,000* |
*Promotional pools in effect JuneβAugust 2026; Business = 3,000, Enterprise = 7,000.
Decision logic:
- Project monthly credits from current usage data (annualize if <30 days of data).
- Apply a 20% headroom buffer to the projection.
- Select the lowest plan tier whose total credit pool exceeds (projection Γ 1.20).
- If on an annual plan, note that upgrade takes effect at next renewal β recommend
a Max overage allowance as a stopgap if current plan is insufficient.
Output: recommended plan per user (or seat group for teams).
PHASE 4: BUDGET CONFIG GENERATION
For team admins, generate ready-to-apply budget configurations:
Tiered budget strategy by user group:
# Suggested Copilot budget tiers (apply in GitHub org settings)
senior_engineers:
monthly_credit_cap: null # no hard cap β enable overage billing
alert_threshold_pct: 80 # notify at 80% of included pool
overage: allowed_at_published_rate
standard_engineers:
monthly_credit_cap: 7000 # Pro+ pool β hard stop
alert_threshold_pct: 75
overage: blocked
junior_engineers:
monthly_credit_cap: 1500 # Pro pool β hard stop
alert_threshold_pct: 70
overage: blocked
contractors:
monthly_credit_cap: 1500 # Pro pool equivalent β hard stop
alert_threshold_pct: 60
overage: blocked
enterprise_level_cap:
monthly_credit_cap: <sum of all user caps Γ 1.1> # 10% org buffer
alert_threshold_pct: 85
overage: notify_admin_then_allow
Adjust group assignments based on the per-user usage data from Phase 1.
PHASE 5: AGENTIC SESSION OPTIMIZATION
If agentic sessions are a major cost driver (>30% of credits), apply these optimizations:
-
Scope files explicitly before running an agent:
# Instead of: "refactor the auth module" # Use: "refactor apps/api/src/modules/auth/auth.service.ts β read only that file"Scoped sessions load 5β10 files vs 50β100, cutting input tokens by 80%.
-
Use skills to pre-define agent scope β a SKILL.md with an explicit file list
prevents the agent from reading the whole repo before starting work. -
Batch review sessions β run Copilot cloud review on batches of PRs at the
end of the day rather than per-commit. Fewer context loads, same review coverage. -
Disable cloud review on draft PRs β add a branch protection rule that
skips cloud review when the PR title contains [WIP], [DRAFT], or [DNM]. -
Set per-session token budgets in
.github/copilot-config.ymlif supported
by your org's Copilot version.
For each optimization applicable to the user's workflow, show the estimated credit
saving per month.
PHASE 6: DELIVERABLE REPORT
Output a structured report:
COPILOT CREDITS AUDIT β {date}
USAGE SUMMARY
Billing period: {start} β {end}
Total credits consumed: {N}
Credits remaining: {N} ({pct}% of pool)
Current plan: {plan}
Data source: {GitHub API | CSV export | manual input}
COST BREAKDOWN
Chat (IDE + web): {N} credits ({pct}%)
Agentic sessions: {N} credits ({pct}%)
Cloud code review: {N} credits ({pct}%)
Third-party agents: {N} credits ({pct}%)
TOP CONSUMERS (individual accounts)
1. {username}: {N} credits β primary driver: {feature}
2. ...
PATTERNS FOUND
Expensive: {list with credit cost estimates}
Waste: {list with credit cost estimates}
PROJECTED MONTHLY SPEND
At current pace: {N} credits/month
With 20% headroom: {N} credits/month
PLAN RECOMMENDATION
Current plan: {plan} β {credits} included
Recommended: {plan} β {credits} included
Reason: {1-sentence justification}
Action: {upgrade now | stay | add overage allowance}
TEAM BUDGET CONFIG
{generated YAML from Phase 4}
OPTIMIZATION OPPORTUNITIES
{list from Phase 5, with per-item credit savings}
NEXT STEPS
1. {concrete action β e.g. "Upgrade to Pro+ before June 1"}
2. {concrete action β e.g. "Set per-user budget caps in org settings"}
3. {concrete action β e.g. "Scope agent sessions to specific files"}
4. Review usage again in the week of June 8 after live billing begins.
Security
Reviews (0)
Related skills
Browse all βMore from Skills Hub
View source βMore Productivity skills
Browse category βFrequently asked questions about copilot-credits-audit
What does the copilot-credits-audit skill do?
Audits GitHub Copilot AI Credit usage patterns before the June 2026 flex-billing transition. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the copilot-credits-audit skill?
Run `npx @skills-hub-ai/cli install copilot-credits-audit` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/copilot-credits-audit/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does copilot-credits-audit work with?
copilot-credits-audit runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the copilot-credits-audit skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use copilot-credits-audit after installing it?
In Claude Code, type `/copilot-credits-audit` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the copilot-credits-audit skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.