CtrlK
BlogDocsLog inGet started
Tessl Logo

terraform-test

Comprehensive guide for writing and running Terraform tests. Use when creating test files (.tftest.hcl), writing test scenarios with run blocks, validating infrastructure behavior with assertions, mocking providers and data sources, testing module outputs and resource configurations, or troubleshooting Terraform test syntax and execution.

74

Quality

91%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

82%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A strong, executable reference: complete syntax coverage, runnable examples, real one-level-deep references, and practical best practices. The body reads as a syntax-and-pattern catalog rather than a sequenced workflow, and its length slightly overruns what the main file needs given an EXAMPLES.md bundle already exists.

Suggestions

Move 4–5 of the more situational inline patterns (cleanup ordering, parallel modules, state-key sharing) into references/EXAMPLES.md and keep one representative pattern inline, shortening the main file by roughly a third.

Add a short 'Test workflow' section sequencing the process (write plan-mode test → terraform test -filter=... → on failure use -verbose to compare actual vs expected → iterate), turning the scattered guidance into explicit steps with a validation checkpoint.

Deduplicate the cleanup-ordering guidance, which currently appears in a pattern example, the Cleanup section, and Best Practice #10.

DimensionReasoningScore

Conciseness

The body is dense, code-first, and free of concepts Claude already knows — no 'what is Terraform' padding — with terse annotated HCL. But at ~440 lines it carries a 13-entry pattern catalog where several entries (e.g., the S3 cleanup-ordering example, duplicated again under Best Practices and Cleanup) could be trimmed or consolidated into EXAMPLES.md, so it's 'efficient with minor trims' rather than 'every token earns its place'.

4 / 5

Actionability

Fully executable, copy-paste-ready HCL for every construct (run blocks, plan_options, expect_failures, state_key, aliased providers) plus a complete `terraform test` CLI block with -filter, -verbose, and -no-cleanup flags. The common cases are covered with runnable examples, matching the anchor-5 example.

5 / 5

Workflow Clarity

A coherent implicit workflow is present — default to plan mode, name files unit/integration for CI filtering, run with -filter/-verbose, consult the troubleshooting table on failure — and cleanup ordering for destructive apply-mode runs is documented. It falls short of 5 because there is no explicit step sequence (write → run → diagnose → fix) with a stated validation checkpoint; the skill is structured as a reference rather than a sequenced process with feedback loops.

4 / 5

Progressive Disclosure

Three well-signaled reference files (MOCK_PROVIDERS.md, CI_CD.md, EXAMPLES.md) are real, one level deep, and described with when-to-read guidance at the top — that part is anchor-5. The gap is that the main file also inlines a long pattern catalog whose bulk arguably belongs alongside EXAMPLES.md, keeping it at 'good structure, minor organization gaps' rather than 'content appropriately split'.

4 / 5

Total

17

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A model description: specific, third-person action list with an explicit and detailed 'Use when' trigger clause covering natural user phrasing and file extensions. The only nit is the low-information opener 'Comprehensive guide', which is mild fluff but costs little.

DimensionReasoningScore

Specificity

Enumerates concrete actions — 'creating test files (.tftest.hcl)', 'writing test scenarios with run blocks', 'validating infrastructure behavior with assertions', 'mocking providers and data sources', 'testing module outputs', 'troubleshooting Terraform test syntax' — all in third person. Comprehensive and specific; matches the anchor-5 example in shape and coverage, not the anchor-4 'minor gaps' case.

5 / 5

Completeness

Explicitly answers both: 'what' via the enumerated capabilities and 'when' via an explicit 'Use when creating test files... or troubleshooting' clause with concrete trigger phrases. Not 4, because the 'when' clause is as specific as the 'what', mirroring the anchor-5 example.

5 / 5

Trigger Term Quality

Natural phrases users would say — 'writing and running Terraform tests', 'creating test files', 'mocking providers', 'troubleshooting' — plus the file extension '.tftest.hcl'. Matches the anchor-5 pattern (natural terms including synonyms and extensions); not 4, since no obvious common variation is missing.

5 / 5

Distinctiveness Conflict Risk

Clear niche (Terraform's built-in .tftest.hcl framework) with distinct trigger terms unlikely to fire for general Terraform or generic testing skills. The one mild issue — the buzzword 'Comprehensive guide' — adds no conflict risk.

5 / 5

Total

20

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
hashicorp/agent-skills
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.