AT

antonbabenko/terraform-skill

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

2488 stars 质量 74 趋势 26NOASSERTION

Terraform 和 OpenTofu AI 代理技能——测试、模块、CI/CD 和生产模式

概览

这是Terraform和OpenTofu的最佳实践技能,适用于AI编码代理(Claude Code、Cursor、Copilot、Gemini CLI、OpenCode、Codex、Kiro等)。它帮助代理测试代码、构建模块、设置CI/CD以及编写生产基础设施代码。 AWS、Azure和GCP都是一流的。AWS在示例中仍是默认,但后台、认证、安全和资源指导同样适用于这三者——要求Azure或GCP的对应模式,技能会映射它。 - 原生测试与Terratest的决策矩阵 - 测试工作流程(静态、集成、端对端)- 示例和模式 - 结构与命名规范- 版本管理策略 - 公有模块与私有模块模式 - 远程后端(S3、Azure、GCS、Terraform Cloud)- 锁定与安全 - 多团队状态隔离 - 迁移与恢复程序 - GitHub Actions 工作流程 - GitLab CI 示例 - 成本优化 - 合规自动化 - Trivy 和 Checkov 集成- 策略即代码模式-...

概述(AI 翻译)

这是Terraform和OpenTofu的最佳实践技能,适用于AI编码代理(Claude Code、Cursor、Copilot、Gemini CLI、OpenCode、Codex、Kiro等)。它帮助代理测试代码、构建模块、设置CI/CD以及编写生产基础设施代码。

AWS、Azure和GCP都是一流的。AWS在示例中仍是默认,但后台、认证、安全和资源指导同样适用于这三者——要求Azure或GCP的对应模式,技能会映射它。

这项技能所提供的

测试框架

  • 本地测试与Terratest的决策矩阵
  • 测试工作流程(静态、集成、端对端)
  • 示例与模式

模块开发

  • 结构与命名规范
  • 版本控制策略
  • 公共模块模式与私有模块模式

国家管理

  • 远程后端(S3、Azure、GCS、Terraform Cloud)
  • 锁定与安全
  • 多队状态隔离
  • 迁移与恢复程序

CI/CD集成

  • GitHub Actions 工作流程
  • GitLab CI 示例
  • 成本优化
  • 合规自动化

安全与合规

  • Trivy 和 Checkov 积分
  • 策略即代码模式
  • 合规扫描工作流程

快速参考

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Terraform & OpenTofu Skill for AI Agents

A best-practices skill for Terraform and OpenTofu, for AI coding agents (Claude Code, Cursor, Copilot, Gemini CLI, OpenCode, Codex, Kiro, and more). It helps the agent test code, structure modules, set up CI/CD, and write production infrastructure code.

AWS, Azure, and GCP are all first-class. AWS stays the default in examples, but the same backend, auth, security, and resource guidance applies to all three - ask for the Azure or GCP equivalent of any pattern and the skill maps it.

What this skill provides

Testing frameworks

  • Decision matrix for native tests vs Terratest
  • Testing workflows (static, integration, E2E)
  • Examples and patterns

Module development

  • Structure and naming conventions
  • Versioning strategies
  • Public vs private module patterns

State management

  • Remote backends (S3, Azure, GCS, Terraform Cloud)
  • Locking and security
  • Multi-team state isolation
  • Migration and recovery procedures

CI/CD integration

  • GitHub Actions workflows
  • GitLab CI examples
  • Cost optimization
  • Compliance automation

Security and compliance

  • Trivy and Checkov integration
  • Policy-as-code patterns
  • Compliance scanning workflows

Quick reference

  • Decision flowcharts
  • Common patterns (DO vs DON’T)
  • Cheat sheets

Installation

Installed through one Claude Code marketplace, antonbabenko/agent-plugins (terraform-skill is listed there as an external plugin). Do not also add antonbabenko/terraform-skill as a marketplace - both use the same marketplace name and will clash.

Quick install (any agent)

Works with any Agent Skills-compatible tool:

npx skills add https://github.com/antonbabenko/terraform-skill

Per-host instructions

git clone https://github.com/antonbabenko/terraform-skill.git
mkdir -p ~/.cursor/skills
cp -R terraform-skill/skills/terraform-skill ~/.cursor/skills/
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add antonbabenko/terraform-skill
新手?先看 mcpskill.org 教程 →