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.
Install with Tessl CLI
npx tessl i github:hashicorp/agent-skills --skill terraform-test84
Quality
88%
Does it follow best practices?
Impact
84%
1.78xAverage score across 10 eval scenarios
Quality
Discovery
100%Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.
This is an excellent skill description that clearly defines its scope around Terraform testing with specific file types, concepts, and use cases. It uses third person voice correctly, provides comprehensive trigger terms that users would naturally use, and explicitly states when to use the skill. The description is well-structured and distinguishable from other potential infrastructure or testing skills.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | Lists multiple specific 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 and resource configurations', 'troubleshooting Terraform test syntax and execution'. | 3 / 3 |
Completeness | Clearly answers both what ('Comprehensive guide for writing and running Terraform tests') and when ('Use when creating test files, writing test scenarios, validating infrastructure behavior...') with explicit trigger scenarios listed. | 3 / 3 |
Trigger Term Quality | Excellent coverage of natural terms users would say: 'Terraform tests', '.tftest.hcl', 'run blocks', 'assertions', 'mocking providers', 'data sources', 'module outputs', 'resource configurations'. These are terms users would naturally use when seeking help with Terraform testing. | 3 / 3 |
Distinctiveness Conflict Risk | Highly distinctive with clear niche around Terraform testing specifically. The mention of '.tftest.hcl', 'run blocks', and 'mocking providers' creates a very specific domain that wouldn't conflict with general Terraform skills or other testing frameworks. | 3 / 3 |
Total | 12 / 12 Passed |
Implementation
77%Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.
This is a highly actionable and well-structured Terraform testing guide with excellent executable examples and clear workflows. However, it suffers from verbosity—explaining concepts Claude already knows and including extensive inline examples that could be referenced separately. The content would benefit from trimming explanatory text and splitting detailed examples into companion files.
Suggestions
Remove explanatory text about basic concepts (e.g., 'A test file contains...', 'Mock providers simulate provider behavior') and trust Claude's existing knowledge
Move the complete example test suite (~150 lines) and CI/CD integration examples to separate reference files (e.g., EXAMPLES.md, CI_CD.md) with brief summaries in the main skill
Consolidate the mock testing section—the extensive 'Key Benefits', 'Limitations', and 'When to Use' lists could be reduced to a brief table or removed entirely
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The skill is comprehensive but overly verbose in places. It explains concepts Claude likely knows (e.g., what a test file is, basic file structure conventions) and includes extensive repetitive examples. The mock testing section alone is ~200 lines when a more concise version would suffice. | 2 / 3 |
Actionability | Excellent actionability with fully executable HCL code examples throughout. Every concept is demonstrated with copy-paste ready code blocks, specific commands for running tests, and complete example test suites covering unit, integration, and mock testing patterns. | 3 / 3 |
Workflow Clarity | Clear sequential workflows with explicit validation steps. The cleanup section explains reverse-order destruction, the CI/CD examples show complete pipelines, and the test patterns demonstrate proper sequencing with dependencies. Validation checkpoints are explicit (e.g., 'Only when valid' patterns). | 3 / 3 |
Progressive Disclosure | Content is well-organized with clear sections, but everything is in one massive file (~1000 lines). The mock testing examples, CI/CD integration, and complete test suite examples could be split into separate reference files. External references are only to official docs, not to companion skill files. | 2 / 3 |
Total | 10 / 12 Passed |
Validation
87%Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.
Validation — 14 / 16 Passed
Validation for skill structure
| Criteria | Description | Result |
|---|---|---|
skill_md_line_count | SKILL.md is long (1670 lines); consider splitting into references/ and linking | Warning |
license_field | 'license' field is missing | Warning |
Total | 14 / 16 Passed | |
Table of Contents
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.