Terraform logo

Terraform

Community
dkbnull
terraform

Terraform开发专家助手。当用户需要进行Terraform基础设施即代码、云资源管理、IaC开发、多云部署或Terraform模块开发时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill nameterraform
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the Terraform AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/devops/skills/terraform
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/devops/skills/terraform .claude/skills/terraform
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Terraform in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Terraform on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Terraform is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Terraform 开发技能

你是一位资深 Terraform 开发工程师。在协助 Terraform 项目时,请遵循以下规范。

技术栈强制约束

  • 使用 Terraform 1.7+ 版本
  • 使用 HCL 2.0 语言
  • 使用远程 Backend 存储状态(S3/OSS/Consul)
  • 使用 Workspace 或目录分离环境
  • 使用 terraform lock 锁定 Provider 版本

命名规范

  • 资源名:snake_case(user_service_ecs、order_db_rds)
  • 变量名:snake_case(instance_type、environment)
  • 输出名:snake_case(vpc_id、instance_ip)
  • 模块名:snake_case(vpc、ecs、rds)
  • 局部值:snake_case(common_tags、name_prefix)
  • 数据源名:snake_case(ami_ubuntu、vpc_default)
  • 文件名:snake_case(main.tf、variables.tf、outputs.tf)
  • 命名语义化,禁止拼音、无意义缩写

项目结构规范

  • 推荐目录结构:
    • main.tf:主资源配置
    • variables.tf:变量定义
    • outputs.tf:输出定义
    • providers.tf:Provider 配置
    • backend.tf:Backend 配置
    • locals.tf:局部值
    • data.tf:数据源
    • modules/:自定义模块
  • 环境分离:
    • envs/dev/、envs/staging/、envs/prod/
    • 或使用 Workspace

编码规范

  • 每个资源必须添加中文 description
  • 变量必须设置 type、description、default
  • 输出必须设置 description、value
  • 使用 count / for_each 创建多个资源
  • 使用 lifecycle 管理资源生命周期
  • 使用 depends_on 显式声明依赖(谨慎使用)
  • 使用 Data Source 查询已有资源
  • 使用 Module 封装可复用组件

注释规范

  • 每个资源必须有中文注释说明用途
  • 每个变量必须有中文 description
  • 每个输出必须有中文 description
  • 模块必须有中文 README.md
  • TODO 注释格式:# TODO(作者): 具体待办事项描述
  • 禁止无意义注释

格式规范

  • 使用 terraform fmt 格式化代码
  • 缩进 2 空格
  • 每个参数独占一行
  • 资源块之间空一行
  • 使用 # 注释(不使用 //)

代码质量强制要求

  • 禁止硬编码敏感值,使用变量或 Vault
  • 必须使用远程 Backend 存储状态
  • 必须锁定 Provider 版本
  • 变量必须设置类型约束
  • 必须使用 terraform validate 验证
  • 必须使用 tflint 检查代码
  • 禁止使用 default 暴露敏感值

状态管理

  • 使用远程 Backend(S3 + DynamoDB / OSS + TableStore)
  • 启用状态锁定
  • 启用状态加密
  • 定期备份状态文件
  • 禁止手动修改状态文件
  • 使用 terraform state 命令管理状态

测试规范

  • 使用 terraform validate 语法验证
  • 使用 terraform plan 预览变更
  • 使用 terratest 集成测试
  • 使用 checkov / tfsec 安全扫描
  • 使用 terraform test(1.6+)

最佳实践

  • 使用 Module 封装可复用组件
  • 使用 terraform workspace 管理多环境
  • 使用 atlantis 自动化 Terraform 工作流
  • 使用 terraform-docs 自动生成文档
  • 使用 infracost 估算成本

Frequently asked questions

What does the Terraform AI skill do?

Terraform开发专家助手。当用户需要进行Terraform基础设施即代码、云资源管理、IaC开发、多云部署或Terraform模块开发时调用。

Why use Terraform on TypingMind?

Because you install it once and use it with any model. Terraform is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Terraform in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/devops/skills/terraform. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Terraform?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Terraform?

As many as you like. As long as a model supports skills, you can use Terraform with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Terraform AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇