/azure-devops:ado-analytics --entity WorkItems|PipelineRuns|TestResults [--filter <odata-filter>] [--aggregate count|sum|avg] [--date-range 7d|30d|90d] [--export powerbi|csv]from azure-devops
Builds and executes OData analytics queries against Azure DevOps Analytics views for work items, pipeline runs, and test results. Supports aggregation, filtering, date ranges, and export to Power BI or CSV.
Ships in azure-devops. Installing the plugin adds it to Claude Code.
Build and execute OData analytics queries against Azure DevOps Analytics views. Query work items, pipeline runs, and test results with aggregation, filtering, and export to Power BI.
/ado-setup first)View analytics permission| Argument | Required | Description |
|---|---|---|
--entity | Yes | Entity set: WorkItems, WorkItemSnapshot, PipelineRuns, PipelineRunActivityResults, TestRuns, TestResultsDaily, TestPointHistorySnapshot |
--filter | No | OData $filter expression |
--select | No | Comma-separated fields to return |
--aggregate | No | Aggregation: count, sum, avg, min, max with field |
--group-by | No | Comma-separated fields to group by |
--date-range | No | Date filter: 7d, 30d, 90d, or YYYY-MM-DD..YYYY-MM-DD |
--top | No | Limit results (default: 100) |
--export | No | Export format: powerbi (generate .odc file) or csv |
Build OData URL — base: https://analytics.dev.azure.com/{org}/{project}/_odata/v4.0-preview/
Entity examples:
Work item snapshot (burn-down, velocity):
WorkItemSnapshot?
$apply=
filter(DateValue ge 2025-01-01Z and Iteration/IterationPath eq 'Project\Sprint 5')
/groupby((DateValue,WorkItemType),aggregate($count as Count, StoryPoints with sum as TotalPoints))
&$orderby=DateValue
Pipeline run summary:
PipelineRuns?
$apply=
filter(CompletedDate ge 2025-01-01Z)
/groupby((PipelineName,RunOutcome),aggregate($count as RunCount))
Test results daily trend:
TestResultsDaily?
$apply=
filter(DateSK ge 20250101)
/groupby((DateSK),aggregate(ResultPassCount with sum as Passed, ResultFailCount with sum as Failed, ResultCount with sum as Total))
&$orderby=DateSK
Common filter patterns:
DateValue ge {start}Z and DateValue le {end}ZIteration/IterationPath eq '{path}'Area/AreaPath eq '{path}'State eq 'Active'PipelineName eq '{name}'RunOutcome eq 'Succeed'Execute query — GET the constructed OData URL with authorization header.
Format results — display as table with column headers from $select or aggregation aliases.
Export to Power BI — if --export powerbi:
.odc (Office Data Connection) file with the OData URLExport to CSV — if --export csv:
@odata.nextLink if present)/ado-analytics --entity WorkItemSnapshot --aggregate "sum StoryPoints" --group-by WorkItemType --date-range 30d
/ado-analytics --entity PipelineRuns --filter "PipelineName eq 'CI Build'" --aggregate count --group-by RunOutcome --date-range 90d
/ado-analytics --entity TestResultsDaily --aggregate "sum ResultPassCount,sum ResultFailCount" --group-by DateSK --date-range 30d
/ado-analytics --entity WorkItems --filter "State eq 'Active' and WorkItemType eq 'Bug'" --select "WorkItemId,Title,Priority,AssignedTo" --top 50
/ado-analytics --entity PipelineRuns --date-range 30d --export powerbi
$filter = field eq 'value' and field2 ge 2025-01-01Z
$select = Field1,Field2,Field3
$orderby = Field1 desc
$top = 100
$apply = filter(...)/groupby((...),aggregate(...))
$expand = NavigationProperty($select=Field)
Aggregation functions: $count, sum, avg, min, max
$top to limit. Maximum 10,000 rows per request.Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
azure-devops, odata, analytics, work-items, pipelines, test-results
7-day visitors to each command page
npx claudepluginhub thelobbi/claude-m --plugin azure-devops25 commands in this plugin
/ado-dashboardCreate dashboards and configure widgetsOther plugins' commands for the same job