terraform-policy
HashiCorp's skill for Terraform Policy, the policy-as-code format written in .policy.hcl files and tested with .policytest.hcl files using the tfpolicy CLI.
What the skill teaches
HashiCorp's skill for Terraform Policy, the policy-as-code format written in .policy.hcl files and tested with .policytest.hcl files using the tfpolicy CLI. It helps an agent write new policies from a requirement, convert existing Sentinel policies or whole libraries to the new format, and write or debug policy tests with mock resources. Before advising, the agent checks the installed tfpolicy version, because the guidance differs between the 0.4 and 0.5 release lines. Detailed authoring and testing rules sit in two reference files, alongside example policies.
Capabilities
- Write Terraform Policy files
- Convert Sentinel policies to Terraform Policy
- Write and debug policy tests
- Tailor guidance to the installed tfpolicy version
About
- Publisher
- HashiCorp
- Tool
- Terraform
Install
- Run this to add it to Any client:
npx skills add hashicorp/agent-skills/plugins/terraform/skills/terraform-policy
What's inside
- .gitignore
- README.md
- examples/README.md
- examples/conversion/cloudfront-associated-with-waf/README.md
- examples/conversion/cloudfront-associated-with-waf/cloudfront-associated-with-waf.policy.hcl
- examples/conversion/cloudfront-associated-with-waf/cloudfront-associated-with-waf.sentinel
- examples/conversion/cloudtrail-server-side-encryption-enabled/README.md
- examples/conversion/cloudtrail-server-side-encryption-enabled/cloudtrail-server-side-encryption-enabled.policy.hcl
- examples/conversion/cloudtrail-server-side-encryption-enabled/cloudtrail-server-side-encryption-enabled.sentinel
- examples/conversion/dms-endpoint-should-be-ssl-configured/README.md
- examples/conversion/dms-endpoint-should-be-ssl-configured/dms-endpoint-should-be-ssl-configured.policy.hcl
- examples/conversion/dms-endpoint-should-be-ssl-configured/dms-endpoint-should-be-ssl-configured.sentinel
- examples/conversion/dms-endpoints-should-use-ssl/README.md
- examples/conversion/dms-endpoints-should-use-ssl/dms-endpoints-should-use-ssl.policy.hcl
- examples/conversion/dms-endpoints-should-use-ssl/dms-endpoints-should-use-ssl.sentinel
- examples/conversion/ec2-network-acl-should-have-subnet-ids/README.md
- examples/conversion/ec2-network-acl-should-have-subnet-ids/ec2-network-acl-should-have-subnet-ids.policy.hcl
- examples/conversion/ec2-network-acl-should-have-subnet-ids/ec2-network-acl-should-have-subnet-ids.sentinel
- examples/conversion/ec2-vpc-default-security-group-no-traffic/README.md
- examples/conversion/ec2-vpc-default-security-group-no-traffic/ec2-vpc-default-security-group-no-traffic.policy.hcl
- examples/conversion/ec2-vpc-default-security-group-no-traffic/ec2-vpc-default-security-group-no-traffic.sentinel
- examples/conversion/efs-access-point-should-enforce-user-identity/README.md
- examples/conversion/efs-access-point-should-enforce-user-identity/efs-access-point-should-enforce-user-identity.policy.hcl
- examples/conversion/efs-access-point-should-enforce-user-identity/efs-access-point-should-enforce-user-identity.sentinel
- examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/README.md
MCP servers and skills can run code on your computer and act on your data. Review the source before installing.
Details
| Fact | Value | Source |
|---|---|---|
| Type | Skill | |
| Tool | Terraform | |
| Publisher | HashiCorp | source |
| Official status | Officialpublished in HashiCorp's own GitHub organisation; contributions restricted to HashiCorp-internal contributors | source |
| Status | active | source |
| Needs an API key or sign-in | Not stated in its documentation | |
| Includes scripts | No | source |
| Platforms | Not stated in its documentation | |
| AI clients | Not stated in its documentation | |
| Licence | MPL-2.0 | source |
| Pricing | Not stated in its documentation | |
| Activity | Last commit Nov 4, 2026925 GitHub starsDownload data not available (not on npm or PyPI) | source |
| Links | Repository |
Sources
- Skill file (SKILL.md)github.com/hashicorp/agent-skillsNov 10, 2026
- README (README.md)github.com/hashicorp/agent-skillsNov 12, 2026
- Licence file (LICENSE)github.com/hashicorp/agent-skills · Backs: LicenceNov 12, 2026
- GitHub repositorygithub.com/hashicorp/agent-skills · Backs: Official status, Publisher, Activity, LicenceNov 11, 2026
- Folder in the repository (terraform-policy)github.com/hashicorp/agent-skills · Backs: Includes scriptsNov 10, 2026
- File in the repository (SKILLS.md)github.com/hashicorp/agent-skills · Backs: StatusNov 12, 2026