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.
88
82%
Does it follow best practices?
Impact
100%
1.49xAverage score across 3 eval scenarios
Passed
No known issues
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 a strong skill description that clearly defines its scope around Terraform testing, lists concrete actions, and includes an explicit 'Use when...' clause with multiple natural trigger terms. The description is concise yet comprehensive, covering the key activities a user would need help with. The specific file extension (.tftest.hcl) and Terraform-specific terminology make it highly distinguishable from other skills.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | Lists multiple specific concrete actions: writing test files, writing test scenarios with run blocks, validating with assertions, mocking providers and data sources, testing module outputs and resource configurations, and troubleshooting test syntax and execution. | 3 / 3 |
Completeness | Clearly answers both 'what' (comprehensive guide for writing and running Terraform tests) and 'when' with an explicit 'Use when...' clause listing six specific trigger scenarios. | 3 / 3 |
Trigger Term Quality | Includes strong natural keywords users would say: 'Terraform tests', '.tftest.hcl', 'run blocks', 'assertions', 'mocking providers', 'data sources', 'module outputs', 'resource configurations'. These cover both file extensions and conceptual terms users would naturally use. | 3 / 3 |
Distinctiveness Conflict Risk | Highly distinctive — narrowly scoped to Terraform testing specifically, with domain-specific triggers like '.tftest.hcl', 'run blocks', and 'mocking providers' that are unlikely to conflict with general Terraform skills or other testing skills. | 3 / 3 |
Total | 12 / 12 Passed |
Implementation
64%Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.
This is a solid, highly actionable Terraform testing reference with excellent executable code examples and good progressive disclosure structure via reference files. Its main weakness is that it tries to be both an overview and a comprehensive pattern catalog, resulting in a lengthy main file that could benefit from moving some patterns to the referenced EXAMPLES.md. The workflow for actually writing and debugging tests could be more explicitly sequenced with validation checkpoints.
Suggestions
Move several of the 'Common Test Patterns' subsections (e.g., Tags, Data sources, Plan options, State key sharing) into references/EXAMPLES.md and keep only 3-4 essential patterns in the main file to improve conciseness.
Add an explicit step-by-step workflow section for writing a new test from scratch: create file → write run block → run with -verbose → check output → iterate, with a validation checkpoint after the first run.
Provide the referenced bundle files (MOCK_PROVIDERS.md, CI_CD.md, EXAMPLES.md) so the progressive disclosure structure is actually functional rather than aspirational.
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The skill is mostly efficient with good code examples, but includes too many pattern examples that could be moved to a reference file. The 'Common Test Patterns' section alone has 12 subsections with full code blocks, making the main file quite long (~300 lines). Some patterns like 'Tags' and 'Data sources' are straightforward enough that Claude could infer them from fewer examples. | 2 / 3 |
Actionability | Every pattern includes fully executable HCL code that is copy-paste ready. The CLI commands section provides concrete, complete commands with flags. Run block structure shows all available options with real syntax rather than pseudocode. | 3 / 3 |
Workflow Clarity | The file structure and running tests sections provide clear guidance, and cleanup ordering is mentioned. However, there's no explicit workflow for creating a test from scratch (e.g., 'first create the file, then write assertions, then run, then check output'). For integration tests that create real resources, there's no validation checkpoint or feedback loop beyond 'use -verbose' in troubleshooting. | 2 / 3 |
Progressive Disclosure | References to MOCK_PROVIDERS.md, CI_CD.md, and EXAMPLES.md are well-signaled and one level deep, which is good. However, no bundle files were provided, so these references are unverifiable. More importantly, many of the common test patterns inline could be moved to the EXAMPLES.md reference to keep the main file leaner as an overview. | 2 / 3 |
Total | 9 / 12 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 — 11 / 11 Passed
Validation for skill structure
No warnings or errors.
339a113
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.