CtrlK
BlogDocsLog inGet started
Tessl Logo

provider-test-patterns

Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework. Covers test structure, TestCase/TestStep fields, ConfigStateChecks with custom statecheck.StateCheck implementations, plan checks, CompareValue for cross-step assertions, config helpers, import testing with ImportStateKind, sweepers, and scenario patterns (basic, update, disappears, validation, regression), and ephemeral resource testing with the echoprovider package. Use when writing, reviewing, or debugging provider acceptance tests, including questions about statecheck, plancheck, TestCheckFunc, CheckDestroy, ExpectError, import state verification, ephemeral resources, or how to structure test files.

77

Quality

96%

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

93%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.

An exemplary patterns reference: dense with executable code and decision rules, no filler, and a properly layered bundle where deep material (sweepers, ephemeral testing, full check catalog) is delegated to real one-level-deep reference files. The only notable gap is the absence of how to execute the tests it teaches the reader to write (TF_ACC / go test invocation).

Suggestions

Add a short 'Running tests' note covering TF_ACC=1 and the `go test -run TestAcc...` invocation so the write-test workflow closes the loop with an execution and failure-feedback step.

Consider mentioning `resource.UnitTest` / `-tfacc-module-test-dir` or at least one sentence on where PreCheck failures surface, to make the lifecycle's validation checkpoints actionable from the CLI side as well.

DimensionReasoningScore

Conciseness

The body is lean and directive — field tables instead of prose, terse rules like "Use `resource.ParallelTest` by default. Use `resource.Test` only when tests share state" and "Do not mix `Check` (legacy) and `ConfigStateChecks` in the same step" — and it never explains concepts Claude already knows (no "what is Terraform" padding). Every section earns its tokens; fits the 'lean and efficient' anchor rather than score 4's 'minor instances of over-explanation'.

5 / 5

Actionability

Fully executable, copy-paste-ready Go for every common case: a complete test function, provider factory, config helpers with numbered format verbs, all five scenario patterns, custom exists/disappears StateCheck implementations, the shared state-lookup utility, a CheckDestroy TestCheckFunc, and PreCheck. Minor example-specific placeholders (example_widget) are appropriate for a patterns skill; not score 4 since no key detail is missing.

5 / 5

Workflow Clarity

The test lifecycle is explicitly sequenced ("plan → apply → refresh → final plan", then destroy and CheckDestroy, with the failure condition stated), and scenario patterns give ordered step compositions including the two-commit regression workflow. It falls short of 5 because there is no guidance on actually running the tests (e.g., TF_ACC=1, `go test` invocation) or a run → read failure → fix loop, leaving a checkpoint gap.

4 / 5

Progressive Disclosure

A clearly signaled "**References** (load when needed)" block lists three real, one-level-deep files with one-line descriptions (`references/checks.md`, `references/sweepers.md`, `references/ephemeral.md` — all verified present), and topics whose depth lives in those files (sweepers, ephemeral/echoprovider, full knownvalue catalog) are correctly kept out of the body. Matches the 'clear overview with well-signaled one-level-deep references' anchor; not 4 because navigation and content split are clean.

5 / 5

Total

19

/

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: third-person voice, comprehensive enumeration of specific capabilities, and an explicit 'Use when...' clause carrying the exact API identifiers users would mention. It reads like the rubric's good examples and has no vague or padded language.

DimensionReasoningScore

Specificity

Names many concrete capabilities — "test structure, TestCase/TestStep fields, ConfigStateChecks with custom statecheck.StateCheck implementations, plan checks, CompareValue for cross-step assertions, config helpers, import testing with ImportStateKind, sweepers, and scenario patterns (basic, update, disappears, validation, regression), and ephemeral resource testing with the echoprovider package" — with no meaningful coverage gaps, matching the 'multiple specific concrete actions; comprehensive coverage' anchor rather than the score-4 anchor's 'minor gaps'.

5 / 5

Completeness

Explicitly answers both questions: the what is the enumerated capability list above, and the when is "Use when writing, reviewing, or debugging provider acceptance tests, including questions about..." with concrete trigger phrases — exactly the score-5 anchor pattern. Not 4, because the when-clause is fully explicit rather than 'could be more specific'.

5 / 5

Trigger Term Quality

Trigger terms are the exact identifiers and phrases a provider developer would naturally use: "statecheck, plancheck, TestCheckFunc, CheckDestroy, ExpectError, import state verification, ephemeral resources, or how to structure test files", plus "acceptance tests" as the common synonym. Coverage includes API names, concepts, and natural-language phrasings, matching the score-5 anchor rather than score 4's 'a few natural terms missing'.

5 / 5

Distinctiveness Conflict Risk

The niche is tightly pinned to "Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework", which is clearly distinguishable from general Terraform, general Go testing, and generic testing-pattern skills; trigger terms (statecheck, CheckDestroy, ephemeral resources) are unambiguous for this skill alone — minimal 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.