.github/skills/example-generator/SKILL.md
Generate Terraform example configurations for a given resource type using the azurecaf provider. Produces ready-to-use HCL code for documentation or onboarding. Triggers on: documentation requests, example creation, contributor guidance.
npx skillsauth add aztfmod/terraform-provider-azurecaf example-generatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
grep -A 15 '"name": "<resource_name>"' resourceDefinition.json
Extract: name, slug, min_length, max_length, scope, dashes, lowercase.
resource "azurecaf_name" "example" {
name = "demo"
resource_type = "<resource_name>"
prefixes = ["dev"]
suffixes = ["001"]
random_length = 3
clean_input = true
}
output "name" {
value = azurecaf_name.example.result
}
# Expected output format: <slug>-dev-demo-<random>-001
# Length: <min_length>-<max_length> characters
data "azurecaf_name" "example" {
name = "demo"
resource_type = "<resource_name>"
prefixes = ["prod"]
suffixes = ["eu"]
}
output "name" {
value = data.azurecaf_name.example.result
}
If the user wants examples showing multiple resources:
resource "azurecaf_name" "multi" {
name = "myapp"
resource_types = [
"<resource_name_1>",
"<resource_name_2>",
]
prefixes = ["dev"]
random_length = 3
}
output "results" {
value = azurecaf_name.multi.results
}
resource "azurecaf_name" "passthrough" {
name = "my-existing-name"
resource_type = "<resource_name>"
passthrough = true
}
# Output: my-existing-name (validated against naming rules only)
development
Analyze test failure output to identify root cause and suggest fixes. Use when build or test failures occur. Triggers on: test failures, build errors, CI failures.
development
Validate a resource definition end-to-end using terraform test with mock_provider azurerm. Proves the CAF-generated name is accepted by the azurerm provider schema without Azure credentials. Use after provider-build-test succeeds to run the mocked azurerm integration test.
documentation
Analyze changes since the last release tag and determine the appropriate semantic version bump (patch/minor/major) based on CHANGELOG entries and commit types. Triggers on: release preparation, version planning.
testing
Compare two versions of resourceDefinition.json (e.g., branch vs main) and produce a structured change summary. Triggers on: PR review, audit, before/after comparison.