# windows-builder

A skill for building Windows images with Packer over WinRM and PowerShell provisioners. Useful for Windows AMIs, Azure images and VMware templates.

- 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/windows-builder/SKILL.md
- Updated: 2026-10-05
- HTML: https://affpapa.org/en/nevibecode/skills/windows-builder

## What it does

The skill collects Packer patterns for Windows: WinRM as the communicator, PowerShell provisioners for software and updates, cleanup of temp files and the Windows Update cache before the image is captured. Examples cover AWS (`amazon-ebs`) and Azure (`azure-arm`), though the patterns themselves are platform-agnostic.

You get ready HCL blocks plus `scripts/setup-winrm.ps1`, which enables WinRM, opens ports 5985 and 5986 and restarts the service. Separate sections handle Chocolatey, IIS and package installs via `choco install`, and a `windows-restart` provisioner waits out reboots.

Budget your time. Windows Updates alone can run 45 to 120 minutes, so the examples set the provisioner `timeout = "2h"` and `winrm_timeout = "15m"`. A failed build can leave resources running, so check your cloud account after every bad run. Azure builds need `client_id`, `client_secret`, `subscription_id` and `tenant_id`.

## Requirements
- Works with: Azure

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill windows-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/windows-builder/SKILL.md

## When to use it
- get WinRM talking to a Windows instance so Packer can connect
- build a Windows AMI from a current Amazon base image
- produce an Azure image with software preinstalled
- install Windows Updates during the build and survive the reboots
- clear temp files and the update cache before capturing the image

## Example prompts
- Build a Windows AMI with Packer over WinRM, base image Windows Server 2022
- Add Chrome and 7zip to the template with Chocolatey
- Why does the build fail on a WinRM timeout and how do I fix it?

## Similar
- [powershell-master](https://affpapa.org/en/nevibecode/skills/powershell-master.md) — skill · 1100 installs
- [it-ops-orchestrator](https://affpapa.org/en/nevibecode/agents/it-ops-orchestrator.md) — subagent · 194 installs
- [powershell-security-hardening](https://affpapa.org/en/nevibecode/agents/powershell-security-hardening.md) — subagent · 194 installs
- [windows-hardening](https://affpapa.org/en/nevibecode/skills/windows-hardening.md) — skill · 388 installs
- [terraform-engineer](https://affpapa.org/en/nevibecode/skills/terraform-engineer.md) — skill · 5400 installs
- [cloud-architect](https://affpapa.org/en/nevibecode/skills/httpsgithubcomjeffallan-cloud-architect.md) — skill · 4700 installs

From the same set: [hashicorp/agent-skills](https://affpapa.org/en/nevibecode/by/hashicorp/agent-skills.md) — 16 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
