Skip to main content
skill CX Codex

new-terraform-provider — Claude Code skill: scaffold a Terraform

A skill that walks the agent through bootstrapping a Terraform provider on the Plugin Framework, from directory layout to a passing build.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hashicorp/agent-skills --skill new-terraform-provider -a claude-code
Open on GitHub

What new-terraform-provider does

This skill lays out the order of work for a fresh terraform-provider-* project. The agent creates a root directory with that prefix, sets up a Go module, pulls in github.com/hashicorp/terraform-plugin-framework@latest, and writes main.go following the sample in assets/main.go.

Next comes internal/provider/provider.go, again from a sample. You rename the demo provider, the DEMO_* environment variables and the authentication attributes to fit your API, then strip the TODO comments from both files. Credentials are read from explicit config, falling back to environment variables.

Wrapping up: go mod tidy, go build -o /dev/null, go test ./.... Run the skill inside an existing provider workspace and it first asks whether to make a new one — say no and the rest is skipped. Growing the credential chain or adding a first resource is left to the provider-configuration and provider-resources skills, which have to be present in your setup.

What it helps with

  • lay out the directory structure for a new Terraform provider
  • set up a Go module with terraform-plugin-framework
  • write main.go for the provider server
  • create provider.go with schema and Configure
  • verify the scaffold with a build and tests

Example prompts for the agent

  • Scaffold a new Terraform provider with the Plugin Framework
  • Start a terraform-provider project for my API
  • Set up the provider skeleton and run go test ./...

How to install new-terraform-provider

1Skills CLI (Vercel)

npx skills add hashicorp/agent-skills --skill new-terraform-provider -a claude-code

2Manually: put the files in place

~/.claude/skills/new-terraform-provider/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/new-terraform-provider/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about new-terraform-provider

How do I install new-terraform-provider in Claude Code?

Run npx skills add hashicorp/agent-skills --skill new-terraform-provider -a claude-code. The skill file then sits at ~/.claude/skills/new-terraform-provider/SKILL.md.

What does new-terraform-provider do?

It steps the agent through creating a Terraform provider on the Plugin Framework: directory, Go module, main.go, provider.go with schema and Configure, then build and tests.

Which skills handle the next steps?

The description points to provider-configuration for a full credential chain and provider-resources for a first resource or data source. Both need to be available in your setup.

Similar skills

Everything for DevOps and infrastructure →

From the same set16

terraform-stacks Guides AI coding assistants through HashiCorp Terraform Stacks syntax, component definitions, and multi-environment deployment configs. CX Codex +1 5,600installs terraform-search-import Discovers untracked cloud assets and sets up Terraform configuration for bulk state imports. Helpful during infrastructure migrations and audits. CX Codex +1 4,900installs provider-resources This skill guides Terraform resource and data source work with the Plugin Framework. Use it when adding resources, handling drift, or reviewing provider code. CX Codex +1 4,100installs provider-actions Guides implementation of Terraform Actions with the Plugin Framework for operations run around resource create, update, and destroy events. CX Codex +1 3,900installs run-acceptance-tests Runs and investigates Terraform provider acceptance tests with the TestAcc prefix. Use it for missing environment variables, failed runs, or tests that pass when they should not. CX Codex +1 3,700installs provider-test-patterns A skill that guides acceptance testing for Terraform providers using terraform-plugin-testing and the Plugin Framework. CX Codex +1 3,300installs azure-verified-modules A skill that carries the Azure Verified Modules requirements, so your agent can write and review Terraform modules that pass AVM certification. CX Codex +1 3,300installs aws-ami-builder A skill that walks your agent through building Amazon Machine Images with Packer and the amazon-ebs builder — template, source AMI filters, build commands. CX Codex +1 3,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor