run-acceptance-tests — Claude Code skill
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.
npx skills add hashicorp/agent-skills --skill run-acceptance-tests -a claude-codeWhat run-acceptance-tests does
This skill guides Go acceptance-test runs for Terraform providers when the test name starts with TestAcc. It uses TF_ACC=1, requires an explicit -timeout, and starts with normal test output. For a repeat investigation, it can add -count=1, then -v, TF_LOG=debug, and TF_ACC_WORKING_DIR_PERSIST=1.
It traces required environment variables through PreCheck or testAccPreCheck, searches for os.Getenv in *_test.go files, and checks README, CONTRIBUTING, or .env.example. The provider Configure method can also show the credential resolution chain. Secrets stay in a single command invocation rather than repository files.
These tests create real resources through the provider's live API and can incur costs. Check that credentials point to a test account before running them. The skill also explains how to flip a passing test by changing a test check, and suggests provider sweepers after an interrupted run.
What it helps with
- run one
TestAcctest with an explicit timeout - locate missing test environment variables
- rerun a failed test without Go cache
- turn on Terraform debug logging
- check whether a passing test is a false negative
Example prompts for the agent
- Run
TestAccFeatureHappyPathas an acceptance test withTF_ACC=1and an explicit timeout. - Find the environment variables required by this failing
TestAcctest inPreCheckand*_test.gofiles. - Flip
TestAccFeatureHappyPathto verify that its checks can fail.
How to install run-acceptance-tests
1Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill run-acceptance-tests -a claude-code2Manually: put the files in place
~/.claude/skills/run-acceptance-tests/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/run-acceptance-tests/
1Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill run-acceptance-tests -a codex2Manually: put the files in place
.agents/skills/run-acceptance-tests/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill run-acceptance-tests -a cursor2Manually: put the files in place
.cursor/skills/run-acceptance-tests/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install hashicorp/agent-skills run-acceptance-tests2Manually: put the files in place
.github/skills/run-acceptance-tests/SKILL.md1Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill run-acceptance-tests -a gemini-cli2Platform CLI
gemini skills install https://github.com/hashicorp/agent-skills --path plugins/terraform/skills/run-acceptance-testsManually: put the files in place
.devin/skills/run-acceptance-tests/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add hashicorp/agent-skills --skill run-acceptance-tests -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about run-acceptance-tests
How do I install run-acceptance-tests in Claude Code?
Run npx skills add hashicorp/agent-skills --skill run-acceptance-tests -a claude-code, then run npx skills add hashicorp/agent-skills --skill run-acceptance-tests -a claude-code again. The skill file is placed at ~/.claude/skills/run-acceptance-tests/SKILL.md.
What does run-acceptance-tests do?
It guides Terraform provider acceptance-test execution and failure investigation. It covers environment setup, cache bypassing, verbose output, debug logs, workspace persistence, and false-negative checks.
Why should credentials point to a test account?
Acceptance tests call the provider's live API and create real infrastructure. That can incur costs when the configured credentials target a non-test account.