Azure CLI
Use this skill to turn Azure operations requests into ordered az command workflows, verify the active cloud context, and return resource, identity, AKS, ACR, Key Vault, RBAC, or subscription evidence without exposing secrets.
When to invoke
- "Check the current Azure subscription and account context."
- "Query Azure resources in a resource group."
- "Get AKS credentials or inspect an AKS cluster."
- "List Key Vault secret names or ACR repositories."
- "Configure or validate Azure RBAC, managed identity, or federated credentials."
Prerequisites and context
- Azure CLI installed.
- Authenticated with
az login or managed identity.
- Subscription selected.
- Appropriate RBAC roles.
Procedure
- Confirm authentication and subscription context before querying or changing Azure resources.
- Select the narrowest
az command for the requested resource type.
- Prefer readable table output for human review and JSON output when another tool will parse the result.
- Redact or avoid secret values in any returned output.
- Return the result using the output template.
Context
# Show current account
az account show -o table
# List subscriptions
az account list -o table --query "[].{Name:name, ID:id, State:state}"
# Set subscription
az account set --subscription "<subscription-id>"
Resource queries
# List resources in RG
az resource list -g <resource-group> -o table
# Show resource
az resource show --ids <resource-id>
# Query with JMESPath
az resource list -g <rg> --query "[?type=='Microsoft.ContainerService/managedClusters']"
AKS operations
# Get credentials
az aks get-credentials -g <rg> -n <cluster> --overwrite-existing
# Show cluster
az aks show -g <rg> -n <cluster> -o table
# Node pools
az aks nodepool list -g <rg> --cluster-name <cluster> -o table
# Scale cluster
az aks scale -g <rg> -n <cluster> --node-count 5
Key Vault
# List secrets (names only)
az keyvault secret list --vault-name <kv> -o table --query "[].{Name:name}"
# Get secret
az keyvault secret show --vault-name <kv> -n <secret> --query value -o tsv
ACR
# List repositories
az acr repository list -n <acr> -o table
# Show tags
az acr repository show-tags -n <acr> --repository <repo> --orderby time_desc
Best practices
- Use -o table for readable output.
- Use -o json for parsing with jq.
- Use --query for filtering.
- Never expose secrets in output.
- Verify subscription before operations.
Output template
Return exactly this structure:
**Status:** PASS | FAIL | BLOCKED
**Summary:** One sentence describing the Azure resource, identity, AKS, ACR, Key Vault, or subscription outcome.
### Details
1. Command executed: `<az command>`
2. Subscription context: `<subscription name or ID>`
3. Target resource: `<resource group, resource ID, AKS cluster, ACR, Key Vault, or not applicable>`
4. Results: `<table summary, JSON summary, or operation result>`
5. Warnings or issues: `<RBAC, context, secret-handling, or none>`
6. Next steps: `<next Azure action or none>`
### Validation
- Context check: `<az account show evidence or reason not checked>`
- Command result: `<exit code or observed az output>`
Limits
- Do not use this skill for Terraform IaC.
- Use
azure-terraform-cli (skill) instead when the task is Terraform init, plan, apply, validate, fmt, state, import, module development, provider locks, tfvars, or tfsec scanning.
- Do not use this skill for Azure architecture patterns.
- Use
azure-infrastructure (skill) instead when the task is architecture design, hub-spoke networking, private endpoints, Workload Identity patterns, naming, or tagging strategy.
- Do not use this skill for Kubernetes kubectl commands.
- Use
azure-kubectl-cli (skill) instead when the task is direct Kubernetes resource inspection, logs, rollout status, events, or manifests.
- Do not use this skill for Helm charts.
- Use
azure-helm-cli (skill) instead when the task is chart repositories, values, templates, releases, upgrades, or rollbacks.
Progressive disclosure and bundled resources
scripts/setup-identity-federation.sh: use when the Azure task requires identity federation setup automation.
Related primitives
| Name |
Type |
Use it when |
open-horizons-terraform |
agent |
Planning or implementing Terraform-based Azure infrastructure changes. |
open-horizons-security-reviewer |
agent |
Reviewing Azure RBAC, identity, or secret-handling risk. |
open-horizons-sre-investigator |
agent |
Diagnosing Azure-side operational issues for running services. |
open-horizons-azure-readiness |
agent |
Validating Azure subscription, provider, quota, and resource readiness. |
azure-terraform-cli |
skill |
Managing infrastructure through Terraform rather than direct az commands. |
azure-kubectl-cli |
skill |
Inspecting Kubernetes resources after AKS credentials are configured. |
azure-infrastructure |
skill |
Designing Azure architecture patterns before CLI execution. |
Quality gate
1---2name: azure-cli3description: Azure CLI operations run az commands for cloud resource discovery, subscription context, identity, AKS, ACR, Key Vault, RBAC, managed identity, and federated credential workflows. Use this skill when working with az login, az account, az aks, az acr, az keyvault, resource group checks, or Azure day-2 operations.4---56<!-- Generated from harness/github-copilot/skills/azure-cli/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Azure CLI910Use this skill to turn Azure operations requests into ordered `az` command workflows, verify the active cloud context, and return resource, identity, AKS, ACR, Key Vault, RBAC, or subscription evidence without exposing secrets.1112## When to invoke1314- "Check the current Azure subscription and account context."15- "Query Azure resources in a resource group."16- "Get AKS credentials or inspect an AKS cluster."17- "List Key Vault secret names or ACR repositories."18- "Configure or validate Azure RBAC, managed identity, or federated credentials."1920## Prerequisites and context2122- Azure CLI installed.23- Authenticated with `az login` or managed identity.24- Subscription selected.25- Appropriate RBAC roles.2627## Procedure28291. Confirm authentication and subscription context before querying or changing Azure resources.302. Select the narrowest `az` command for the requested resource type.313. Prefer readable table output for human review and JSON output when another tool will parse the result.324. Redact or avoid secret values in any returned output.335. Return the result using the output template.3435### Context3637```bash38# Show current account39az account show -o table4041# List subscriptions42az account list -o table --query "[].{Name:name, ID:id, State:state}"4344# Set subscription45az account set --subscription "<subscription-id>"46```4748### Resource queries4950```bash51# List resources in RG52az resource list -g <resource-group> -o table5354# Show resource55az resource show --ids <resource-id>5657# Query with JMESPath58az resource list -g <rg> --query "[?type=='Microsoft.ContainerService/managedClusters']"59```6061### AKS operations6263```bash64# Get credentials65az aks get-credentials -g <rg> -n <cluster> --overwrite-existing6667# Show cluster68az aks show -g <rg> -n <cluster> -o table6970# Node pools71az aks nodepool list -g <rg> --cluster-name <cluster> -o table7273# Scale cluster74az aks scale -g <rg> -n <cluster> --node-count 575```7677### Key Vault7879```bash80# List secrets (names only)81az keyvault secret list --vault-name <kv> -o table --query "[].{Name:name}"8283# Get secret84az keyvault secret show --vault-name <kv> -n <secret> --query value -o tsv85```8687### ACR8889```bash90# List repositories91az acr repository list -n <acr> -o table9293# Show tags94az acr repository show-tags -n <acr> --repository <repo> --orderby time_desc95```9697### Best practices98991. Use -o table for readable output.1002. Use -o json for parsing with jq.1013. Use --query for filtering.1024. Never expose secrets in output.1035. Verify subscription before operations.104105## Output template106107Return exactly this structure:108109```markdown110**Status:** PASS | FAIL | BLOCKED111**Summary:** One sentence describing the Azure resource, identity, AKS, ACR, Key Vault, or subscription outcome.112113### Details1141. Command executed: `<az command>`1152. Subscription context: `<subscription name or ID>`1163. Target resource: `<resource group, resource ID, AKS cluster, ACR, Key Vault, or not applicable>`1174. Results: `<table summary, JSON summary, or operation result>`1185. Warnings or issues: `<RBAC, context, secret-handling, or none>`1196. Next steps: `<next Azure action or none>`120121### Validation122- Context check: `<az account show evidence or reason not checked>`123- Command result: `<exit code or observed az output>`124```125126## Limits127128- Do not use this skill for Terraform IaC.129- Use `azure-terraform-cli` (`skill`) instead when the task is Terraform init, plan, apply, validate, fmt, state, import, module development, provider locks, tfvars, or tfsec scanning.130- Do not use this skill for Azure architecture patterns.131- Use `azure-infrastructure` (`skill`) instead when the task is architecture design, hub-spoke networking, private endpoints, Workload Identity patterns, naming, or tagging strategy.132- Do not use this skill for Kubernetes kubectl commands.133- Use `azure-kubectl-cli` (`skill`) instead when the task is direct Kubernetes resource inspection, logs, rollout status, events, or manifests.134- Do not use this skill for Helm charts.135- Use `azure-helm-cli` (`skill`) instead when the task is chart repositories, values, templates, releases, upgrades, or rollbacks.136137## Progressive disclosure and bundled resources138139- `scripts/setup-identity-federation.sh`: use when the Azure task requires identity federation setup automation.140141## Related primitives142143| Name | Type | Use it when |144| --- | --- | --- |145| `open-horizons-terraform` | `agent` | Planning or implementing Terraform-based Azure infrastructure changes. |146| `open-horizons-security-reviewer` | `agent` | Reviewing Azure RBAC, identity, or secret-handling risk. |147| `open-horizons-sre-investigator` | `agent` | Diagnosing Azure-side operational issues for running services. |148| `open-horizons-azure-readiness` | `agent` | Validating Azure subscription, provider, quota, and resource readiness. |149| `azure-terraform-cli` | `skill` | Managing infrastructure through Terraform rather than direct `az` commands. |150| `azure-kubectl-cli` | `skill` | Inspecting Kubernetes resources after AKS credentials are configured. |151| `azure-infrastructure` | `skill` | Designing Azure architecture patterns before CLI execution. |152153## Quality gate154155- [ ] `name` is `azure-cli` and matches the parent directory.156- [ ] The active subscription is verified before resource operations.157- [ ] Secret values are not exposed in the response unless the user explicitly requested retrieval and the value is handled safely.158- [ ] `--query` or output mode choices are reported when they materially affect the result.159- [ ] AKS, ACR, and Key Vault commands include the target resource name or resource group when applicable.160- [ ] The bundled script path listed above exists before referring to it.