
Description
terraform-policy is an agent skill from HashiCorp for writing, testing and converting Terraform Policy files. It covers four tasks: writing a new .policy.hcl policy from a description or requirement, converting a Sentinel .sentinel policy to Terraform Policy, writing or debugging a .policytest.hcl test file, and migrating a whole Sentinel policy library. It is a utility skill that hands off to two companion references, tfpolicy-author and tfpolicy-test. Before giving instructions, the agent checks which tfpolicy CLI version is installed and adjusts its guidance, since the skill tracks the two latest minor lines, 0.2.x and 0.3.x. It suits platform and infrastructure teams adopting policy as code with Terraform. Install it with npx skills add https://github.com/hashicorp/agent-skills --skill terraform-policy.…
Highlights
- Write .policy.hcl policies from requirements
- Convert Sentinel policies to Terraform Policy
- Write and debug .policytest.hcl tests
- Adapts to tfpolicy CLI 0.2.x or 0.3.x
Ratings & Reviews
No ratings yet
Be the first to rate terraform-policy.
People also visit

terraform-style-guide
Generate Terraform HCL code following HashiCorp's official style conventions

terraform-engineer
Implementing infrastructure as code with Terraform across AWS, Azure, or GCP

terraform-code-generation
Terraform code generation skills including HCL generation, style guides
terraform-policy FAQ
What does this skill do?
It helps the agent write new Terraform Policy files, convert Sentinel policies, and write or debug policy test files.
Which tfpolicy versions are covered?
The two most recent minor lines, 0.2.x and 0.3.x. The agent checks your installed CLI version first and tailors its guidance.
Can it migrate an existing Sentinel library?
Yes. Migrating a Sentinel policy library to Terraform Policy is one of the listed uses.
How do I install it?
Run npx skills add https://github.com/hashicorp/agent-skills --skill terraform-policy.
What are the best terraform-policy alternatives?
Popular alternatives to terraform-policy include terraform-style-guide, terraform-engineer and provider-docs. See all terraform-policy alternatives









