# Azure CLI

> Azure CLI operations for cloud resource management

- Skill: `paulanunes85/azure-cli` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add paulanunes85/azure-cli`
- Raw SKILL.md: https://api.skillmd.com/api/skills/paulanunes85/azure-cli/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: paulanunes85 (https://skillmd.com/u/paulanunes85)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/paulanunes85/azure-cli

---


## When to Use
- Azure resource queries
- AKS cluster management
- Key Vault operations
- ACR management
- RBAC configuration

## Prerequisites
- Azure CLI installed
- Authenticated: az login or managed identity
- Subscription selected
- Appropriate RBAC roles

## Commands

### Context
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# 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
1. Use -o table for readable output
2. Use -o json for parsing with jq
3. Use --query for filtering
4. Never expose secrets in output
5. Verify subscription before operations

## Output Format
1. Command executed
2. Results in table format
3. Warnings or issues
4. Next steps

## Integration with Agents
Used by: @terraform, @security, @sre, @test

