report-apiview-metrics
Skill134 starsChanged 3 months agoMITView on GitHub
Run APIView platform metrics (versioned revisions and cross-language compliance). Use for: apiview metrics, platform metrics, version coverage, versioned revisions, cross-language compliance, compliance metrics, PackageVersion coverage, CrossLanguagePackageId, apiview-metrics, parser compliance.
In this repository42 other files it gives its agents.
- packages/python-packages/apiview-copilot/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- azsdk-common-apiview-feedback-resolutionSkill
- azsdk-common-generate-sdk-locallySkill
- azsdk-common-generate-sdk-pipelineSkill
- azsdk-common-pipeline-analysisSkill
- azsdk-common-pipeline-fixerSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-breaking-changeSkill
- azsdk-common-sdk-releaseSkill
- azure-typespec-assessmentSkill
- azure-typespec-authorSkill
- code-reviewSkill
- eval-authoring-skillSkill
- eval-authoring-toolSkill
- eval-authoring-workflowSkill
- markdown-token-optimizerSkill
- sdk-ai-bot-eval-datasetSkill
- sdk-ai-bot-run-evaluationSkill
- skill-authoringSkill
- add-endpointSkill
- audit-filtersSkill
- dev-setupSkill
- kb-searchSkill
- report-active-reviewsSkill
- report-architect-commentsSkill
- report-feedbackSkill
- report-memorySkill
- report-revisionsSkill
- run-evalsSkill
- run-metricsSkill
- update-guidelinesSkill
- apiview-feedback-resolutionSkill
- azure-typespec-authorSkill
- generate-sdk-locallySkill
- azsdk-common-live-and-recorded-testsSkill
- markdown-token-optimizerSkill
- pipeline-troubleshootingSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-releaseSkill
- skill-authoringSkill
- pr-review-helpSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
After the command completes, read the output file with read_file to get the JSON results.
- Distinctive: line 72
After reading the output file:
- Very specific: line 94
Redirect stdout to a file: Always pipe through | Out-File -Encoding UTF8 output/apiview_metrics_output.json.
- Distinctive: line 96
Clean up before running: Delete previous output files before running to avoid presenting stale results.
- Very specific: line 98
Use
read_fileandview_image: Do NOT use additional terminal commands to read output files or display charts.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Report APIView Metrics
When to Use
- Monitoring progress toward 100% versioned revisions across languages
- Checking cross-language metadata compliance (CrossLanguagePackageId)
- Generating trend charts for APIView platform health
- Reviewing parser compliance over time
What It Produces
A combined report with two metric buckets:
| Bucket | What it measures |
| versions | % of revisions with a valid PackageVersion, broken out by language and revision type (Automatic, Manual, PullRequest) |
| compliance | % of reviews whose latest revision includes CrossLanguagePackageId (from CrossLanguageMetadata) |
Output is JSON with top-level "versions" and "compliance" keys. With --summary, human-readable tables are printed to stderr.
Defaults
Unless the user says otherwise, always apply these defaults:
- Environment:
production - Months:
6 - Languages: Python, C#, Java, JavaScript, Go (all included by default — do not pass
--languagesunless user restricts) - Chart: Include
--chartunless user says no charts
Running the Command
Step 1: Run the Command
Show the resolved command and run it immediately in a foreground terminal with a 120-second timeout (timeout: 120000). Clean up stale output first.
New-Item -ItemType Directory -Path output -Force | Out-Null; New-Item -ItemType Directory -Path output/charts -Force | Out-Null; if (Test-Path output/apiview_metrics_output.json) { Remove-Item output/apiview_metrics_output.json }; python cli.py report apiview-metrics --chart --summary 2>$null | Out-File -Encoding UTF8 output/apiview_metrics_output.jsonAfter the command completes, read the output file with read_file to get the JSON results. Then use view_image to display charts at:
output/charts/apiview_version_trends.pngoutput/charts/cross_language_compliance.png
Examples
# Default: 6 months, all languages, production, with charts
python cli.py report apiview-metrics --chart
# With human-readable summary tables on stderr
python cli.py report apiview-metrics --chart --summary
# Custom lookback
python cli.py report apiview-metrics --months 3 --chart
# Specific end date
python cli.py report apiview-metrics --months 6 --end-date 2026-04-30 --chart
# Specific languages only
python cli.py report apiview-metrics --languages Python Java --chart
# Staging environment
python cli.py report apiview-metrics --chart --environment stagingStep 2: Present Results
After reading the output file:
- Summarize the version-coverage trends (highlight languages below 100%)
- Summarize the compliance trends (highlight languages below 100%)
- Show the chart images with
view_image
Step 3: Answer Follow-up Questions
For follow-up questions about the same data, read the output file instead of re-running the command.
Available Flags
| Flag | Type | Default | Description |
--months | int | 6 | Number of calendar months to look back from end date |
--end-date / -e | string | today | Inclusive query end date (YYYY-MM-DD) |
--languages | list | all 5 | Space-separated language names to include |
--chart | flag | off | Generate PNG trend charts to output/charts/ |
--summary | flag | off | Print human-readable summary tables to stderr |
--environment | string | production | production or staging |
Gotchas
- Redirect stdout to a file: Always pipe through
| Out-File -Encoding UTF8 output/apiview_metrics_output.json. Do NOT use>which produces UTF-16 in PowerShell 5.1. - Do NOT use
2>&1: This merges stderr log lines into the JSON output, producing invalid JSON. - Clean up before running: Delete previous output files before running to avoid presenting stale results.
- Use
python cli.pynot.\avc: Ensures the correct Python environment is used. - Use
read_fileandview_image: Do NOT use additional terminal commands to read output files or display charts. - Built-in exclusions:
c,c++,typespec,swagger,xmlare always excluded automatically.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

