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
Credentials come from environment variables exported in the terminal **before** the session starts; they are inherited read-only. This skill only reads them - it never exports or mutates session credentials. The expected shape is the plain triple `ADO_ORG`, `ADO_PROJECT`, `AZURE_DEVOPS_EXT_PAT` - commands use these directly.
When nothing is exported, an `az login` session can stand in (see "az CLI token fallback" below).
Check what is available:
```bash
echo "ORG=${ADO_ORG:-MISSING} PROJECT=${ADO_PROJECT:-MISSING} PAT=${AZURE_DEVOPS_EXT_PAT:+set} TOKEN=${ADO_TOKEN:+set}"
az account show --query '[user.name, tenantId]' -o tsv 2>/dev/null || echo "az: not logged in"
# Entra tenant behind the org (anonymous request, no credentials needed)
curl -sS -o /dev/null -D - "$ADO_ORG/_apis/connectionData" | tr -d '\r' \
| awk -F': *' 'tolower($1) == "x-vss-resourcetenant" { print "org tenant: " $2 }'
```
When the two tenants differ, plain `az devops` commands fail under the az login fallback, so run them through `ado-exec.sh` (see "az CLI token fallback" below).
### az CLI token fallback (no PAT exported)
Once org and project are known, auth resolves in this order (mirrors `scripts/lib/ado-client.sh`, which the bundled scripts use automatically):
1. **`AZURE_DEVOPS_EXT_PAT`** - PAT. The `az` CLI picks it up automatically; curl uses Basic