Token导航 LogoToken导航TokenDH.com
云服务敏感数据github未标认证来源可访问许可证需确认审计通过

azure-devops-cliAzure devops CLI 部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

1,261

周安装

51

GitHub Stars

55

下载量

396
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:azure-devops-cli(Azure devops CLI 部署)
来源仓库:https://github.com/rysweet/amplihack
仓库路径:skills/azure-devops-cli
安装命令:
npx skills add https://github.com/rysweet/amplihack --skill azure-devops-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/rysweet/amplihack --skill azure-devops-cli

简介

用于辅助云资源、部署、容器和基础设施任务。

  • 适合检查配置、整理部署步骤或分析资源状态。
  • 使用时需明确目标环境、账号权限和操作边界。
  • 涉及删除资源或修改网络配置时应先确认影响范围。
  • 安装命令:npx skills add https://github.com/rysweet/amplihack --skill azure-devops-cli

SKILL.md

Azure DevOps CLI Skill

Quick Start

Installation & Authentication

# Install Azure DevOps CLI extension
az extension add --name azure-devops

# Authenticate (choose one method)
az login                                    # Interactive browser login
az devops login --organization https://dev.azure.com/YOUR_ORG  # PAT token login

# Configure defaults (recommended)
az devops configure --defaults organization=https://dev.azure.com/YOUR_ORG project=YOUR_PROJECT

# Verify setup
az devops project list

Configuration Patterns

# Set defaults to avoid repeating --organization and --project
az devops configure --defaults organization=https://dev.azure.com/myorg project=myproject

# List current configuration
az devops configure --list

# Use Git aliases for common commands
az devops configure --defaults use-git-aliases=true

# Common output formats
--output table    # Human-readable tables (default)
--output json     # JSON for scripting
--output tsv      # Tab-separated values

Essential Commands by Group

1. DevOps (Organization & Projects)

# List projects
az devops project list --organization https://dev.azure.com/myorg

# Create project
az devops project create --name "MyProject" --visibility private

# Show project details
az devops project show --project MyProject

# Delete project
az devops project delete --id PROJECT_ID --yes

# Manage users/teams
az devops user list
az devops team list --project MyProject

2. Pipelines (Build & Release)

# List pipelines
az pipelines list --project MyProject

# Run a pipeline
az pipelines run --name "MyPipeline" --branch main

# Show pipeline runs
az pipelines runs list --pipeline-ids 123

# Show run details
az pipelines runs show --id RUN_ID

# Create pipeline from YAML
az pipelines create --name "NewPipeline" --repository myrepo --branch main --yml-path azure-pipelines.yml

3. Boards (Work Items & Sprints)

# List work items
az boards query --wiql "SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.State] = 'Active'"

# Create work item
az boards work-item create --type "User Story" --title "New Feature" --assigned-to me@example.com

# Update work item
az boards work-item update --id 123 --state "In Progress"

# Show work item
az boards work-item show --id 123

# List iterations/sprints
az boards iteration project list

4. Repos (Git Repositories)

# List repositories
az repos list --project MyProject

# Create repository
az repos create --name "myrepo" --project MyProject

# List pull requests
az repos pr list --repository myrepo --status active

# Create pull request
az repos pr create --repository myrepo --source-branch feature/new --target-branch main --title "New Feature"

# Show PR details
az repos pr show --id PR_ID

5. Artifacts (Package Management)

# List feeds
az artifacts feed list

# Create feed
az artifacts feed create --name "myfeed" --project MyProject

# List packages
az artifacts universal list --feed myfeed --project MyProject

# Publish package
az artifacts universal publish --feed myfeed --name mypackage --version 1.0.0 --path ./dist

# Download package
az artifacts universal download --feed myfeed --name mypackage --version 1.0.0 --path ./download

Common Workflows

Workflow 1: CI/CD Pipeline Automation

# Create pipeline, run it, and monitor
az pipelines create --name "API-Build" --repository myrepo --yml-path ci/azure-pipelines.yml
az pipelines run --name "API-Build" --branch main
az pipelines runs show --id RUN_ID --open  # Opens in browser

Workflow 2: Pull Request Review Automation

# List active PRs, show details, add comment
az repos pr list --repository myrepo --status active --output table
az repos pr show --id 456 --open
az repos pr update --id 456 --status approved

Workflow 3: Work Item Batch Creation

# Create multiple work items from template
for title in "Feature A" "Feature B" "Feature C"; do
  az boards work-item create --type "User Story" --title "$title" --assigned-to team@example.com
done

Workflow 4: Pipeline Status Dashboard

# Get recent pipeline runs with status
az pipelines runs list --top 10 --query "[].{Name:pipeline.name, Status:status, Result:result, Started:startTime}" --output table

Workflow 5: Repository Clone Automation

# List all repos and clone them
az repos list --query "[].{Name:name, URL:remoteUrl}" --output tsv | while IFS=$'\t' read -r name url; do
  git clone "$url" "./$name"
done

Workflow 6: Sprint Planning Helper

# List current sprint work items
az boards query --wiql "SELECT [System.Id], [System.Title], [System.State] FROM WorkItems WHERE [System.IterationPath] = @CurrentIteration" --output table

Workflow 7: Release Gate Checking

# Check if all PRs are approved before release
PENDING=$(az repos pr list --status active --query "length([?status!='approved'])")
if [ "$PENDING" -eq 0 ]; then
  az pipelines run --name "Release-Pipeline"
fi

Workflow 8: Artifact Versioning

# Publish versioned artifact with timestamp
VERSION="1.0.$(date +%Y%m%d%H%M%S)"
az artifacts universal publish --feed myfeed --name myapp --version "$VERSION" --path ./build

Workflow 9: Team Dashboard Data

# Export team metrics to JSON
az devops project show --project MyProject > project.json
az pipelines runs list --top 50 > recent-runs.json
az repos pr list --status all > all-prs.json

Workflow 10: Environment Sync

# Copy pipeline variables across environments
az pipelines variable list --pipeline-name "MyPipeline" --output json > vars.json
# Edit vars.json as needed
az pipelines variable-group create --name "Production" --variables @vars.json

Troubleshooting

Common Issues

Authentication Failures:

# Clear cached credentials
az account clear
az login

# Use PAT token directly
export AZURE_DEVOPS_EXT_PAT=your_personal_access_token
az devops login

Default Configuration:

# Reset defaults if commands fail
az devops configure --defaults organization="" project=""
# Then set explicitly in each command
az pipelines list --organization https://dev.azure.com/myorg --project MyProject

Extension Issues:

# Update Azure DevOps extension
az extension update --name azure-devops

# Check extension version
az extension show --name azure-devops

Query Syntax:

# WIQL queries require proper escaping
az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.State] = 'Active' AND [System.AssignedTo] = 'me@example.com'"

Advanced Patterns

REST API Access

# Direct REST API calls for unsupported operations
az devops invoke --area build --resource builds --route-parameters project=MyProject --api-version 6.0 --http-method GET

# POST with JSON body
az devops invoke --area git --resource repositories --route-parameters project=MyProject --http-method POST --in-file payload.json

Scripting with JMESPath

# Complex queries using JMESPath
az pipelines runs list --query "[?result=='failed'].{Pipeline:pipeline.name, Branch:sourceBranch, Time:finishedDate}" --output table

# Filter and transform data
az repos pr list --query "[?targetRefName=='refs/heads/main' && status=='active'].{ID:pullRequestId, Title:title, Author:createdBy.displayName}"

Aliases and Functions

# Create shell aliases for common commands
alias azdo-pipelines="az pipelines list --output table"
alias azdo-prs="az repos pr list --status active --output table"
alias azdo-builds="az pipelines runs list --top 20 --output table"

# Function for quick PR creation
azdo-pr() {
  az repos pr create --source-branch "$(git branch --show-current)" --target-branch main --title "$1" --open
}

Extended Content

For comprehensive command references and advanced workflows, see:

  • Complete Command References: examples/pipelines-reference.md, examples/boards-reference.md, examples/repos-reference.md, examples/artifacts-reference.md
  • Advanced Workflows: examples/workflows/ci-cd-automation.md, examples/workflows/release-management.md, examples/workflows/team-collaboration.md
  • Testing Scenarios: tests/test-scenarios.md

References

适合场景

01

Azure 资源规划

02

云服务升级

03

基础设施检查

04

企业云环境自动化

能力概览

能力 1

整理 Azure 服务操作流程

能力 2

提示 CLI/MCP 前置条件

能力 3

辅助云资源检查和规划

能力 4

保留官方服务来源线索

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.85%
按下载量换算142

Claude

33.12%
按下载量换算131

Cursor

18.65%
按下载量换算74

Gemini CLI

9.74%
按下载量换算39

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills