installskill

Skills / hashicorp/agent-skills

terraform-policy

Write, test and convert Terraform Policy files, including Sentinel to tfpolicy.

Pinned commit
5e30fa5c867bCommitted 2026-11-03
Files
55320 KB
License
MPL-2.0
Snapshot taken
2026-11-28
Description from the skill
Write, test, or convert Terraform Policy files (.policy.hcl, .policytest.hcl, Sentinel→tfpolicy). Triggers: policy.hcl, policytest, convert sentinel, tfpolicy, write a policy.

This is the text your agent reads to decide when to use the skill.

Install

Choose your agent. Pinned commands install exactly the commit this page describes.

Skill directory .claude/skills/Claude Code · Official docs

Does not read the shared .agents/skills directory. A skill must land in .claude/skills, or arrive inside a plugin.

GitHub CLIpinned

$ gh skill install hashicorp/agent-skills plugins/terraform/skills/terraform-policy --agent claude-code --pin 5e30fa5c867ba6777c37e4206babfd08049c396f

gh picks the directory for the agent, names the folder after the source directory (terraform-policy), and writes source metadata into the SKILL.md frontmatter, so the content hash below will not match. Check the github-tree-sha it records instead: it should read 8336e1b5729c045c2fdef4c8bfce7f240833cd02.

skills CLIpinned

$ npx skills add hashicorp/agent-skills@5e30fa5c867ba6777c37e4206babfd08049c396f --skill terraform-policy -a claude-code --copy

Downloads and runs the skills package from npm. --copy writes real files instead of symlinks. The CLI sends anonymous telemetry unless DISABLE_TELEMETRY=1 is set, and that setting also turns off its audit lookups.

Claude Code pluginnot pinnedrun inside the agent

> /plugin marketplace add hashicorp/agent-skills
> /plugin install terraform@hashicorp

Not pinned: installs whatever the marketplace currently serves. The plugin bundles 15 other skills with this one. Plugin scope is chosen in the /plugin dialog.

Plain gitpinned

$ tmp=$(mktemp -d)
$ git clone --quiet https://github.com/hashicorp/agent-skills.git "$tmp"
$ git -C "$tmp" checkout --quiet 5e30fa5c867ba6777c37e4206babfd08049c396f
$ mkdir -p .claude/skills
$ cp -R "$tmp/plugins/terraform/skills/terraform-policy" .claude/skills/terraform-policy

No extra tooling. Files land byte for byte as published in .claude/skills/terraform-policy, so the content hash below can be checked directly.

Check what landed

Run this after installing. It prints one SHA-256 for the whole directory. If your installer reported a different directory, cd there instead.

$ cd .claude/skills/terraform-policy && find . -type f -print0 | LC_ALL=C sort -z | xargs -0 shasum -a 256 | shasum -a 256

Expectedc6d4916835d6f0f3a574e2ba84058fad05301117c34432d7eb943a47333cbf55

It matches only when the files are byte for byte as published. A difference means something changed: by the installer, by you, or upstream.

What is inside

Pattern matches in the files, each linked to its line. A match is a place to read, not a verdict, and no match is not proof of absence.

Other · 33Docs · 21SKILL.md · 1

Runs commands2

Code that spawns other processes, or shell code blocks in the instructions.

0 in scripts · 2 in docs and other text files

Network accessNo match

Calls that fetch from or send to a remote host.

Installs packages2

Commands that pull and run third-party packages at use time.

0 in scripts · 2 in docs and other text files

Reads env or credentialsNo match

References to environment variables, tokens, keys or credential files.

Privileged or destructiveNo match

sudo, recursive deletes, permission changes and similar commands.

Dynamic or encoded codeNo match

eval, exec, base64 decoding and remote-script piping, which hide what runs.

Outside hosts mentioned

Hostnames of every URL in the text files.

  • docs.aws.amazon.com×16
  • raw.githubusercontent.com×4
  • developer.hashicorp.com×1

Entries worth a second look

  • Hidden file.gitignore

File manifest

Every file in the skill directory at the pinned commit.

Content hash
c6d4916835d6f0f3a574e2ba84058fad05301117c34432d7eb943a47333cbf55
Git tree SHA
8336e1b5729c045c2fdef4c8bfce7f240833cd02
Show all files (55)
examples/conversion/dms-endpoints-should-use-ssl/dms-endpoints-should-use-ssl.policy.hclOther579 B5c9e145e43371414…
examples/conversion/dms-endpoints-should-use-ssl/dms-endpoints-should-use-ssl.sentinelOther1.4 KB7413174edc2683a4…
examples/conversion/ec2-network-acl-should-have-subnet-ids/README.mdDocs970 B2da9954728e4a2e0…
examples/conversion/ec2-network-acl-should-have-subnet-ids/ec2-network-acl-should-have-subnet-ids.policy.hclOther1.0 KB093fd998d51c5a30…
examples/conversion/ec2-network-acl-should-have-subnet-ids/ec2-network-acl-should-have-subnet-ids.sentinelOther2.9 KB6f9065377faa7ac0…
examples/conversion/ec2-vpc-default-security-group-no-traffic/README.mdDocs1.1 KBcae1492ca0990f9c…
examples/conversion/ec2-vpc-default-security-group-no-traffic/ec2-vpc-default-security-group-no-traffic.policy.hclOther865 B8c4f7842a455e45e…
examples/conversion/ec2-vpc-default-security-group-no-traffic/ec2-vpc-default-security-group-no-traffic.sentinelOther3.6 KBa67323d87286c336…
examples/conversion/efs-access-point-should-enforce-user-identity/README.mdDocs727 Bea22ae2c5cd8acf1…
examples/conversion/efs-access-point-should-enforce-user-identity/efs-access-point-should-enforce-user-identity.policy.hclOther448 Bd60d2ab084e705cd…
examples/conversion/efs-access-point-should-enforce-user-identity/efs-access-point-should-enforce-user-identity.sentinelOther1.3 KBf7ba102efad526bf…
examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/README.mdDocs777 B9d211dc3d9bf4020…
examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/elasticache-redis-replication-group-encryption-at-transit-enabled.policy.hclOther547 Baa00818be52c1ead…
examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/elasticache-redis-replication-group-encryption-at-transit-enabled.sentinelOther1.5 KB460c04567ae62949…
examples/conversion/elasticsearch-encrypted-at-rest/README.mdDocs734 B2f332ce9d7af5a90…
examples/conversion/elasticsearch-encrypted-at-rest/elasticsearch-encrypted-at-rest.policy.hclOther584 B1466b60bfadaeafd…
examples/conversion/elasticsearch-encrypted-at-rest/elasticsearch-encrypted-at-rest.sentinelOther1.5 KB1769ea7859bb2a2d…
examples/conversion/elasticsearch-https-required/README.mdDocs904 Bb291b58730e73afe…
examples/conversion/elasticsearch-https-required/elasticsearch-https-required.policy.hclOther1.1 KBeabe03b521030756…
examples/conversion/elasticsearch-https-required/elasticsearch-https-required.sentinelOther2.3 KB91366427ef594396…
examples/conversion/elasticsearch-in-vpc-only/README.mdDocs890 B71ece548a3e2a1a1…
examples/conversion/elasticsearch-in-vpc-only/elasticsearch-in-vpc-only.policy.hclOther589 B1a7ddfa5382743cf…
examples/conversion/elasticsearch-in-vpc-only/elasticsearch-in-vpc-only.sentinelOther1.9 KB523e3196f1041c65…
examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/README.mdDocs1.1 KBfa63a88da88b4eb2…
examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/eventbridge-custom-event-bus-should-have-attached-policy.policy.hclOther845 Bccccf9909353fbae…
examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/eventbridge-custom-event-bus-should-have-attached-policy.sentinelOther2.1 KB00702067c7b0a046…
examples/conversion/s3-block-public-access-bucket-level/README.mdDocs1.1 KB928a996543a9a11d…
examples/conversion/s3-block-public-access-bucket-level/s3-block-public-access-bucket-level.policy.hclOther1.2 KBac6e9becbb43a34c…
examples/conversion/s3-block-public-access-bucket-level/s3-block-public-access-bucket-level.sentinelOther3.2 KB7afc9dd94c891465…
examples/conversion/s3-bucket-should-have-object-lock-enabled/README.mdDocs975 Bc52fdde16a7a427e…
examples/conversion/s3-bucket-should-have-object-lock-enabled/s3-bucket-should-have-object-lock-enabled.policy.hclOther1.0 KB35df8b69cc62bc5b…
examples/conversion/s3-bucket-should-have-object-lock-enabled/s3-bucket-should-have-object-lock-enabled.sentinelOther2.8 KBa76cd0917aae100c…
examples/conversion/secretsmanager-auto-rotation-enabled-check/README.mdDocs955 B32a7172f87d6c84e…
examples/conversion/secretsmanager-auto-rotation-enabled-check/secretsmanager-auto-rotation-enabled-check.policy.hclOther867 B4abb6f1fbc8f718d…
examples/conversion/secretsmanager-auto-rotation-enabled-check/secretsmanager-auto-rotation-enabled-check.sentinelOther2.2 KBaed6232049c0ffd8…
examples/conversion/step-functions-state-machine-logging-enabled/README.mdDocs778 Bf92554ddc0048486…
examples/conversion/step-functions-state-machine-logging-enabled/step-functions-state-machine-logging-enabled.policy.hclOther724 B02694155f2590d63…
examples/conversion/step-functions-state-machine-logging-enabled/step-functions-state-machine-logging-enabled.sentinelOther1.6 KBca2325e425f1c394…
references/tfpolicy-author.mdDocs102 KBbad1ba47dcc7370a…
references/tfpolicy-test.mdDocs47 KB78c320029de17d5b…
references/verified-syntax.mdDocs101 KB49d3a45d62fa218f…

Spec and portability

Checked against the Agent Skills specification.

Frontmatter
Parses as YAML
Name matches directory
Yes
Name uses lowercase letters, digits and hyphens
Yes
Description length
175limit 1,024 characters
SKILL.md body
45 linesthe spec suggests under 500 lines
Fields outside the spec
None
License field
MPL-2.0
License file
None declared
Repository license
LICENSE (GPL)
Claude Code plugin
terraform@hashicorp

Change history

No changes recorded since the first snapshot on 2026-11-28.

Follow changes to this skill in a feed reader: Atom feed · all skills

Get an email when this skill changes

Email alerts are not built yet. Leave your address and we will write to you once, when they are. The feed above works today.

We store your address, the name of this skill and the date. It is used for nothing else.