/major-ai-skills:azure-clifrom major-ai-skills
Operate Azure CLI (az) with subscription-scoped ARM, managed identities, AKS/App Service/Key Vault workflows, and RBAC patterns agents mis-scope.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The Azure CLI (az) calls Azure Resource Manager (ARM). Work is scoped by tenant → subscription → resource group → resource. Auth is interactive login, service principal, managed identity, or federated OIDC (GitHub Actions). Agents always resolve tenant, subscription, and location before mutating—Azure often returns NotFound / “subscription doesn’t exist” when the real issue is wrong context or missing RBAC, not a missing resource name.
┌─────────────────────────────────────────────────────────────┐
│ Azure CLI → ARM path │
│ │
│ Identity │
│ ├── az login (user / device code) │
│ ├── SP / federated credential (OIDC CI) │
│ └── Managed identity (compute / Automation) │
│ │
│ Scope │
│ ├── Tenant → Subscription (az account set) │
│ ├── Resource group + location defaults │
│ └── RBAC assignments (role + scope + principal) │
│ │
│ Workloads │
│ └── AKS · App Service · ACR · Storage · Key Vault · … │
└─────────────────────────────────────────────────────────────┘
Use when
Do not use when
@terraform / @pulumi (Bicep OK for Azure-native).@kubernetes.@vault.az account show and az account list -o table before every write session.--subscription / --resource-group explicitly on mutates; do not trust ambient defaults in scripts.--assignee-object-id + --assignee-principal-type to skip Entra lookups that fail for SPs (Insufficient privileges).--output json + JMESPath --query for automation; never scrape human tables.az account clear + az login, or new shell)—ARM/RBAC can lag (~minutes).# Login + subscription gate (use device code in remote shells)
az login
# az login --use-device-code
az account list -o table
az account set --subscription "00000000-0000-0000-0000-000000000000"
az account show --query "{name:name, id:id, tenant:tenantId}" -o json
az configure --defaults group=rg-prod-api location=eastus
az group create -n rg-prod-api -l eastus
az appservice plan create -g rg-prod-api -n plan-api --sku P1v3 --is-linux
az webapp create -g rg-prod-api -p plan-api -n app-api-prod --runtime "NODE:20-lts"
# User-assigned identity + ACR pull (no client secret)
az identity create -g rg-prod-api -n id-api
PRINCIPAL=$(az identity show -g rg-prod-api -n id-api --query principalId -o tsv)
az webapp identity assign -g rg-prod-api -n app-api-prod --identities \
"$(az identity show -g rg-prod-api -n id-api --query id -o tsv)"
az role assignment create \
--assignee-object-id "$PRINCIPAL" \
--assignee-principal-type ServicePrincipal \
--role "AcrPull" \
--scope "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-prod-api/providers/Microsoft.ContainerRegistry/registries/acrprod"
# AKS kubeconfig → hand off to @kubernetes
az aks get-credentials -g rg-prod-api -n aks-prod --overwrite-existing
az aks show -g rg-prod-api -n aks-prod --query "powerState.code" -o tsv
CI (federated identity / OIDC — prefer over SP password):
# After azure/login action with client-id + tenant-id + subscription-id
az account show
az group list --query "[].name" -o tsv
What-if for large ARM/Bicep (prefer over blind az deployment group create):
az deployment group what-if -g rg-prod-api -f main.bicep
| Signature | Likely cause | Fix path |
|---|---|---|
The subscription of '…' doesn't exist in cloud 'AzureCloud' | No RBAC on sub; stale account cache; wrong tenant | Grant ≥ Reader on sub; az account clear && az login; verify tenant |
Resource NotFound but Portal shows it | Wrong subscription/RG context | az account show; pass --subscription / -g |
Insufficient privileges on role assignment create | SP cannot read Entra directory | Use --assignee-object-id; or grant Directory Readers carefully |
| RBAC “done” but still 401 | ARM cache / propagation delay | Wait up to ~10 min; new shell; retry |
MI / Automation: SubscriptionId cannot be null | Identity has zero role assignments | Assign Reader/Contributor (least privilege) at needed scope |
| Extension command missing | Extension not installed / version skew | az extension add --name <n>; pin versions in README/CI |
| Interactive login fails in CI | No browser / device flow | Use OIDC federated credential or MI—not user login |
rg-<env>-<app>, aks-<env>, id-<app>; tag with env, owner, service.CanNotDelete) when policy allows.@vault when org-standard.az version + extensions in the repo README.az scripts to @terraform / @pulumi / Bicep.az scripts drift; IaC owns long-lived topology.@kubernetes — AKS workload ops after get-credentials@terraform / @pulumi — declarative Azure infrastructure@vault — org secret workflows vs Key Vault@docker — images for ACR / App Service containers@aws-cli / @gcloud-cli — analogous multi-cloud CLI patterns@github-actions — OIDC login to AzureMANDATORY: Resolve tenant/subscription with
az account showbefore mutating. Prefer managed identity and federated OIDC over client secrets. Use--assignee-object-idfor RBAC from SPs. Never print Key Vault secret values or SP passwords. Refresh login cache after new grants. If subscription or blast radius is unclear, stop and ask.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.