Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git add -f plugins/*/agents/ plugins/*/commands/ plugins/*/skills/
git commit -m "chore: publish from staged [skip ci]" --allow-empty
git push origin HEAD:main --force
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ reports/
# Generated files
/llms.txt

# Materialized plugin files (generated by CI via eng/materialize-plugins.mjs)
plugins/*/agents/
plugins/*/commands/
plugins/*/skills/

# Website build artifacts
website/dist/
website/.astro/
Expand Down
1 change: 1 addition & 0 deletions docs/README.skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Skills differ from other primitives by supporting bundled assets (scripts, code
| [chrome-devtools](../skills/chrome-devtools/SKILL.md) | Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance. | None |
| [copilot-cli-quickstart](../skills/copilot-cli-quickstart/SKILL.md) | Use this skill when someone wants to learn GitHub Copilot CLI from scratch. Offers interactive step-by-step tutorials with separate Developer and Non-Developer tracks, plus on-demand Q&A. Just say "start tutorial" or ask a question! Note: This skill targets GitHub Copilot CLI specifically and uses CLI-specific tools (ask_user, sql, fetch_copilot_cli_documentation). | None |
| [copilot-sdk](../skills/copilot-sdk/SKILL.md) | Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent. | None |
| [copilot-usage-metrics](../skills/copilot-usage-metrics/SKILL.md) | Retrieve and display GitHub Copilot usage metrics for organizations and enterprises using the GitHub CLI and REST API. | `get-enterprise-metrics.sh`<br />`get-enterprise-user-metrics.sh`<br />`get-org-metrics.sh`<br />`get-org-user-metrics.sh` |
| [create-web-form](../skills/create-web-form/SKILL.md) | Create robust, accessible web forms with best practices for HTML structure, CSS styling, JavaScript interactivity, form validation, and server-side processing. Use when asked to "create a form", "build a web form", "add a contact form", "make a signup form", or when building any HTML form with data handling. Covers PHP and Python backends, MySQL database integration, REST APIs, XML data exchange, accessibility (ARIA), and progressive web apps. | `references/accessibility.md`<br />`references/aria-form-role.md`<br />`references/css-styling.md`<br />`references/form-basics.md`<br />`references/form-controls.md`<br />`references/form-data-handling.md`<br />`references/html-form-elements.md`<br />`references/html-form-example.md`<br />`references/hypertext-transfer-protocol.md`<br />`references/javascript.md`<br />`references/php-cookies.md`<br />`references/php-forms.md`<br />`references/php-json.md`<br />`references/php-mysql-database.md`<br />`references/progressive-web-app.md`<br />`references/python-as-web-framework.md`<br />`references/python-contact-form.md`<br />`references/python-flask-app.md`<br />`references/python-flask.md`<br />`references/security.md`<br />`references/styling-web-forms.md`<br />`references/web-api.md`<br />`references/web-performance.md`<br />`references/xml.md` |
| [excalidraw-diagram-generator](../skills/excalidraw-diagram-generator/SKILL.md) | Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw. | `references/element-types.md`<br />`references/excalidraw-schema.md`<br />`scripts/.gitignore`<br />`scripts/README.md`<br />`scripts/add-arrow.py`<br />`scripts/add-icon-to-diagram.py`<br />`scripts/split-excalidraw-library.py`<br />`templates/business-flow-swimlane-template.excalidraw`<br />`templates/class-diagram-template.excalidraw`<br />`templates/data-flow-diagram-template.excalidraw`<br />`templates/er-diagram-template.excalidraw`<br />`templates/flowchart-template.excalidraw`<br />`templates/mindmap-template.excalidraw`<br />`templates/relationship-template.excalidraw`<br />`templates/sequence-diagram-template.excalidraw` |
| [fabric-lakehouse](../skills/fabric-lakehouse/SKILL.md) | Use this skill to get context about Fabric Lakehouse and its features for software systems and AI-powered functions. It offers descriptions of Lakehouse data components, organization with schemas and shortcuts, access control, and code examples. This skill supports users in designing, building, and optimizing Lakehouse solutions using best practices. | `references/getdata.md`<br />`references/pyspark.md` |
Expand Down
52 changes: 52 additions & 0 deletions skills/copilot-usage-metrics/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: copilot-usage-metrics
description: Retrieve and display GitHub Copilot usage metrics for organizations and enterprises using the GitHub CLI and REST API.
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The skill frontmatter description should follow the skill template format (quoted string) and include stronger discovery keywords (e.g., explicitly include a “Use when …” clause) so it’s consistent with the documented SKILL.md frontmatter guidance (see skills/make-skill-template/SKILL.md around the frontmatter example).

Suggested change
description: Retrieve and display GitHub Copilot usage metrics for organizations and enterprises using the GitHub CLI and REST API.
description: 'Use when you need to retrieve and display GitHub Copilot usage metrics for organizations or enterprises using the GitHub CLI and REST API.'

Copilot uses AI. Check for mistakes.
---

# Copilot Usage Metrics

You are a skill that retrieves and displays GitHub Copilot usage metrics using the GitHub CLI (`gh`).
Comment on lines +6 to +8
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new skill isn’t added to the skills index table in docs/README.skills.md, so it won’t be discoverable from the repository docs. Please add a new row for copilot-usage-metrics (with bundled assets listed).

Copilot uses AI. Check for mistakes.

## When to use this skill

Use this skill when the user asks about:
- Copilot usage metrics, adoption, or statistics
- How many people are using Copilot in their org or enterprise
- Copilot acceptance rates, suggestions, or chat usage
- Per-user Copilot usage breakdowns
- Copilot usage on a specific date

## How to use this skill

1. Determine whether the user wants **organization** or **enterprise** level metrics.
2. Ask for the org name or enterprise slug if not provided.
3. Determine if they want **aggregated** metrics or **per-user** metrics.
4. Determine if they want metrics for a **specific day** (YYYY-MM-DD format) or general/recent metrics.
5. Run the appropriate script from this skill's directory.

## Available scripts

### Organization metrics

- `get-org-metrics.sh <org> [day]` — Get aggregated Copilot usage metrics for an organization. Optionally pass a specific day in YYYY-MM-DD format.
- `get-org-user-metrics.sh <org> [day]` — Get per-user Copilot usage metrics for an organization. Optionally pass a specific day.

### Enterprise metrics

- `get-enterprise-metrics.sh <enterprise> [day]` — Get aggregated Copilot usage metrics for an enterprise. Optionally pass a specific day.
- `get-enterprise-user-metrics.sh <enterprise> [day]` — Get per-user Copilot usage metrics for an enterprise. Optionally pass a specific day.

## Formatting the output

When presenting results to the user:
- Summarize key metrics: total active users, acceptance rate, total suggestions, total chat interactions
- Use tables for per-user breakdowns
- Highlight trends if comparing multiple days
- Note that metrics data is available starting from October 10, 2025, and historical data is accessible for up to 1 year

## Important notes

- These API endpoints require **GitHub Enterprise Cloud**.
- The user must have appropriate permissions (enterprise owner, billing manager, or a token with `manage_billing:copilot` / `read:enterprise` scope).
- The "Copilot usage metrics" policy must be enabled in enterprise settings.
- If the API returns 403, advise the user to check their token permissions and enterprise policy settings.
22 changes: 22 additions & 0 deletions skills/copilot-usage-metrics/get-enterprise-metrics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Fetch aggregated Copilot usage metrics for an enterprise
# Usage: get-enterprise-metrics.sh <enterprise> [day]
# enterprise - GitHub enterprise slug
# day - (optional) specific day in YYYY-MM-DD format

set -euo pipefail

ENTERPRISE="${1:?Usage: get-enterprise-metrics.sh <enterprise> [day]}"
DAY="${2:-}"

if [ -n "$DAY" ]; then
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/enterprises/$ENTERPRISE/copilot/usage/day?day=$DAY"
else
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/enterprises/$ENTERPRISE/copilot/usage"
fi
22 changes: 22 additions & 0 deletions skills/copilot-usage-metrics/get-enterprise-user-metrics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Fetch per-user Copilot usage metrics for an enterprise
# Usage: get-enterprise-user-metrics.sh <enterprise> [day]
# enterprise - GitHub enterprise slug
# day - (optional) specific day in YYYY-MM-DD format

set -euo pipefail

ENTERPRISE="${1:?Usage: get-enterprise-user-metrics.sh <enterprise> [day]}"
DAY="${2:-}"

if [ -n "$DAY" ]; then
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/enterprises/$ENTERPRISE/copilot/usage/users/day?day=$DAY"
else
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/enterprises/$ENTERPRISE/copilot/usage/users"
fi
22 changes: 22 additions & 0 deletions skills/copilot-usage-metrics/get-org-metrics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Fetch aggregated Copilot usage metrics for an organization
# Usage: get-org-metrics.sh <org> [day]
# org - GitHub organization name
# day - (optional) specific day in YYYY-MM-DD format

set -euo pipefail

ORG="${1:?Usage: get-org-metrics.sh <org> [day]}"
DAY="${2:-}"

if [ -n "$DAY" ]; then
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/orgs/$ORG/copilot/usage/day?day=$DAY"
else
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/orgs/$ORG/copilot/usage"
fi
22 changes: 22 additions & 0 deletions skills/copilot-usage-metrics/get-org-user-metrics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Fetch per-user Copilot usage metrics for an organization
# Usage: get-org-user-metrics.sh <org> [day]
# org - GitHub organization name
# day - (optional) specific day in YYYY-MM-DD format

set -euo pipefail

ORG="${1:?Usage: get-org-user-metrics.sh <org> [day]}"
DAY="${2:-}"

if [ -n "$DAY" ]; then
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/orgs/$ORG/copilot/usage/users/day?day=$DAY"
else
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/orgs/$ORG/copilot/usage/users"
fi