Azure CLI

The Azure CLI (`az`) manages Azure resources and services from the terminal.

25 stars

Best use case

Azure CLI is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

The Azure CLI (`az`) manages Azure resources and services from the terminal.

Teams using Azure CLI should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/azure-cli/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/TerminalSkills/skills/azure-cli/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/azure-cli/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Azure CLI Compares

Feature / AgentAzure CLIStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

The Azure CLI (`az`) manages Azure resources and services from the terminal.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Azure CLI

The Azure CLI (`az`) manages Azure resources and services from the terminal.

## Setup

```bash
# Install Azure CLI
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

# Login and set subscription
az login
az account set --subscription "My Subscription"
az account show

# Configure defaults
az configure --defaults location=eastus group=my-resource-group
```

## Resource Groups

```bash
# Resource group management
az group create --name my-rg --location eastus --tags Environment=production
az group list --output table
az group delete --name my-rg --yes --no-wait
```

## Virtual Machines

```bash
# Create a VM
az vm create \
  --resource-group my-rg \
  --name web-vm \
  --image Ubuntu2204 \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard \
  --vnet-name my-vnet --subnet default \
  --nsg my-nsg \
  --tags Environment=production Role=web

# List VMs
az vm list -g my-rg \
  --query "[].{Name:name,Size:hardwareProfile.vmSize,State:powerState}" -o table

# Manage VM state
az vm stop -g my-rg -n web-vm
az vm start -g my-rg -n web-vm
az vm deallocate -g my-rg -n web-vm
az vm delete -g my-rg -n web-vm --yes

# Open port
az vm open-port -g my-rg -n web-vm --port 443 --priority 100

# SSH into VM
az ssh vm -g my-rg -n web-vm
```

## Storage

```bash
# Create storage account and container
az storage account create \
  --name mystorageacct \
  --resource-group my-rg \
  --location eastus \
  --sku Standard_LRS \
  --encryption-services blob \
  --min-tls-version TLS1_2

az storage container create \
  --name mycontainer \
  --account-name mystorageacct \
  --auth-mode login

# Upload and download
az storage blob upload \
  --account-name mystorageacct \
  --container-name mycontainer \
  --file ./data.json --name data.json

az storage blob download \
  --account-name mystorageacct \
  --container-name mycontainer \
  --name data.json --file ./downloaded.json

# List blobs
az storage blob list \
  --account-name mystorageacct \
  --container-name mycontainer -o table

# Generate SAS token
az storage blob generate-sas \
  --account-name mystorageacct \
  --container-name mycontainer \
  --name data.json \
  --permissions r --expiry 2024-12-31
```

## Azure Functions

```bash
# Create Function App
az functionapp create \
  --resource-group my-rg \
  --name my-func-app \
  --consumption-plan-location eastus \
  --runtime python --runtime-version 3.11 \
  --functions-version 4 \
  --storage-account mystorageacct \
  --os-type Linux

# Deploy function code
func azure functionapp publish my-func-app

# App settings
az functionapp config appsettings set \
  --name my-func-app -g my-rg \
  --settings "DB_HOST=mydb.postgres.database.azure.com" "ENV=production"

# View logs
az functionapp log tail --name my-func-app -g my-rg
```

## AKS (Kubernetes)

```bash
# Create AKS cluster
az aks create \
  --resource-group my-rg \
  --name my-aks \
  --node-count 3 \
  --node-vm-size Standard_DS2_v2 \
  --enable-managed-identity \
  --generate-ssh-keys

# Get credentials
az aks get-credentials -g my-rg -n my-aks

# Scale node pool
az aks scale -g my-rg -n my-aks --node-count 5

# Enable autoscaler
az aks update -g my-rg -n my-aks \
  --enable-cluster-autoscaler --min-count 1 --max-count 10
```

## Networking

```bash
# Create VNet and subnet
az network vnet create \
  --resource-group my-rg \
  --name my-vnet \
  --address-prefix 10.0.0.0/16 \
  --subnet-name default --subnet-prefix 10.0.1.0/24

# Network Security Group
az network nsg create -g my-rg -n my-nsg
az network nsg rule create -g my-rg --nsg-name my-nsg \
  -n allow-https --priority 100 \
  --destination-port-ranges 443 --access Allow --protocol Tcp
```

## Useful Patterns

```bash
# Query with JMESPath
az vm list -g my-rg --query "[?powerState=='VM running'].name" -o tsv

# Export ARM template from existing resources
az group export -g my-rg > template.json

# Cost analysis
az consumption usage list --start-date 2024-01-01 --end-date 2024-01-31

# Monitor and alerts
az monitor metrics list --resource /subscriptions/.../my-vm \
  --metric "Percentage CPU" --interval PT1H
```

Related Skills

azure-ml-deployer

25
from ComeOnOliver/skillshub

Azure Ml Deployer - Auto-activating skill for ML Deployment. Triggers on: azure ml deployer, azure ml deployer Part of the ML Deployment skill category.

azure-verified-modules

25
from ComeOnOliver/skillshub

Azure Verified Modules (AVM) requirements and best practices for developing certified Azure Terraform modules. Use when creating or reviewing Azure modules that need AVM certification.

azure-image-builder

25
from ComeOnOliver/skillshub

Build Azure managed images and Azure Compute Gallery images with Packer. Use when creating custom images for Azure VMs.

terraform-azurerm-set-diff-analyzer

25
from ComeOnOliver/skillshub

Analyze Terraform plan JSON output for AzureRM Provider to distinguish between false-positive diffs (order-only changes in Set-type attributes) and actual resource changes. Use when reviewing terraform plan output for Azure resources like Application Gateway, Load Balancer, Firewall, Front Door, NSG, and other resources with Set-type attributes that cause spurious diffs due to internal ordering changes.

azure-static-web-apps

25
from ComeOnOliver/skillshub

Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development, configuring staticwebapp.config.json, adding Azure Functions APIs to SWA, or setting up GitHub Actions CI/CD for Static Web Apps.

azure-resource-health-diagnose

25
from ComeOnOliver/skillshub

Analyze Azure resource health, diagnose issues from logs and telemetry, and create a remediation plan for identified problems.

azure-pricing

25
from ComeOnOliver/skillshub

Fetches real-time Azure retail pricing using the Azure Retail Prices API (prices.azure.com) and estimates Copilot Studio agent credit consumption. Use when the user asks about the cost of any Azure service, wants to compare SKU prices, needs pricing data for a cost estimate, mentions Azure pricing, Azure costs, Azure billing, or asks about Copilot Studio pricing, Copilot Credits, or agent usage estimation. Covers compute, storage, networking, databases, AI, Copilot Studio, and all other Azure service families.

azure-devops-cli

25
from ComeOnOliver/skillshub

Manage Azure DevOps resources via CLI including projects, repos, pipelines, builds, pull requests, work items, artifacts, and service endpoints. Use when working with Azure DevOps, az commands, devops automation, CI/CD, or when user mentions Azure DevOps CLI.

azure-deployment-preflight

25
from ComeOnOliver/skillshub

Performs comprehensive preflight validation of Bicep deployments to Azure, including template syntax validation, what-if analysis, and permission checks. Use this skill before any deployment to Azure to preview changes, identify potential issues, and ensure the deployment will succeed. Activate when users mention deploying to Azure, validating Bicep files, checking deployment permissions, previewing infrastructure changes, running what-if, or preparing for azd provision.

microsoft-azure-webjobs-extensions-authentication-events-dotnet

25
from ComeOnOliver/skillshub

Microsoft Entra Authentication Events SDK for .NET. Azure Functions triggers for custom authentication extensions. Use for token enrichment, custom claims, attribute collection, and OTP customization in Entra ID. Triggers: "Authentication Events", "WebJobsAuthenticationEventsTrigger", "OnTokenIssuanceStart", "OnAttributeCollectionStart", "custom claims", "token enrichment", "Entra custom extension", "authentication extension".

azure-web-pubsub-ts

25
from ComeOnOliver/skillshub

Build real-time messaging applications using Azure Web PubSub SDKs for JavaScript (@azure/web-pubsub, @azure/web-pubsub-client). Use when implementing WebSocket-based real-time features, pub/sub messaging, group chat, or live notifications.

azure-storage-queue-ts

25
from ComeOnOliver/skillshub

Azure Queue Storage JavaScript/TypeScript SDK (@azure/storage-queue) for message queue operations. Use for sending, receiving, peeking, and deleting messages in queues. Supports visibility timeout, message encoding, and batch operations. Triggers: "queue storage", "@azure/storage-queue", "QueueServiceClient", "QueueClient", "send message", "receive message", "dequeue", "visibility timeout".