terraform — скилл для Claude Code: что делает и как установить
Задаёт агенту правила написания кода Terraform: структурирование файлов, блокировку стейта и хранение секретов в облаках AWS или GCP.
npx skills add Mindrally/skills --skill terraform -a claude-codeЧто делает terraform
Скилл задаёт модели правила работы с инфраструктурой как кодом (IaC). Он предписывает делить конфигурации на main.tf, variables.tf, outputs.tf и изолированные модули, а также фиксировать версии используемых провайдеров.
Для хранения состояния требуются удалённые бэкенды на базе S3, Azure Blob или GCS с шифрованием и блокировкой от параллельных правок. Конфиденциальные данные запрещено держать в открытом виде: скилл заставляет передавать их через HashiCorp Vault, AWS Secrets Manager либо Azure Key Vault. Без настроенных внешних утилит вроде tflint или terrascan проверки кода придётся делать вручную.
Какие задачи решает
- разбить монолитную конфигурацию на
main.tf,variables.tfи модули - настроить удалённый бэкенд в S3 или GCS с блокировкой стейта
- подключить секреты из Vault или AWS Secrets Manager вместо открытых значений
- подготовить роли IAM с принципом наименьших привилегий
Примеры запросов агенту
- Сгенерируй модуль для бакета S3 с шифрованием и разделением на
main.tfиvariables.tf - Настрой удалённый бэкенд в Azure Blob с блокировкой стейта и версионированием
- Проверь конфигурацию через
tflintи вынеси пароли в AWS Secrets Manager
Как установить terraform
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill terraform -a claude-code2Вручную: положить файлы
~/.claude/skills/terraform/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/terraform/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill terraform -a codex2Вручную: положить файлы
.agents/skills/terraform/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill terraform -a cursor2Вручную: положить файлы
.cursor/skills/terraform/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills terraform2Вручную: положить файлы
.github/skills/terraform/SKILL.md1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill terraform -a gemini-cli2Командой платформы
gemini skills install https://github.com/Mindrally/skills --path terraformВручную: положить файлы
.devin/skills/terraform/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill terraform -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о terraform
Как установить terraform в Claude Code?
Выполните команду npx skills add Mindrally/skills --skill terraform -a claude-code. Также можно вручную сохранить файл инструкции по пути ~/.claude/skills/terraform/SKILL.md.
Что делает скилл terraform?
Он задаёт модели стандарты написания манифестов: структуру файлов, версионирование модулей, шифрование стейта и интеграцию с облачными хранилищами секретов.
Какие облачные провайдеры и валидаторы поддерживает скилл?
В инструкциях описаны правила для AWS, Azure и GCP, а для валидации кода предложено использовать утилиты tflint и terrascan.
Исходный текст
SKILL.md · Apache-2.0
--- name: terraform description: Expert in Terraform infrastructure-as-code with cloud deployment patterns metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Terraform You are an expert in Terraform and infrastructure-as-code with deep knowledge of cloud providers and deployment patterns. ## Core Principles - Write concise, well-structured Terraform code with accurate examples - Organize infrastructure into reusable modules - Use versioned modules and provider version locks for consistent deployments - Avoid hardcoded values; leverage variables for flexibility ## Code Structure - Structure configurations into logical sections: - main.tf - Primary resource definitions - variables.tf - Input variable declarations - outputs.tf - Output values - modules/ - Reusable modules ## State Management - Implement remote backends (S3, Azure Blob, GCS) for state management - Enable state locking to prevent concurrent modifications - Enable encryption for state files - Separate state files across environments using workspaces or different backends - Maintain backup procedures for state files - Use `terraform state` commands for resource inspection and migration ## Best Practices - Run `terraform fmt` for consistent formatting - Use validation tools like `tflint` or `terrascan` - Store secrets in Vault, AWS Secrets Manager, or Azure Key Vault - Use data sources for dynamic values - Implement proper tagging strategies ## Security - Define access controls and security groups for resources - Follow cloud-provider security guidelines for AWS, Azure, and GCP - Encrypt state at rest - Use IAM roles and policies appropriately - Implement least privilege access ## Collaboration & Production - Implement rollback mechanisms - Use approval workflows for production deployments - Monitor state consistency and address drift issues - Use resource targeting to optimize changes - Reference official Terraform Cloud documentation for enterprise workflows
© Mindrally · Apache-2.0 · Mindrally/skills