All skills
github avatar

/azure-devops-cli

@4e8726d official
by githubgithub/awesome-copilot40k stars
5,040

Manage Azure DevOps resources via CLI including projects, repos, pipelines, builds, pull requests, work items, artifacts, and service endpoints. Use when working with Azure DevOps, az commands, devops automation, CI/CD, or when user mentions Azure DevOps CLI.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/azure-devops-cli

This session only. Nothing lands on disk.

referencesadvanced-usage.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Advanced Usage: Output, Queries & Parameters

Table of Contents


Output Formats

All commands support multiple output formats:

# Table format (human-readable)
az pipelines list --output table

# JSON format (default, machine-readable)
az pipelines list --output json

# JSONC (colored JSON)
az pipelines list --output jsonc

# YAML format
az pipelines list --output yaml

# YAMLC (colored YAML)
az pipelines list --output yamlc

# TSV format (tab-separated values)
az pipelines list --output tsv

# None (no output)
az pipelines list --output none

JMESPath Queries

Filter and transform output:

# Filter by name
az pipelines list --query "[?name=='myPipeline']"

# Get specific fields
az pipelines list --query "[].{Name:name, ID:id}"

# Chain queries
az pipelines list --query "[?name.contains('CI')].{Name:name, ID:id}" --output table

# Get first result
az pipelines list --query "[0]"

# Get top N
az pipelines list --query "[0:5]"

Advanced JMESPath Queries

Filtering and Sorting

# Filter by multiple conditions
az pipelines list --query "[?name.contains('CI') && enabled==true]"

# Filter by status and result
az pipelines runs list --query "[?status=='completed' && result=='succeeded']"

# Sort by date (descending)
az pipelines runs list --query "sort_by([?status=='completed'], &finishTime | reverse(@))"

# Get top N items after filtering
az pipelines runs list --query "[?result=='succeeded'] | [0:5]"

Nested Queries

# Extract nested properties
az pipelines show --id $PIPELINE_ID --query "{Name:name, Repo:repository.{Name:name, Type:type}, Folder:folder}"

# Query build details
az pipelines build show --id $BUILD_ID --query "{ID:id, Number:buildNumber, Status:status, Result:result, Requested:requestedFor.displayName}"

Complex Filtering

# Find pipelines with specific YAML path
az pipelines list --query "[?process.type.name=='yaml' && process.yamlFilename=='azure-pipelines.yml']"

# Find PRs from specific reviewer
az repos pr list --query "[?contains(reviewers[?displayName=='John Doe'].displayName, 'John Doe')]"

# Find work items with specific iteration and state
az boards work-item show --id $WI_ID --query "{Title:fields['System.Title'], State:fields['System.State'], Iteration:fields['System.IterationPath']}"

Aggregation

# Count items by status
az pipelines runs list --query "groupBy([?status=='completed'], &[result]) | {Succeeded: [?key=='succeeded'][0].count, Failed: [?key=='failed'][0].count}"

# Get unique reviewers
az repos pr list --query "unique_by(reviewers[], &displayName)"

# Sum values
az pipelines runs list --query "[?result=='succeeded'] | [].{Duration:duration} | [0].Duration"

Conditional Transformation

# Format dates
az pipelines runs list --query "[].{ID:id, Date:createdDate, Formatted:createdDate | format_datetime(@, 'yyyy-MM-dd HH:mm')}"

# Conditional output
az pipelines list --query "[].{Name:name, Status:(enabled ? 'Enabled' : 'Disabled')}"

# Extract with defaults
az pipelines show --id $PIPELINE_ID --query "{Name:name, Folder:folder || 'Root', Description:description || 'No description'}"

Complex Workflows

# Find longest running builds
az pipelines build list --query "sort_by([?result=='succeeded'], &queueTime) | reverse(@) | [0:3].{ID:id, Number:buildNumber, Duration:duration}"

# Get PR statistics per reviewer
az repos pr list --query "groupBy([], &reviewers[].displayName) | [].{Reviewer:@.key, Count:length(@)}"

# Find work items with multiple child items
az boards work-item relation show --id $PARENT_ID --query "[?rel=='System.LinkTypes.Hierarchy-Forward'] | [].{ChildID:url | split('/', @) | [-1]}"

Global Arguments

Available on all commands:

Parameter Description
--help / -h Show command help
--output / -o Output format (json, jsonc, none, table, tsv, yaml, yamlc)
--query JMESPath query string for filtering output
--verbose Increase logging verbosity
--debug Show all debug logs
--only-show-errors Only show errors, suppress warnings
--subscription Name or ID of subscription
--yes / -y Skip confirmation prompts

Common Parameters

Parameter Description
--org / --organization Azure DevOps organization URL (e.g., https://dev.azure.com/{org})
--project / -p Project name or ID
--detect Auto-detect organization from git config
--yes / -y Skip confirmation prompts
--open Open resource in web browser
--subscription Azure subscription (for Azure resources)

Git Aliases

After enabling git aliases:

# Enable Git aliases
az devops configure --use-git-aliases true

# Use Git commands for DevOps operations
git pr create --target-branch main
git pr list
git pr checkout 123

Getting Help

# General help
az devops --help

# Help for specific command group
az pipelines --help
az repos pr --help

# Help for specific command
az repos pr create --help

# Search for examples
az find "az repos pr create"

Source: SKILL.md on GitHub

1 alert14d5 checks · Risk SAFE
  • Gen Agent Trust Hub14d

    The skill provides a comprehensive collection of commands and automation patterns for managing Azure DevOps resources through the Azure CLI. It includes standard installation instructions from trusted vendor sources and best practices for handling long arguments and complex queries. The analysis identified the standard attack surface for indirect prompt injection associated with processing external work items and pull requests.

  • Socket14d

    1 alert: gptAnomaly

  • Snyk14d

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    2/8 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4e8726d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 19 hours ago.

Activeupdated 3 months ago
  • azure-devops
  • azure-cli
  • devops-automation
  • ci-cd
  • pipelines
  • repos
  • work-items
  • azure-artifacts
  • bash

README badge

README badge for github/awesome-copilot/azure-devops-cli

Manages Azure DevOps resources via the Azure CLI including projects, repositories, pipelines, builds, pull requests, work items, and service endpoints. Use when automating Azure DevOps workflows, CI/CD configuration, or resource administration through the `az devops` and `az pipelines` command families.

Generated from the current SKILL.md.

Does this skill work with the legacy Azure DevOps URL format?
The skill supports both formats but recommends the modern https://dev.azure.com/{org} URL. Legacy https://{org}.visualstudio.com URLs should be replaced with the new format.
What authentication method does this skill use?
The skill uses PAT (Personal Access Token) authentication via the az devops login command. You provide your token when logging in to your organization.
Does this cover Azure Pipelines, Repos, Boards, and Artifacts?
Yes. The skill includes commands for managing pipelines, builds, releases, repositories, pull requests, work items, iterations, and universal packages across all four services.
Can I set default organization and project to avoid repeating them in commands?
Yes. Use az devops configure --defaults to set default organization and project, which will apply to subsequent commands unless explicitly overridden.
Does this skill include scripting patterns and automation examples?
Yes. The skill includes a workflows-and-patterns reference file covering automation scripts, best practices, error handling, and real-world examples for CI/CD automation.

Generated from the current SKILL.md. These answers refresh after source changes.