terraform-cli
Skill8 starsChanged 6 months agoApache-2.0View on GitHub
Perform Terraform operations using the terraform CLI. Use for planning, validating, and inspecting infrastructure-as-code state and workspaces.
- Installs packages
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use the workspace table and rules below when constructing all terraform commands.
- Distinctive: line 12
Update the table below with your Terraform workspace/backend names before using this skill:
- Distinctive: line 20
If the target environment is unclear, ask the user before running any command.
- Very specific: line 24
If terraform is not installed or the backend is not initialized, inform the user that setup is required and ask them to complete the …
- Very specific: line 34
Always run commands from the directory containing the relevant Terraform root module, and pass -var-file explicitly for the target …
- Distinctive: line 100
NEVER target a workspace or var file not listed in the configuration table above.
- Very specific: line 101
NEVER run terraform apply, terraform destroy, or any command in the "Never run" table above without explicit user instruction — a human …
- Very specific: line 102
Always run terraform plan and show the output before ever suggesting an apply — never apply blind.
- Very specific: line 103
Always confirm the active workspace with terraform workspace show before running any command that reads or writes state, to avoid targeting …
- Very specific: line 104
NEVER print, display, or store the contents of .tfvars files or state files that may contain secrets — treat any sensitive = true output as …
- Very specific: line 105
If state appears locked (Error: Error acquiring the state lock), do NOT run force-unlock — report this to the user and let them confirm no …
- Very specific: line 106
Prefer -out=tfplan and terraform show -json tfplan when a plan must be inspected programmatically, so it can be re-applied exactly as …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Terraform CLI Skill
Use the workspace table and rules below when constructing all terraform commands.
Configuration
Update the table below with your Terraform workspace/backend names before using this skill:
| Environment | Workspace | Backend Config / Var File |
| Production | <your-prod-workspace> | <your-prod.tfvars> |
| Staging / Non-Prod | <your-nonprod-workspace> | <your-nonprod.tfvars> |
| Sandbox / Dev | <your-sandbox-workspace> | <your-sandbox.tfvars> |
If the target environment is unclear, ask the user before running any command.
Prerequisites (one-time setup by user)
If terraform is not installed or the backend is not initialized, inform the user that setup is required and ask them to complete the following steps manually. Do not perform these steps yourself.
brew install terraform
terraform init
terraform workspace listCommand Format
Always run commands from the directory containing the relevant Terraform root module, and pass -var-file explicitly for the target environment:
terraform <command> -var-file=<var-file> [options]Examples
# Select the correct workspace before running any command
terraform workspace select <your-nonprod-workspace>
# Non-Prod
terraform plan -var-file=<your-nonprod.tfvars> -out=tfplan
# Show a saved plan in human-readable form
terraform show tfplan
# Show a saved plan in JSON (for programmatic inspection)
terraform show -json tfplanAvailable Commands
Read-only (safe, no confirmation needed)
| Command | Description |
plan -var-file=<file> [-out=tfplan] | Show or save a proposed set of changes — does not mutate infrastructure |
validate | Check configuration syntax and internal consistency |
fmt -recursive [-check] [-diff] | Format or check formatting of .tf files |
show [tfplan] | Show the current state or a saved plan in human-readable form |
show -json [tfplan] | Show the current state or a saved plan as JSON |
state list | List all resources tracked in state |
state show <resource> | Show attributes of a resource in state |
output [-json] | Show output values from the root module |
workspace list / workspace show | List or show the current workspace |
graph | Generate a visual dependency graph (DOT format) |
providers | List provider requirements and versions |
version | Show Terraform and provider versions |
console | Open an interactive expression evaluator (read-only against current state) |
Mutating operations (confirm with user before running)
| Command | Description |
apply tfplan / apply -var-file=<file> | Apply a plan and provision/modify real infrastructure |
workspace new <name> | Create a new workspace |
workspace select <name> | Switch the active workspace |
refresh -var-file=<file> | Reconcile state with real infrastructure (can drift outputs) |
state mv <src> <dst> | Move a resource within state |
Never run — requires explicit human approval
| Command | Reason |
destroy / apply -destroy | Irreversibly destroys provisioned infrastructure |
apply against a production var file/workspace | Mutates live production infrastructure |
state rm <resource> | Removes a resource from state without destroying it — causes drift and orphaned resources |
import <resource> <id> | Binds existing infrastructure into state; mistakes can corrupt state |
taint <resource> / untaint <resource> | Forces recreation of a resource on the next apply |
force-unlock <lock-id> | Removes the state lock — risks concurrent, corrupting writes |
workspace delete <name> | Irreversible deletion of a workspace and its state |
Rules
- NEVER target a workspace or var file not listed in the configuration table above. If a command references an unfamiliar environment, stop and ask the user to confirm.
- NEVER run
terraform apply,terraform destroy, or any command in the "Never run" table above without explicit user instruction — a human must execute these, especially against production. - Always run
terraform planand show the output before ever suggesting anapply— never apply blind. - Always confirm the active workspace with
terraform workspace showbefore running any command that reads or writes state, to avoid targeting the wrong environment. - NEVER print, display, or store the contents of
.tfvarsfiles or state files that may contain secrets — treat anysensitive = trueoutput as a credential and do not display its value. - If state appears locked (
Error: Error acquiring the state lock), do NOT runforce-unlock— report this to the user and let them confirm no other operation is in progress. - Prefer
-out=tfplanandterraform show -json tfplanwhen a plan must be inspected programmatically, so it can be re-applied exactly as reviewed.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- paulanunes85/three-horizons-accelerator★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- alibabacloud-cliSkill
- ansible-cliSkill
- appdynamics-cliSkill
- argocd-cliSkill
- aws-cliSkill
- aws-cloudwatch-cliSkill
- azure-cliSkill
- bash-lintingSkill
- betterstack-cliSkill
- bitbucket-cliSkill
- chef-cliSkill
- code-reviewSkill
- commit-codeSkill
- create-dockerfileSkill
- create-terraform-helm-upgrade-planSkill
- datadog-cliSkill
- digitalocean-cliSkill
- dockerfile-lintingSkill
- dynatrace-cliSkill
- elasticsearch-cliSkill
- gcp-cliSkill
- github-cliSkill
- gitlab-cliSkill
- go-lintingSkill
- grafana-cliSkill
- grafana-loki-cliSkill
- graylog-cliSkill
- helm-cliSkill
- hetzner-cliSkill
- huaweicloud-cliSkill
- jaeger-cliSkill
- jenkins-cliSkill
- jira-and-confluence-cliSkill
- kibana-cliSkill
- kubernetes-cliSkill
- loggly-cliSkill
- maintenance-check-aws-eksSkill
- maintenance-create-ticket-on-jiraSkill
- ms-teams-cliSkill
- mysql-cliSkill
- newrelic-cliSkill
- oci-cliSkill
- packer-cliSkill
- papertrail-cliSkill
- postgresql-cliSkill
- prometheus-cliSkill
- python-lintingSkill
- rollbar-cliSkill
- salesforce-cliSkill
- sentry-cliSkill
- slack-cliSkill
- splunk-cliSkill
- terraform-lintingSkill
- vault-cliSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

