用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill iac-terraform命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | iac-terraform |
| description | Terraform/OpenTofu — remote state, modules, CI/CD, drift detection. |
IaC is code. It lives in git, gets reviewed in PRs, runs in CI, and never has secrets hardcoded in it. State is shared and locked.
OpenTofu is a drop-in open-source alternative to Terraform. All patterns here apply to both.
| Signal | Location |
|---|---|
*.tf files | infra/ or repo root |
terraform.tfvars | environment directories |
.terraform.lock.hcl | environment directories |
hashicorp/setup-terraform | CI/CD pipeline files |
TF_VAR_* env vars | .env, CI secrets |
terraform init # initialize backend and download providers
terraform validate # check syntax and provider references
terraform plan # preview changes — always review before apply
terraform apply # apply changes (never skip plan in production)
terraform destroy # destroy resources (requires explicit approval)
Never run apply without reviewing plan output in production.
| Rule | Detail |
|---|---|
| Remote state | Always use remote backend with locking — never local state in teams |
| Secrets | Use cloud secret manager data sources — never in .tfvars or -var flags |
| Modules | Create when same resources used in 2+ environments |
| Version pins | Pin module versions via git tags; pin provider versions in required_providers |
for_each over count | Use for_each with maps for resources that differ significantly |
| CI apply gates | Manual approval required for production environments |
Load references/patterns.md for: full project structure, remote state backend configs (AWS/GCP/Azure), module patterns, variable validation, secrets data sources, import commands, and anti-patterns.
Load references/ci-cd.md for: GitHub Actions plan/apply/drift-detection workflows, GitLab CI plan+apply pipeline, environment promotion pattern.
.gitignore Requirements*.tfstate
*.tfstate.backup
.terraform/
*.tfplan
.tfvars or passed via -var — all secrets use data sourcesterraform validate passes in CI on every PRterraform plan output posted to PR for reviewterraform apply requires manual approval for production environment.gitignore includes *.tfstate, .terraform/, *.tfplan