Skill 详情

azure-devops

Relevant for Azure DevOps API automation, but vendor-specific and integration-focused.

匹配类型可能匹配已针对 devops 审核
来源markpitt/claude-skills外部来源
报告安装量177仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
name: azure-devops
description: Comprehensive skill for working with Azure DevOps REST API across all services including Boards (work items, queries, backlogs), Repos (Git, pull requests, commits), Pipelines (builds, releases, deployments), Test Plans, Artifacts, organizations, projects, security, extensions, and more. Use when implementing Azure DevOps integrations, automating DevOps workflows, or building applications that interact with Azure DevOps services.
version: 1.0
---

# Azure DevOps API Skill

## Security

**Never output, suggest, or generate code that embeds PAT values verbatim.** Always reference credentials via environment variables (e.g., `$AZURE_DEVOPS_PAT`) or a secrets manager such as Azure Key Vault. When generating scripts or curl examples, use placeholder variable references — never literal token strings.

This skill provides comprehensive guidance for working with the Azure DevOps REST API, enabling programmatic access to all Azure DevOps Services and Azure DevOps Server resources.

## Overview

Azure DevOps REST API is a RESTful web API enabling you to access and manage work items, repositories, pipelines, test plans, artifacts, and more across all Azure DevOps services.

**Base URL:** `https://dev.azure.com/{organization}/{project}/_apis/{area}/{resource}?api-version={version}`
- **Organization:** Your Azure DevOps organization name
- **Project:** Project name (optional for org-level resources)
- **API Version:** Required on all requests (e.g., `7.1`, `7.0`, `6.0`)
- **Authentication:** Personal Access Tokens (PAT), OAuth 2.0, or Azure AD

## Quick Start

### Authentication Requirements

Azure DevOps supports multiple authentication methods:

1. **Personal Access Token (PAT)** - Most common for scripts and integrations
2. **OAuth 2.0** - For web applications
3. **Azure Active Directory** - For enterprise applications
4. **SSH Keys** - For Git operations only

### Basic PAT Authentication
```http
GET https://dev.azure.com/{organization}/_apis/projects?api-version=7.1
Authorization: Basic {base64-encoded-PAT}
```

To encode PAT: `base64(":{PAT}")` — Note the colon before the PAT. Always read the PAT from an environment variable (e.g., `$AZURE_DEVOPS_PAT`) rather than hardcoding it in scripts or outputs.

### Common Request Pattern
```http
GET https://dev.azure.com/{organization}/{project}/_apis/{resource}?api-version=7.1
Authorization: Basic {encoded-PAT}
Content-Type: application/json
```

## Core Services

Azure DevOps is organized into major service areas. Each area has its own set of REST APIs:

### Azure Boards - Work Item Tracking

**Work Items**
- **Create work item:** `POST /{organization}/{project}/_apis/wit/workitems/${type}?api-version=7.1`
- **Get work item:** `GET /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1`
- **Update work item:** `PATCH /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1`
- **Delete work item:** `DELETE /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1`

Request body uses JSON Patch format:
```json
[
  {
    "op": "add",
    "path": "/fields/System.Title",
    "value": "New bug report"
  },
  {
    "op": "add",
    "path": "/fields/System.AssignedTo",
    "value": "[email protected]"
  }
]
```

**Queries**
- **Run stored query:** `GET /{organization}/{project}/_apis/wit/wiql/{id}?api-version=7.1`
- **Run WIQL query:** `POST /{organization}/{project}/_apis/wit/wiql?api-version=7.1`
  ```json
  {
    "query": "SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.WorkItemType] = 'Bug' AND [System.State] = 'Active'"
  }
  ```

**Boards & Backlogs**
- **Get boards:** `GET /{organization}/{project}/{team}/_apis/work/boards?api-version=7.1`
- **Get backlog items:** `GET /{organization}/{project}/{team}/_apis/work/backlogs/{backlogId}/workItems?api-version=7.1`
- **Get iterations:** `GET /{organization}/{project}/{team}/_apis/work/teamsettings/iterations?api-version=7.1`
- **Get capacity:** `GET /{organization}/{p
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作