HashiCorp Agent Skills
Official HashiCorp skills for Terraform and Packer: HCL style, modules, tests, imports, Stacks, provider development and image builds
Install
claude plugin marketplace add hashicorp/agent-skills
claude plugin install terraform@hashicorp
claude plugin install packer@hashicorpThis is third-party code. Review the repository files before installing.
What it does
The repository holds two plugins. The Terraform plugin covers code style, module refactoring, terraform test, searching and importing existing resources, Terraform Stacks, policy and Azure Verified Modules, plus a set for provider developers: resources, docs, acceptance tests and migration to the Plugin Framework. The Packer plugin helps build AWS AMI, Azure and Windows images and push them to the HCP Packer registry. Skills install one at a time via npx skills or as a bundle for Claude Code and Codex.
Who it is for. For DevOps engineers and developers writing Terraform configurations, providers or Packer templates.
Good fit when
- You need to write or review Terraform to the official style
- You need terraform test coverage for a module or to split it up
- You are building your own Terraform provider
Not a fit when
- Your infrastructure uses OpenTofu-specific extensions
- You need live state and registry access, which the separate Terraform MCP server provides
Example request
Bring this Terraform module to HashiCorp style and add terraform test coverageLimitations
The skills provide instructions and examples, while running terraform and packer, cloud accounts and image build costs are on you. HashiCorp restricts access to its services and downloads from Russia, so binaries and providers from the official registry may need a mirror or VPN. External contributions are not accepted yet.
How to disable. Run claude plugin uninstall terraform@hashicorp or packer@hashicorp, or delete the skill folder from the agent's directory.
Security check
- The skills consist of instructions and code examples
- Applying configurations to the cloud is a separate step decided by the user
README in short
The README describes the two product plugins and migration from legacy plugin IDs. It gives commands for installing a single skill via npx skills and bundles via the Claude Code marketplace, and points Codex to its marketplace file. There are sections on support, security and supported models. MPL-2.0 licensed.
SKILL.md
---
name: terraform-style-guide
description: Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.
metadata:
lifecycle-status: active
---
# Terraform Style Guide
Generate and maintain Terraform code following HashiCorp's official style conventions and best practices.
**Reference:** [HashiCorp Terraform Style Guide](https://developer.hashicorp.com/terraform/language/style)
## Code Generation Strategy
When generating Terraform code:
1. Start with provider configuration and version constraints
2. Create data sources before dependent resources
3. Build resources in dependency order
4. Add outputs for key resource attributes
5. Use variables for all configurable values
## File Organization
| File | Purpose |
|------|---------|
| `terraform.tf` | Terraform and provider version requirements |
| `providers.tf` | Provider configurations |
| `main.tf` | Primary resources and data sources |
| `variables.tf` | Input variable declarations (alphabetical) |
| `outputs.tf` | Output value declarations (alphabetical) |
| `locals.tf` | Local value declarations |
### Example Structure
```hcl
# terraform.tf
terraform {
required_version = ">= 1.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.0"
}
}
}FAQ
Do the old terraform-code-generation plugins still work?
They were replaced by the terraform@hashicorp and packer@hashicorp bundles, and skill paths changed too.
Where is the full skill list?
In the repository's SKILLS.md, together with each skill's status.
Related
An MCP server built into the Netdata agent: metrics, logs, alerts and live process, service and container data for an AI assistant
GitHub's official MCP server: code, issues, pull requests, Actions and security alerts straight from the agent
A GitHub Action that runs Claude Code in pull requests and issues: answers mentions, reviews and makes changes
An AI assistant for Kubernetes that turns plain-language requests into kubectl operations and doubles as an MCP server