Skip to main content
skill CX Codex

push-to-registry — Claude Code skill: what it does, how to install

Teaches AI assistants how to register Packer build details in HCP. Useful for tracking machine image lifecycles and linking artifacts directly to Terraform.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hashicorp/agent-skills --skill push-to-registry -a claude-code
Open on GitHub

What push-to-registry does

This skill explains how to embed the hcp_packer_registry block inside template files. Instead of uploading entire virtual machine disks, the process transmits lightweight records, which takes under 1 minute. Heavy disk images stay in place.

The configuration separates static project information from run-specific properties. The bucket_name argument acts as a permanent handle and must not contain timestamps. In contrast, bucket_labels capture mutable attributes, while build_labels store frozen details such as Git commit hashes. Downstream provisioning files can look up these images with the hcp_packer_artifact data block in Terraform.

Executing these workflows requires Packer 1.7.7 or newer along with an HCP service principal granted Contributor permissions. You must export four values: HCP_CLIENT_ID, HCP_CLIENT_SECRET, HCP_ORGANIZATION_ID, and HCP_PROJECT_ID. If the API connection fails, Packer halts the build right away so that your cloud inventory matches the registry state.

What it helps with

  • configure hcp_packer_registry blocks in HCL templates
  • attach commit hashes and timestamps to iteration metadata
  • pass service account credentials to Packer via environment variables
  • query generated build artifacts inside Terraform configurations

Example prompts for the agent

  • Add an hcp_packer_registry block to my ubuntu.pkr.hcl template
  • Configure the GitHub Actions workflow to run Packer and register metadata in HCP
  • Write a Terraform data source to fetch the latest AMI published to HCP Packer

How to install push-to-registry

1Skills CLI (Vercel)

npx skills add hashicorp/agent-skills --skill push-to-registry -a claude-code

2Manually: put the files in place

~/.claude/skills/push-to-registry/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/push-to-registry/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about push-to-registry

How do I install push-to-registry in Claude Code?

Run npx skills add hashicorp/agent-skills --skill push-to-registry -a claude-code in your terminal.

What does push-to-registry do?

It configures Packer to register image metadata in HCP Packer, enabling automated lifecycle tracking and integration with Terraform data sources.

What happens if Packer cannot reach the HCP registry?

The build process aborts immediately. This safety behavior stops resources from diverging between your cloud provider and the HCP catalog.

Similar skills

Everything for DevOps and infrastructure →

From the same set16

new-terraform-provider A skill that walks the agent through bootstrapping a Terraform provider on the Plugin Framework, from directory layout to a passing build. CX Codex +1 3,900installs run-acceptance-tests Runs and investigates Terraform provider acceptance tests with the TestAcc prefix. Use it for missing environment variables, failed runs, or tests that pass when they should not. CX Codex +1 3,700installs provider-test-patterns A skill that guides acceptance testing for Terraform providers using terraform-plugin-testing and the Plugin Framework. CX Codex +1 3,300installs azure-verified-modules A skill that carries the Azure Verified Modules requirements, so your agent can write and review Terraform modules that pass AVM certification. CX Codex +1 3,300installs aws-ami-builder A skill that walks your agent through building Amazon Machine Images with Packer and the amazon-ebs builder — template, source AMI filters, build commands. CX Codex +1 3,200installs provider-docs Guides Terraform provider documentation workflows for the Terraform Registry. It coordinates schema descriptions, docs templates, and tfplugindocs generation. CX Codex +1 3,200installs windows-builder A skill for building Windows images with Packer over WinRM and PowerShell provisioners. Useful for Windows AMIs, Azure images and VMware templates. CX Codex +1 2,700installs terraform-policy Creates and tests Terraform Policy files, and converts Sentinel rules into Terraform Policy. Use it when policy files or their test cases need changes. CX Codex +1 1,500installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor