# new-terraform-provider

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

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3900 installs · ★ 909
- Author: hashicorp
- License: MPL-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/hashicorp/agent-skills/tree/HEAD/plugins/terraform/skills/new-terraform-provider/SKILL.md
- Updated: 2026-10-05
- HTML: https://affpapa.org/en/nevibecode/skills/new-terraform-provider

## What it 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.

## Requirements
- Works with: Terraform

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill new-terraform-provider -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/new-terraform-provider/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/new-terraform-provider/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill new-terraform-provider -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/new-terraform-provider/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill new-terraform-provider -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/new-terraform-provider/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install hashicorp/agent-skills new-terraform-provider
```

2. **Manually: put the files in place**
- File: `.github/skills/new-terraform-provider/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill new-terraform-provider -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/hashicorp/agent-skills --path plugins/terraform/skills/new-terraform-provider
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/new-terraform-provider/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill new-terraform-provider -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/hashicorp/agent-skills/tree/HEAD/plugins/terraform/skills/new-terraform-provider/SKILL.md

## When to use it
- 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
- 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 ./...

## Similar
- [wizard](https://affpapa.org/en/nevibecode/skills/wizard.md) — skill · 553369 installs
- [hyperframes-cli](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes-cli.md) — skill · 1300000 installs
- [setup-pre-commit](https://affpapa.org/en/nevibecode/skills/setup-pre-commit.md) — skill · 489289 installs
- [using-git-worktrees](https://affpapa.org/en/nevibecode/skills/using-git-worktrees.md) — skill · 217153 installs
- [finishing-a-development-branch](https://affpapa.org/en/nevibecode/skills/finishing-a-development-branch.md) — skill · 214439 installs
- [orca-cli](https://affpapa.org/en/nevibecode/skills/orca-cli.md) — skill · 353600 installs

From the same set: [hashicorp/agent-skills](https://affpapa.org/en/nevibecode/by/hashicorp/agent-skills.md) — 16 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
