windows-builder — Claude Code skill: build Windows images with Packer
A skill for building Windows images with Packer over WinRM and PowerShell provisioners. Useful for Windows AMIs, Azure images and VMware templates.
npx skills add hashicorp/agent-skills --skill windows-builder -a claude-codeWhat windows-builder 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.
What it helps with
- 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 for the agent
- 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?
How to install windows-builder
1Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill windows-builder -a claude-code2Manually: put the files in place
~/.claude/skills/windows-builder/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/windows-builder/
1Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill windows-builder -a codex2Manually: put the files in place
.agents/skills/windows-builder/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill windows-builder -a cursor2Manually: put the files in place
.cursor/skills/windows-builder/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install hashicorp/agent-skills windows-builder2Manually: put the files in place
.github/skills/windows-builder/SKILL.md1Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill windows-builder -a gemini-cli2Platform CLI
gemini skills install https://github.com/hashicorp/agent-skills --path plugins/packer/skills/windows-builderManually: put the files in place
.devin/skills/windows-builder/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill windows-builder -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about windows-builder
How do I install windows-builder in Claude?
Run npx skills add hashicorp/agent-skills --skill windows-builder -a claude-code. The skill lands in ~/.claude/skills/windows-builder/SKILL.md.
What does windows-builder do?
It provides Packer templates for Windows images: WinRM setup, PowerShell provisioners for software and updates, and cleanup before the image is captured.
Why do Windows builds in Packer take so long?
Windows Updates eat most of the time — 45 to 120 minutes per build. A pre-patched base image and a 2h provisioner timeout help.