packer-clilisted
Install: claude install-skill abdullahkhawer/devops-skills
# Packer CLI Skill
Use the template table and rules below when constructing all `packer` commands.
## Configuration
Update the table below with your Packer template files and target build environments:
| Environment | Template File | Variables File |
|---|---|---|
| Production | `<your-prod-template>.pkr.hcl` | `<your-prod.pkrvars.hcl>` |
| Staging / Non-Prod | `<your-nonprod-template>.pkr.hcl` | `<your-nonprod.pkrvars.hcl>` |
If the target environment is unclear, ask the user before running any command.
### Prerequisites (one-time setup by user)
If `packer` is not installed, inform the user that setup is required and ask them to complete the following steps manually. Do not perform these steps yourself.
```bash
brew install packer
packer init <template.pkr.hcl>
```
## Command Format
```bash
packer <command> -var-file=<vars-file> <template.pkr.hcl>
```
### Examples
```bash
# Non-Prod — validate before building
packer validate -var-file=<your-nonprod.pkrvars.hcl> <your-nonprod-template>.pkr.hcl
# Non-Prod — build (only with user confirmation)
packer build -var-file=<your-nonprod.pkrvars.hcl> <your-nonprod-template>.pkr.hcl
```
## Available Commands
### Read-only (safe, no confirmation needed)
| Command | Description |
|---|---|
| `packer validate -var-file=<file> <template>` | Validate template syntax and configuration |
| `packer fmt -check -diff <template>` | Check formatting without modifying the file |
| `packer inspect <template>` | Show builders, provisio