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, lists concrete actions, and includes an explicit 'Use when' clause with multiple specific trigger scenarios. The description uses appropriate third-person voice and includes both domain-specific terms (.tftest.hcl, run blocks) and natural language terms users would employ. It serves as a good example of a well-crafted skill description.
| 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' 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', 'test syntax'. These cover the 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 Terraform-specific testing concepts makes it very unlikely to conflict with general IaC, general testing, or other Terraform skills. | 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 comprehensive, highly actionable Terraform testing skill with excellent progressive disclosure and concrete, executable examples throughout. Its main weakness is verbosity — the 12+ test patterns section could be trimmed since many patterns are minor variations that Claude could derive from fewer examples. Adding an explicit write-test-run-validate workflow would strengthen the guidance for iterative test development.
Suggestions
Consolidate the Common Test Patterns section by removing simpler patterns (tags, data sources, resource counts) that Claude can easily derive from the core examples, or move them to EXAMPLES.md
Add an explicit iterative workflow: write test → run with -verbose → inspect output → fix assertions → re-run, especially for integration tests where apply failures need recovery steps
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The skill is mostly efficient with good code examples, but includes many patterns that could be consolidated. The 'Common Test Patterns' section is extensive with 12+ patterns, some of which (tags, data sources, plan options) are straightforward enough that Claude could infer them from fewer examples. The core concepts section explaining what a test file and assert block are is somewhat unnecessary. | 2 / 3 |
Actionability | Every pattern includes fully executable HCL code that is copy-paste ready. The run commands section provides concrete CLI invocations with flags. The troubleshooting table gives specific solutions. All examples use realistic resource references and proper HCL syntax. | 3 / 3 |
Workflow Clarity | The file structure and test patterns are well-sequenced, and the cleanup section explains reverse ordering. However, there's no explicit validation workflow for writing and running tests (e.g., write test → run with -verbose → check output → fix assertions → re-run). The sequential test pattern shows dependencies but lacks error recovery guidance for when apply-mode tests fail mid-sequence. | 2 / 3 |
Progressive Disclosure | Clear references to three supporting files (MOCK_PROVIDERS.md, CI_CD.md, EXAMPLES.md) with specific guidance on when to consult each. The main skill covers core patterns inline while appropriately deferring mocking details, CI/CD pipelines, and full example suites to reference files. Navigation is one level deep and well-signaled. | 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.
43ca9b0
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.