Official agent skill

Run Metrics

by Azure in Azure/azure-sdk-tools

Run metrics reports for APIView Copilot. An agent skill from Azure/azure-sdk-tools.

OfficialMITAuto-check passed

Install Run Metrics

skills CLI
$ npx skills add Azure/azure-sdk-tools --skill run-metrics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Azure/azure-sdk-tools run-metrics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Azure/azure-sdk-tools.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/python-packages/apiview-copilot/.github/skills/run-metrics .claude/skills/run-metrics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
run-metrics
GitHub stars
134
Token cost
~2k tokens
SKILL.md length
852 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Run metrics reports for APIView Copilot. An agent skill from Azure/azure-sdk-tools.

  • Works in 4 steps: adoption.png — Copilot vs non-Copilot… → comment_quality.png — Comment quality… → human_copilot_split.png — Human vs AI… → …
  • Generate metrics
  • SKILL.md covers When to Use, Defaults, Date Resolution and Running Metrics, plus 5 more sections
  • Calls python

What it does

Run Metrics is an agent skill from Azure/azure-sdk-tools, published by the product's own GitHub organization. Run metrics reports for APIView Copilot. Use for: run metrics, metrics report, generate metrics, monthly metrics, metrics for March, metrics for January, adoption metrics, comment quality, quality trends, save metrics, metrics charts.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Tools repository leveraged by the Azure SDK team. The licence is MIT.

When your agent uses it

  • Generate metrics
  • Monthly metrics
  • Metrics for March
  • Metrics for January

Example prompts

  • “/run-metrics”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. adoption.png — Copilot vs non-Copilot reviews by language
  2. comment_quality.png — Comment quality breakdown (upvoted, implicit good/bad, downvoted, deleted)
  3. human_copilot_split.png — Human vs AI comment split
  4. human_comments_comparison.png — Human comments with vs without Copilot

What it can do on your machine

Read from SKILL.md and the folder at commit cc5ca24. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Run Metrics loads about 2k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 852 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Azure/azure-sdk-tools at commit cc5ca24, republished under its MIT licence (© Azure). 852 words, ~2,021 tokens.

Download SKILL.mdSave it as .claude/skills/run-metrics/SKILL.md (or your agent's skills folder).
name
run-metrics
description
Run metrics reports for APIView Copilot. Use for: run metrics, metrics report, generate metrics, monthly metrics, metrics for March, metrics for January, adoption metrics, comment quality, quality trends, save metrics, metrics charts.
argument-hint
Month name (e.g. 'March') or date range (e.g. '2025-03-01 to 2025-03-31')

Run Metrics

When to Use

  • Generating monthly or custom-range metrics reports
  • Reviewing adoption rates and comment quality across languages
  • Producing charts for metrics visualization
  • Reviewing companion quality trends across recent months
  • Saving finalized metrics to the database (only when user explicitly requests)

Defaults

Unless the user says otherwise, always apply these defaults:

  • Environment: production
  • Charts: Always include --charts
  • Languages: All languages (do not pass --exclude)
  • Save: Do NOT pass --save unless the user explicitly asks to save (e.g. "save it", "persist", "write to DB")
  • Format: JSON output (UTF-8 encoded)
  • Quality trends follow-up: If the user asks for metrics but does not explicitly ask for quality trends, ask a short follow-up after sharing the metrics results: "Do you want the quality trends chart for the same period too?"
  • Quality trends auto-run: If the user explicitly asks for quality trends, comment trends, or asks broadly for charts/trends/quality, also run the companion quality-trends report for the same period.

Date Resolution

The user will typically specify a calendar month by name (e.g. "March", "January 2025"). Resolve to the full month date range:

User saysstart_dateend_date
"March" (current year)YYYY-03-01YYYY-03-31
"January 2025"2025-01-012025-01-31
"March 1 to March 15"YYYY-03-01YYYY-03-15
"2025-06-01 to 2025-06-30"2025-06-012025-06-30

When only a month name is given without a year, use the current year. Be careful with month lengths (28/29/30/31 days).

Running Metrics

Step 1: Run the Command

Show the resolved command and run it immediately in a single foreground terminal invocation with a 180-second timeout (timeout: 180000). Before running, clean up stale output so you never accidentally present old results.

Important: Do NOT use 2>&1 — that merges stderr log messages (e.g. "Saved: output\charts\adoption.png") into the JSON output file, producing invalid JSON. Pipe stdout through Out-File -Encoding UTF8 so the output file is always valid UTF-8 JSON.

Full terminal command (cleanup + run):

powershell
New-Item -ItemType Directory -Path output -Force | Out-Null; if (Test-Path output/metrics_output.json) { Remove-Item output/metrics_output.json }; if (Test-Path output/charts) { Remove-Item output/charts/* -Force }; python cli.py report metrics -s <start_date> -e <end_date> --charts | Out-File -Encoding UTF8 output/metrics_output.json

After the command completes, read the output file with read_file to get the JSON results — do NOT use a separate terminal command. Then use view_image (not a terminal command) to display the chart PNGs. This means the entire workflow requires only one terminal invocation.

Examples
powershell
# March 2025, production, all languages, with charts (typical request)
python cli.py report metrics -s 2025-03-01 -e 2025-03-31 --charts

# Staging environment
python cli.py report metrics -s 2025-03-01 -e 2025-03-31 --charts --environment staging

# Exclude specific languages
python cli.py report metrics -s 2025-03-01 -e 2025-03-31 --charts --exclude Java Golang

# Custom date range
python cli.py report metrics -s 2025-03-10 -e 2025-03-20 --charts

# Save to database (ONLY when user explicitly requests)
python cli.py report metrics -s 2025-03-01 -e 2025-03-31 --charts --save

The quality-trends report is the companion chart view for metrics work.

  • If the user explicitly asks for quality trends, comment trends, or a broader trends/chart view, run it automatically for the same time window.
  • If the user only asked for metrics, ask whether they want the quality trends chart too after presenting the metrics result.
Translating the date window

The quality-trends command uses --months plus an optional --end-date, not a start date. Convert the requested metrics window into an inclusive calendar-month count:

WindowUse for --months
2026-03-01 to 2026-03-311
2026-03-01 to 2026-03-151
2026-01-15 to 2026-03-023

Use the same resolved end date from the metrics request for --end-date.

powershell
if (Test-Path output/charts/comment_bucket_trends.png) { Remove-Item output/charts/comment_bucket_trends.png -Force }; python cli.py report quality-trends --months <month_count> --end-date <end_date>

Optional additions:

  • --environment staging
  • --languages Python CSharp C# Java TypeScript JavaScript Go
  • --exclude-human
  • --neutral

After it completes, summarize the terminal output and use view_image to show the saved chart at output/charts/comment_bucket_trends.png.

Show full SKILL.md (355 more words)Show less

Follow-up: "Save it"

If the user asks to save after a metrics run (e.g. "okay save it", "persist that", "write to DB"), re-run the same command with --save appended. Keep all other flags identical to the previous run.

Available Flags

FlagTypeDefaultDescription
--start-date / -sstringrequiredStart date (YYYY-MM-DD)
--end-date / -estringrequiredEnd date (YYYY-MM-DD)
--environmentstringproductionproduction or staging
--excludelistnoneSpace-separated language names to exclude
--chartsflagoffGenerate PNG charts to output/charts/
--saveflagoffPersist metrics to Cosmos DB (never use unless user explicitly requests)

Chart Outputs

When --charts is enabled, 4 PNGs are saved to output/charts/:

  1. adoption.png — Copilot vs non-Copilot reviews by language
  2. comment_quality.png — Comment quality breakdown (upvoted, implicit good/bad, downvoted, deleted)
  3. human_copilot_split.png — Human vs AI comment split
  4. human_comments_comparison.png — Human comments with vs without Copilot

Gotchas

  • Redirect stdout to a file: Always pipe through | Out-File -Encoding UTF8 output/metrics_output.json and read the file afterward. Do NOT use > which produces UTF-16 in PowerShell 5.1.
  • Clean up before running: Delete the previous output/metrics_output.json and output/charts/* before running. This prevents presenting stale results if the command fails silently.
  • Do NOT use 2>&1: This merges stderr log lines (e.g. "Saved: ...") into the JSON output file, producing invalid JSON. Only redirect stdout.
  • Use foreground with timeout: Run with isBackground=false and timeout: 180000 (3 min). Do NOT use isBackground=true and poll — that causes repeated user approval prompts.
  • Use New-Item -ItemType Directory not mkdir: mkdir is aliased differently across shells. Use New-Item -ItemType Directory -Path output -Force | Out-Null for reliable directory creation.
  • Read results with read_file and view_image: After the command finishes, use read_file for the JSON and view_image for charts. Do NOT launch additional terminal commands to read the file.
  • Use python cli.py not .\avc: The avc.bat script may resolve to system Python. Use python cli.py report metrics ... to ensure the correct environment.
  • Quality trends is separate: It uses report quality-trends with --months and optional --end-date, not --start-date.
  • Month end dates: February has 28/29 days, April/June/Sept/Nov have 30 days. Get it right.
  • Built-in exclusions: c, c++, typespec, swagger, xml are always excluded automatically — no need to add them.

© Azure, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/python-packages/apiview-copilot/.github/skills/run-metrics of Azure/azure-sdk-tools.

Open the folder on GitHubat commit cc5ca24

Compare with similar skills

Run Metrics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Run Metrics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Run Metrics this skillAzure/azure-sdk-tools134—~2kAutomated safety check: PassMIT
North Star Metricphuryn/pm-skills27k—~1kAutomated safety check: PassMIT
Investigate MetricPostHog/posthog40k—~1.9kAutomated safety check: PassCustom licence
Product Metrics Dashboard Designphuryn/pm-skills27k—~1.3kAutomated safety check: PassMIT
CI Metricspytorch/pytorch104k—~1.1kAutomated safety check: PassCustom licence
Startup Metrics Frameworkwshobson/agents40k—~2.5kAutomated safety check: PassMIT

Similar skills

  • North Star Metric

    phuryn/pm-skills

    Define a North Star Metric and 3-5 supporting input metrics that form a metrics constellation.

    27k GitHub stars~1k tokensUpdated 24 days ago
    Product & Project ManagementAuto-check passed
  • Investigate Metric

    PostHog/posthog

    Official

    Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.

    40k GitHub stars~1.9k tokensUpdated today
    Product & Project ManagementAuto-check passed
  • Designs a product metrics dashboard: a North Star and input metrics, a definition table with data sources, chart types and alert thresholds, and a screen layout.

    27k GitHub stars~1.3k tokensUpdated 24 days ago
    Product & Project ManagementAuto-check passed
  • CI Metrics

    pytorch/pytorch

    Query PyTorch CI, GitHub Actions, HUD, Grafana, and infrastructure metrics.

    104k GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Track, calculate, and optimize key performance metrics for SaaS, marketplace, consumer, and B2B startups from seed through Series A, including unit economics, growth efficiency, and cash management.

    40k GitHub stars~2.5k tokensUpdated 4 days ago
    Business, Finance & HRAuto-check passed
  • Official

    Build reusable activation models — an activation-rate metric and a per-user/per-account activated flag — on either PostHog data-warehouse views (HogQL) or an external dbt project.

    40k GitHub stars~1.4k tokensUpdated today
    Data & AnalyticsAuto-check passed

More from Azure/azure-sdk-tools

All 35 skills in this repo
  • Apiview Feedback Resolution

    Azure/azure-sdk-tools

    Official

    Analyze and resolve APIView review feedback on Azure SDK PRs.

    134 GitHub stars~547 tokensUpdated today
    Auto-check passed
  • Official

    Deploy test resources and run Azure SDK tests in live, record, or playback mode.

    134 GitHub stars~1.5k tokensUpdated today
    Auto-check: notes
  • Azsdk Common Pipeline Analysis

    Azure/azure-sdk-tools

    Official

    Analyze Azure SDK CI/CD pipeline failures into a structured diagnosis, and define the required output format.

    134 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Official

    Create, get, update, abandon, and link SDK PRs to release plan work items for Azure SDK releases.

    134 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Azure Typespec Assessment

    Azure/azure-sdk-tools

    Official

    Assess Azure TypeSpec Git diffs for semantic intent, REST and downstream SDK breaking changes, Azure Guidelines compliance, and documentation completeness.

    134 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Run Metrics

What does Run Metrics do?

Run metrics reports for APIView Copilot. An agent skill from Azure/azure-sdk-tools. Run Metrics is an agent skill from Azure/azure-sdk-tools, published by the product's own GitHub organization. Run metrics reports for APIView Copilot.

When should I use Run Metrics?

Run Metrics fits situations like: generate metrics; monthly metrics; metrics for March; metrics for January.

How do I install Run Metrics in Claude Code?

Run `npx skills add Azure/azure-sdk-tools --skill run-metrics -a claude-code`. Or copy the skill folder (packages/python-packages/apiview-copilot/.github/skills/run-metrics in Azure/azure-sdk-tools) into .claude/skills/run-metrics in your project. Claude Code loads it when a task matches its description.

How do I install Run Metrics in Codex?

Run `npx skills add Azure/azure-sdk-tools --skill run-metrics -a codex`. Or copy the skill folder (packages/python-packages/apiview-copilot/.github/skills/run-metrics in Azure/azure-sdk-tools) into .agents/skills/run-metrics in your project. Codex loads it when a task matches its description.

Can I use Run Metrics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Azure/azure-sdk-tools --skill run-metrics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/run-metrics, .gemini/skills/run-metrics, .github/skills/run-metrics and .opencode/skills/run-metrics in your project.

What does Run Metrics need to run?

Going by SKILL.md and its folder, Run Metrics needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Run Metrics access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Run Metrics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Run Metrics use?

Run Metrics is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Run Metrics use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Run Metrics?

Skills that share tags, products or a category with Run Metrics: North Star Metric (phuryn/pm-skills, 27k stars), Investigate Metric (PostHog/posthog, 40k stars), Product Metrics Dashboard Design (phuryn/pm-skills, 27k stars) and CI Metrics (pytorch/pytorch, 104k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Run Metrics?

Azure (a GitHub organization, an official publisher) maintains it in Azure/azure-sdk-tools, which has 134 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 9, 2026.

Source: Azure/azure-sdk-tools on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.