adolisted
Install: claude install-skill pszypowicz/claude-skills
# Azure DevOps Operations
Use `az` CLI commands for most operations and bash scripts for complex multi-step orchestration.
## Authentication
Before running any command, check that auth env vars are set:
```bash
echo "ORG=${ADO_ORG:-MISSING} PROJECT=${ADO_PROJECT:-MISSING} PAT=${AZURE_DEVOPS_EXT_PAT:+set}"
```
If any are **MISSING**, stop and instruct the user:
> Please set the following in your terminal (outside Claude Code), then start a new session:
>
> ```
> export ADO_ORG=https://dev.azure.com/<org>
> export ADO_PROJECT=<project>
> export AZURE_DEVOPS_EXT_PAT=<pat>
> ```
Prefer the `az` CLI; fall back to `curl` + PAT for REST endpoints that `az` doesn't cover (`az rest` is ARM-only and does not work against ADO APIs).
All `az` commands use `--org "$ADO_ORG" -p "$ADO_PROJECT" --detect false`.
**Exception:** These subcommands are org-scoped - they take `--org` but **not** `--project`:
- `az boards work-item show`, `update`, `relation add`
- `az repos pr show`, `update`, `set-vote`
- `az repos pr work-item add`
- `az repos pr reviewer add`
- `az repos pr policy list`
- `az repos pr policy queue`
Only `az boards work-item create` and `az boards query` accept `--project`.
## PR Operations
```bash
# List PRs
az repos pr list -r <repo> --status active --top N --org "$ADO_ORG" -p "$ADO_PROJECT" --detect false
# Show PR details (org-scoped - no --project)
az repos pr show --id <ID> --org "$ADO_ORG" --detect false
# Show PR policy evaluations
az repos pr policy list