# azure-image-builder

This skill guides Packer builds for Azure managed images and Azure Compute Gallery. Use it when preparing custom images for Azure virtual machines.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2700 installs · ★ 909
- Author: hashicorp
- License: MPL-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/hashicorp/agent-skills/tree/HEAD/plugins/packer/skills/azure-image-builder/SKILL.md
- Updated: 2026-10-05
- HTML: https://affpapa.org/en/nevibecode/skills/azure-image-builder

## What it does

The skill covers Packer’s `azure-arm` builder for producing a managed image or publishing one to Azure Compute Gallery. Its HCL examples configure an Ubuntu Linux image, a region and a VM size, with shell provisioning shown for package updates.

Authentication examples use either a Service Principal with environment variables or Azure CLI authentication through Managed Identity. The build workflow runs `packer init .`, `packer validate .` and `packer build .`. Gallery image versions cannot be overwritten, so each build needs a version that does not already exist.

## Requirements
- Works with: Azure

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill azure-image-builder -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/azure-image-builder/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/azure-image-builder/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill azure-image-builder -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/azure-image-builder/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill azure-image-builder -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/azure-image-builder/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install hashicorp/agent-skills azure-image-builder
```

2. **Manually: put the files in place**
- File: `.github/skills/azure-image-builder/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill azure-image-builder -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/hashicorp/agent-skills --path plugins/packer/skills/azure-image-builder
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/azure-image-builder/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill azure-image-builder -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/hashicorp/agent-skills/tree/HEAD/plugins/packer/skills/azure-image-builder/SKILL.md

## When to use it
- build a managed Azure image from a Packer template
- publish an Ubuntu image to Azure Compute Gallery
- configure Packer credentials with a Service Principal
- validate a template before building an image

## Example prompts
- Create a Packer template for an Ubuntu managed image in Azure.
- Set up a Packer source that publishes to Azure Compute Gallery.
- Check my Packer template and give me the commands to build the Azure image.

## Similar
- [caveman-manage](https://affpapa.org/en/nevibecode/skills/caveman-manage.md) — skill · 104200 installs
- [workers-best-practices](https://affpapa.org/en/nevibecode/skills/cloudflare-workers-best-practices.md) — skill · 126100 installs
- [cloudflare-email-service](https://affpapa.org/en/nevibecode/skills/cloudflare-email-service.md) — skill · 102300 installs
- [firebase-basics](https://affpapa.org/en/nevibecode/skills/firebase-basics.md) — skill · 14100 installs
- [cloudflare-one](https://affpapa.org/en/nevibecode/skills/cloudflare-one.md) — skill · 93100 installs
- [cloudflare-one-migrations](https://affpapa.org/en/nevibecode/skills/cloudflare-one-migrations.md) — skill · 89500 installs

From the same set: [hashicorp/agent-skills](https://affpapa.org/en/nevibecode/by/hashicorp/agent-skills.md) — 20 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
