HashiCorp Agent Skills is a collection of reusable instructions and plugins that help coding agents work with Terraform and Packer. Developers use it to add HashiCorp product workflows to supported coding-agent tools, either individually or as product bundles.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add hashicorp/agent-skills --skill terraform-policygit clone --depth 1 https://github.com/hashicorp/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/hashicorp/agent-skills/terraform-policy)<a href="https://agentmods.dev/skills/hashicorp/agent-skills/terraform-policy"><img src="https://agentmods.dev/badge/skills/hashicorp/agent-skills/terraform-policy/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/hashicorp/agent-skills/terraform-policy"><img src="https://agentmods.dev/badge/skills/hashicorp/agent-skills/terraform-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 50 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
- medium MCP Rug Pull · line 51 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.01609 |
| Opus 5.5 | $0.00019 | $0.00644 |
| Sonnet 5.5 | $0.00010 | $0.00322 |
| Haiku 4.5 | $0.00005 | $0.00161 |
Grade A, and why
terraform-policy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.
terraform-policy
UTILITY SKILL — INVOKES: tfpolicy-author | tfpolicy-test
USE FOR:
- Writing a new
.policy.hclpolicy from a description or requirement - Converting a
.sentinelpolicy to Terraform Policy - Writing or debugging a
.policytest.hcltest file - Migrating a Sentinel policy library to Terraform Policy
Before giving authoring or testing instructions, check the installed tfpolicy CLI version and tailor guidance accordingly. This skill maintains guidance for the two most recent minor lines, 0.4.x and 0.5.x. The 0.3.x bullet below is baseline guidance that applies to every supported line. When a new minor ships, drop the oldest line and add the new one. Inline notes for versions earlier than 0.3.0 are retained only for older CLIs.
- If the CLI is
0.3.x(baseline), include a top-levelpolicy { required_providers { ... } }block when authoring.policy.hclfiles containing resource or provider policies. It is mandatory fortfpolicy validate; version-range validation is best effort, and wildcard targets such asresource_policy "*"are not schema-validated. Every mockresource {}block in.policytest.hclfiles must declareattrsorprior_attrs; if both evaluate to empty, the test case is skipped (provider {}andmodule {}mocks are unaffected) (see tfpolicy-test).tfpolicy testreuses the target.policy.hcl's existing top-levelpolicy { required_providers { ... } }block (there is no separate.policytest.hcl-level declaration) to validate provider, resource, and data-source policies andcore::getdatasource()/core::getresources()arguments against resolved provider schemas before any test runs, failing the whole run on a schema mismatch (see tfpolicy-test).core::alltrue(list)andcore::anytrue(list)are available — prefer them over thecore::length()list-comprehension workaround (see tfpolicy-author).meta.tfe_stackandmeta.tfe_workspace.tagsare available to resource, provider, and module policies; Stack fields are empty strings outside Stack evaluations on 0.3.x and 0.4.x (nullon 0.5.x+, see below). On 0.3.x only, theno-opoperation does not exist: resource policies evaluate only resources that the run creates, updates, or deletes, and the defaultoperationsis["create", "update"]. - If the CLI is
0.4.xor newer, all0.3.xguidance still applies except theoperationsdefault, plus theno-opoperation, which evaluates resources that the run leaves unchanged (the entire state).operationsaccepts"create","update","delete", and"no-op". For policies that do not referenceprior_attrs, the defaultoperationsis now["create", "update", "no-op"], so omitting it evaluates every resource in state. Useoperations = ["create", "update"]to evaluate only changed resources.no-opexposes the existing values throughattrs, andprior_attrsis unavailable.deletecannot be combined withcreateorno-op(["update", "delete"]is valid), andprior_attrspolicies must setoperationsexplicitly. Attrs-only policies (noprior_attrs) callingcore::getresourceswhoseoperationsomitno-opload with a warning; do not addno-opto aprior_attrspolicy, which fails validation. In tests, setmeta.operation = "no-op"explicitly because it is never inferred (see tfpolicy-author and tfpolicy-test). - If the CLI is
0.5.xor newer, all0.4.xguidance still applies, with two changes. (1) Absentmetaattributes are exposed asnullinstead of an empty string:meta.alias(no alias),meta.version(no version specified, including modules), andmeta.tfe_stack.deployment_group/deployment_name/stack_name(workspace evaluations or not set).meta.tfe_workspace.tagsis still an empty map. Passingnullto a function such ascore::semverconstraint, or interpolating it into a string such aserror_message, fails, and&&does not short-circuit, so guard with a conditional:meta.version != null ? core::semverconstraint(meta.version, ">= 2.0.0") : false. Equality checks are null-safe (meta.alias == "secondary"isfalsewhen there is no alias), but checks likemeta.tfe_stack.stack_name == ""no longer match (use== null). (2)prior_attrsis rejected at parse time inprovider_policyandmodule_policyblocks; it is valid only inresource_policy(update and delete operations). Useattrs.for provider attributes (see tfpolicy-author). - If the CLI version is unknown, ask the user to check it first or provide guidance that clearly distinguishes the
0.3.x,0.4.x, and0.5.xpaths.
What ships with it
54 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- .gitignore 29 B
- examples/conversion/cloudfront-associated-with-waf/cloudfront-associated-with-waf.policy.hcl 589 B
- examples/conversion/cloudfront-associated-with-waf/cloudfront-associated-with-waf.sentinel 1.6 KB
- examples/conversion/cloudfront-associated-with-waf/README.md 871 B
- examples/conversion/cloudtrail-server-side-encryption-enabled/cloudtrail-server-side-encryption-enabled.policy.hcl 512 B
- examples/conversion/cloudtrail-server-side-encryption-enabled/cloudtrail-server-side-encryption-enabled.sentinel 1.4 KB
- examples/conversion/cloudtrail-server-side-encryption-enabled/README.md 846 B
- examples/conversion/dms-endpoint-should-be-ssl-configured/dms-endpoint-should-be-ssl-configured.policy.hcl 516 B
- examples/conversion/dms-endpoint-should-be-ssl-configured/dms-endpoint-should-be-ssl-configured.sentinel 1.5 KB
- examples/conversion/dms-endpoint-should-be-ssl-configured/README.md 872 B
- examples/conversion/dms-endpoints-should-use-ssl/dms-endpoints-should-use-ssl.policy.hcl 579 B
- examples/conversion/dms-endpoints-should-use-ssl/dms-endpoints-should-use-ssl.sentinel 1.4 KB
- examples/conversion/dms-endpoints-should-use-ssl/README.md 800 B
- examples/conversion/ec2-network-acl-should-have-subnet-ids/ec2-network-acl-should-have-subnet-ids.policy.hcl 1.0 KB
- examples/conversion/ec2-network-acl-should-have-subnet-ids/ec2-network-acl-should-have-subnet-ids.sentinel 2.9 KB
- examples/conversion/ec2-network-acl-should-have-subnet-ids/README.md 970 B
- examples/conversion/ec2-vpc-default-security-group-no-traffic/ec2-vpc-default-security-group-no-traffic.policy.hcl 865 B
- examples/conversion/ec2-vpc-default-security-group-no-traffic/ec2-vpc-default-security-group-no-traffic.sentinel 3.6 KB
- examples/conversion/ec2-vpc-default-security-group-no-traffic/README.md 1.1 KB
- examples/conversion/efs-access-point-should-enforce-user-identity/efs-access-point-should-enforce-user-identity.policy.hcl 448 B
- examples/conversion/efs-access-point-should-enforce-user-identity/efs-access-point-should-enforce-user-identity.sentinel 1.3 KB
- examples/conversion/efs-access-point-should-enforce-user-identity/README.md 727 B
- examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/elasticache-redis-replication-group-encryption-at-transit-enabled.policy.hcl 547 B
- examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/elasticache-redis-replication-group-encryption-at-transit-enabled.sentinel 1.5 KB
- examples/conversion/elasticache-redis-replication-group-encryption-at-transit-enabled/README.md 777 B
- examples/conversion/elasticsearch-encrypted-at-rest/elasticsearch-encrypted-at-rest.policy.hcl 584 B
- examples/conversion/elasticsearch-encrypted-at-rest/elasticsearch-encrypted-at-rest.sentinel 1.5 KB
- examples/conversion/elasticsearch-encrypted-at-rest/README.md 734 B
- examples/conversion/elasticsearch-https-required/elasticsearch-https-required.policy.hcl 1.1 KB
- examples/conversion/elasticsearch-https-required/elasticsearch-https-required.sentinel 2.3 KB
- examples/conversion/elasticsearch-https-required/README.md 904 B
- examples/conversion/elasticsearch-in-vpc-only/elasticsearch-in-vpc-only.policy.hcl 589 B
- examples/conversion/elasticsearch-in-vpc-only/elasticsearch-in-vpc-only.sentinel 1.9 KB
- examples/conversion/elasticsearch-in-vpc-only/README.md 890 B
- examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/eventbridge-custom-event-bus-should-have-attached-policy.policy.hcl 845 B
- examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/eventbridge-custom-event-bus-should-have-attached-policy.sentinel 2.1 KB
- examples/conversion/eventbridge-custom-event-bus-should-have-attached-policy/README.md 1.1 KB
- examples/conversion/s3-block-public-access-bucket-level/README.md 1.1 KB
- examples/conversion/s3-block-public-access-bucket-level/s3-block-public-access-bucket-level.policy.hcl 1.2 KB
- examples/conversion/s3-block-public-access-bucket-level/s3-block-public-access-bucket-level.sentinel 3.2 KB
- examples/conversion/s3-bucket-should-have-object-lock-enabled/README.md 975 B
- examples/conversion/s3-bucket-should-have-object-lock-enabled/s3-bucket-should-have-object-lock-enabled.policy.hcl 1.0 KB
- examples/conversion/s3-bucket-should-have-object-lock-enabled/s3-bucket-should-have-object-lock-enabled.sentinel 2.8 KB
- examples/conversion/secretsmanager-auto-rotation-enabled-check/README.md 955 B
- examples/conversion/secretsmanager-auto-rotation-enabled-check/secretsmanager-auto-rotation-enabled-check.policy.hcl 867 B
- examples/conversion/secretsmanager-auto-rotation-enabled-check/secretsmanager-auto-rotation-enabled-check.sentinel 2.2 KB
- examples/conversion/step-functions-state-machine-logging-enabled/README.md 778 B
- examples/conversion/step-functions-state-machine-logging-enabled/step-functions-state-machine-logging-enabled.policy.hcl 724 B
- examples/conversion/step-functions-state-machine-logging-enabled/step-functions-state-machine-logging-enabled.sentinel 1.6 KB
- examples/README.md 2.5 KB
- README.md 2.8 KB
- references/tfpolicy-author.md 102 KB
- references/tfpolicy-test.md 47 KB
- references/verified-syntax.md 101 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +1 lines 4453d30dac3b
- 2mo ago Changed 80d14e922364
- 3mo ago First seen · 53 lines · 48 tokens per session scan A c88fa1b21fb0
terraform-policy is a skill published in the GitHub repository hashicorp/agent-skills (947 stars, last pushed 28d ago), licensed MPL-2.0. It adds 48 tokens to every session and 1,609 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
terraform-policy compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| terraform-policyhashicorp/agent-skills | Skill | 947 | 28d ago | MPL-2.0 | A | 48 | Claude Code |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 102k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 396k | today | MIT | A | 36 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 15k | yesterday | CC0-1.0 | A | 113 | Claude Code, Codex |
| systematic-debuggingobra/superpowers | Skill | 331k | 4d ago | MIT | A | 21 | Claude Code |
| next-cache-components-adoptionvercel/next.js | Skill | 144k | today | MIT | A | 95 | Claude Code |