Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Azure Cli

BSecurity

Azure CLI (az) command syntax and scripting: authentication (interactive, service principal, managed identity, SSO), output formats and JMESPath queries, resource groups, VMs, storage accounts/blobs, networking (VNets, NSGs, load balancers, DNS), Entra ID, AKS, App Service, Functions, databases (SQL, Cosmos DB, MySQL, PostgreSQL), Key Vault, Monitor/alerting, and infrastructure scripting patterns. WHEN: \"az \", \"Azure CLI\", \"az login\", \"az vm\", \"az aks\", \"az storage\", \"az keyvault...

4 stars
0 votes
0 copies
0 views
Added 9/24/2026
devopsbashsqlnodeazuredatabasesecurity

Works with

cli

Security Analysis

B88/100
criticalAccesses sensitive system or user directories

Pro scans all 5 files and shows the line behind each finding

Scanned 9/24/2026

$npx -y skills add chrishuffman5/domain-expert --skill azure-cli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Azure Cli?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Azure Cli
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/chrishuffman5-azure-cli/badge)](https://www.skillsdirectory.com/skills/chrishuffman5-azure-cli)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: azure-cli
description: "Azure CLI (az) command syntax and scripting: authentication (interactive, service principal, managed identity, SSO), output formats and JMESPath queries, resource groups, VMs, storage accounts/blobs, networking (VNets, NSGs, load balancers, DNS), Entra ID, AKS, App Service, Functions, databases (SQL, Cosmos DB, MySQL, PostgreSQL), Key Vault, Monitor/alerting, and infrastructure scripting patterns. WHEN: \"az \", \"Azure CLI\", \"az login\", \"az vm\", \"az aks\", \"az storage\", \"az keyvault\", \"az monitor\", \"az ad\", \"az group\", \"az network\", \"az webapp\", \"az functionapp\", \"az sql\", \"az cosmosdb\", \"JMESPath\", \"az account\". Do NOT use for Azure architecture, landing zones, or multi-subscription strategy — that's the `cloud-platforms` plugin. This skill is about command syntax and scripting the CLI, not deciding what to provision."
license: MIT
---

# Azure CLI Expert

This skill covers the Azure CLI (`az`) for managing Azure resources from the command line. It has deep coverage of:

- Authentication (interactive, device code, service principal, managed identity, SSO)
- Output formats (json, table, tsv, yaml) and JMESPath query language
- Configuration, extensions, and global flags
- Resource groups, tags, locks
- Compute (VMs, availability sets, VM extensions, run commands)
- Storage (accounts, containers, blobs, SAS tokens)
- Networking (VNets, subnets, NSGs, public IPs, load balancers, DNS)
- Identity (Entra ID users, groups, app registrations, role assignments)
- AKS (cluster lifecycle, node pools, scaling, upgrades, kubectl integration)
- App Service and Functions (plans, web apps, deployment slots, function apps)
- Databases (Azure SQL, Cosmos DB, MySQL Flexible Server, PostgreSQL Flexible Server)
- Key Vault (secrets, keys, certificates, RBAC access)
- Monitor and Alerting (metrics, Log Analytics, alerts, action groups, diagnostics)
- Scripting patterns (idempotent create, error handling, batch operations, async --no-wait)

## How to Approach Tasks

When you receive a request:

1. **Classify** the request type:
   - **Authentication/config** -- Load `references/core.md`
   - **Service-specific commands** -- Load `references/commands.md`
   - **Infrastructure scripting** -- Load `references/patterns.md`
   - **JMESPath queries** -- Load `references/core.md`

2. **Verify subscription** -- Remind user to verify active subscription with `az account show` before destructive operations.

3. **Prefer idempotent patterns** -- Use check-before-create for scripts. Many `az` commands are not idempotent by default.

4. **Use JMESPath for extraction** -- Combine `--query` with `--output tsv` for scripting. Use `--output table` for human display.

5. **Provide complete commands** -- Include all required flags. Show the `--resource-group` and `--name` flags explicitly.

## Core Expertise

### Authentication

```bash
# Interactive login
az login

# Device code (headless/SSH)
az login --use-device-code

# Service principal
az login --service-principal --username "$APP_ID" --password "$SP_PASSWORD" --tenant "$TENANT_ID"

# Managed identity
az login --identity

# Switch subscription
az account set --subscription "My Subscription"
az account show --query "{Sub:id, Tenant:tenantId}" --output json
```

### Output Formats and JMESPath

```bash
# Output formats: json, jsonc, table, tsv, yaml, yamlc, none
az vm list --output table

# JMESPath queries
az vm list --query "[].{Name:name, RG:resourceGroup, Location:location}" --output table
az vm list --query "[?location=='eastus'].name" --output tsv
az vm list --query "length(@)" --output tsv

# Capture value for scripting
VM_IP=$(az vm list-ip-addresses -g my-rg -n my-vm \
  --query "[0].virtualMachine.network.publicIpAddresses[0].ipAddress" --output tsv)
```

### Resource Groups

```bash
az group create --name my-rg --location eastus --tags env=prod
az group list --query "[?tags.env=='prod'].name" --output tsv
az group exists --name my-rg
az group delete --name my-rg --yes --no-wait
```

### Virtual Machines

```bash
az vm create -g my-rg -n my-vm --image Ubuntu2204 --size Standard_B2s \
  --admin-username azureuser --ssh-key-values ~/.ssh/id_rsa.pub

az vm list -g my-rg --show-details \
  --query "[].{Name:name, State:powerState, IP:publicIps}" --output table

az vm start -g my-rg -n my-vm
az vm deallocate -g my-rg -n my-vm
az vm delete -g my-rg -n my-vm --yes
```

### Storage

```bash
az storage account create -n mystorageacct -g my-rg -l eastus --sku Standard_LRS
az storage blob upload -c my-container -f ./file.csv -n reports/file.csv --connection-string "$CONN"
az storage blob list -c my-container --connection-string "$CONN" --output table
```

### Networking

```bash
az network vnet create -g my-rg -n my-vnet --address-prefix 10.0.0.0/16
az network vnet subnet create -g my-rg --vnet-name my-vnet -n app-subnet --address-prefix 10.0.1.0/24
az network nsg create -g my-rg -n web-nsg
az network nsg rule create -g my-rg --nsg-name web-nsg -n AllowHTTP \
  --priority 100 --protocol Tcp --destination-port-ranges 80 --access Allow --direction Inbound
```

### AKS

```bash
az aks create -g my-rg -n my-aks --node-count 3 --enable-managed-identity --generate-ssh-keys
az aks get-credentials -g my-rg -n my-aks --overwrite-existing
az aks scale -g my-rg -n my-aks --node-count 5
```

### Key Vault

```bash
az keyvault create -n my-kv -g my-rg -l eastus --enable-rbac-authorization true
az keyvault secret set --vault-name my-kv -n db-password --value "$DB_PASS"
az keyvault secret show --vault-name my-kv -n db-password --query value --output tsv
```

## Common Pitfalls

**1. Not setting the correct subscription**
Always verify with `az account show`. Use `az account set --subscription NAME` before running commands.

**2. Forgetting --yes on destructive commands**
`az group delete` and `az vm delete` prompt interactively by default. Add `--yes` in scripts.

**3. Not using --no-wait for long operations**
VM creation, AKS scaling, and resource group deletion can take minutes. Use `--no-wait` and poll status separately.

**4. Hardcoding storage keys instead of using SAS or RBAC**
Prefer SAS tokens with expiry or RBAC-based access (Storage Blob Data Contributor role) over shared keys.

**5. Missing --permanent on firewall-like resources**
Unlike Linux firewalld, Azure NSG rules are always persistent. But forgetting `--output tsv` in variable capture adds headers/formatting.

**6. Using `az resource show` for existence checks without suppressing errors**
Always redirect stderr: `az group show --name "$RG" &>/dev/null`

**7. Not using `--query` for variable capture**
Parsing JSON with jq works but `--query` with `--output tsv` is faster and requires no extra tool.

**8. Creating storage accounts with public blob access enabled**
Always pass `--allow-blob-public-access false` unless public access is explicitly needed.

**9. Forgetting to associate NSGs with subnets**
Creating an NSG and adding rules is not enough. Use `az network vnet subnet update --network-security-group`.

**10. Not tagging resources**
Tags enable cost tracking, automation (batch delete by tag), and ownership. Always tag with at least `env` and `owner`.

## Reference Files

Load these when you need deep knowledge for a specific area:

- `references/core.md` -- Authentication methods, output formats, JMESPath query patterns, configuration, extensions, global flags. Read for auth, querying, and CLI configuration questions.
- `references/commands.md` -- Complete command reference by service: resource groups, VMs, storage, networking, identity, AKS, App Service, databases, Key Vault, Monitor. Read for specific service commands.
- `references/patterns.md` -- Scripting patterns: idempotent create, error handling, --no-wait async, batch operations with loops and xargs, cleanup with trap. Read for infrastructure automation scripts.

## Scripts

- `scripts/01-azure-provision.sh` -- Complete idempotent environment provisioning (RG, VNet, NSG, VM, Storage)

Attribution

chrishuffman5chrishuffman5
View sourceSee grades on GitHubMore from chrishuffman5 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

401991 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2699140 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

971540 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953190 votes
View all in devops →