Terraform schema inspector skill
Agent skill for inspecting Terraform provider capabilities - identify supported resources, data sources, actions, ephemeral resources, and functions
npx -y skills add quixoticmonk/terraform-schema-inspector-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Identify Terraform provider support for resources, data sources, actions, list resources, ephemeral resources, and functions. Use when checking provider capabilities, asking "what resources does X provider support", "does provider Y have actions", or querying specific provider features.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.2 KB, as published. Nobody here has run it
Terraform Schema Inspector
Identify which capabilities a Terraform provider supports:
- Resources: Standard managed resources
- Data Sources: Read-only data queries
- Actions: Imperative operations during lifecycle events
- List Resources: Resources supporting bulk list operations
- Ephemeral Resources: Temporary resources for credentials/tokens
- Functions: Provider-specific functions
Workflow
When a user asks about provider capabilities:
-
Prepare working directory
- Create a temporary directory:
/tmp/tf-inspect-$$ - Change to that directory
- Create a temporary directory:
-
Determine provider source
- Use
get_latest_provider_versiontool to find namespace and version - Common namespaces:
hashicorp(aws, google, azurerm),integrations(github),oracle(oci)
- Use
-
Create provider configuration
- Create
main.tfwith provider source:terraform { required_providers { <provider> = { source = "<namespace>/<provider>" version = "~> <version>" } } } provider "<provider>" {}
- Create
-
Initialize Terraform
- Run
terraform init -upgradeusingexecute_bash - This downloads provider binaries from the registry
- User can see what's being downloaded
- Run
-
Run inspection script
/path/to/skill/scripts/check.sh <capability_type> <provider_name>The script:
- Validates inputs
- Reads existing schema from initialized providers
- Filters and formats output as JSON
-
Present results
- Display JSON output
- Empty arrays mean no capabilities of that type
-
Clean up
- Remove temporary directory:
rm -rf /tmp/tf-inspect-*
- Remove temporary directory:
Security
Agent-Managed Operations:
- Provider configuration creation (agent creates main.tf)
- Terraform initialization (agent runs
terraform init) - Provider binary downloads (visible to user during init)
Script Operations (Read-Only):
- Input validation: Provider names restricted to
^[a-zA-Z0-9_-]{1,64}$ - Schema reading: Queries existing
.terraform/directory - Safe string handling: Uses jq's
--argto prevent injection
User Visibility:
- All provider downloads happen via agent's
terraform initcommand - User sees what's being downloaded before script execution
- Script only reads existing schema data
Capability Types
resources- Standard managed resourcesdata-sources- Read-only data sourcesactions- Imperative lifecycle actionslist- List resource capabilitiesephemeral- Ephemeral resources (credentials, tokens)functions- Provider-specific functions
Examples
Check Google provider for actions
# In temporary directory with provider config:
/path/to/skill/scripts/check.sh actions google
Check AWS ephemeral resources
/path/to/skill/scripts/check.sh ephemeral aws
Check Azure data sources
/path/to/skill/scripts/check.sh data-sources azurerm
Check all configured providers for a capability
# Omit provider name to check all:
/path/to/skill/scripts/check.sh functions
Output Format
Returns JSON mapping providers to their supported capabilities:
{
"aws": [
"aws_cognito_identity_openid_token_for_developer_identity",
"aws_ecr_authorization_token",
"aws_eks_cluster_auth",
"aws_kms_secrets",
"aws_lambda_invocation",
"aws_secretsmanager_random_password",
"aws_secretsmanager_secret_version",
"aws_ssm_parameter"
]
}
Requirements
- Terraform CLI installed
- jq (JSON processor)
Notes
- Agent handles provider configuration and initialization
- Script operates in read-only mode on existing schema
- Work in temporary directories to avoid workspace pollution
- Empty arrays mean provider has no capabilities of that type