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.
91
86%
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, provides explicit trigger guidance with a 'Use when...' clause, and includes highly specific technical terms that users would naturally use. It covers both the 'what' and 'when' comprehensively while maintaining a distinct niche that minimizes conflict with other skills.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | Lists multiple specific concrete actions: writing test files, writing test scenarios with run blocks, validating infrastructure behavior 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 ('Use when creating test files, writing test scenarios, validating infrastructure behavior, mocking providers, testing module outputs, or troubleshooting') with an explicit 'Use when...' clause listing specific trigger scenarios. | 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 a user working with Terraform testing would naturally use. | 3 / 3 |
Distinctiveness Conflict Risk | Highly distinctive with a clear niche focused specifically on Terraform testing. The mention of '.tftest.hcl', 'run blocks', 'mocking providers', and 'assertions' clearly distinguishes this from general Terraform skills, general testing skills, or other IaC tools. | 3 / 3 |
Total | 12 / 12 Passed |
Implementation
72%Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.
This is a well-structured, highly actionable Terraform testing skill with excellent progressive disclosure through reference files. Its main weakness is the sheer volume of inline test patterns that could be trimmed or moved to the EXAMPLES.md reference, and the lack of an explicit step-by-step workflow with validation checkpoints for writing and running tests end-to-end.
Suggestions
Move some of the more derivative test patterns (tags, data sources, plan options, state key sharing) to references/EXAMPLES.md to reduce inline token usage while keeping the 4-5 most essential patterns in the main file.
Add a brief step-by-step workflow section (e.g., '1. Create test file → 2. Write assertions → 3. Run with -verbose → 4. Check output → 5. Fix and re-run') with explicit validation checkpoints, especially for integration tests that create real resources.
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The skill is fairly efficient but includes many test patterns that could be consolidated or moved to a reference file. The 'Common Test Patterns' section is extensive with 13+ patterns inline, some of which (tags, data sources, complex conditions) are straightforward variations Claude could derive from a few core examples. However, it avoids explaining basic Terraform concepts and each section does add value. | 2 / 3 |
Actionability | Every pattern includes complete, executable HCL code blocks with realistic assertions and error messages. The CLI commands section provides copy-paste ready commands with flags. Run block structure is fully specified with all available options demonstrated. | 3 / 3 |
Workflow Clarity | The file structure and naming conventions provide good organizational guidance, and cleanup ordering is mentioned. However, there's no explicit workflow for creating a test from scratch (e.g., 'first check version, then create file, then run, then validate output'). For integration tests that create real resources, there's no validation checkpoint or feedback loop beyond 'use -verbose'. | 2 / 3 |
Progressive Disclosure | Excellent use of reference files for mock providers, CI/CD, and full examples — all clearly signaled with one-level-deep references. The main file serves as a comprehensive but navigable overview, with clear guidance on when to consult each reference file (e.g., version-gated mock provider reference). | 3 / 3 |
Total | 10 / 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.
de4323a
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.