/devops-skills:terraform-modulesfrom devops-skills
Guides designing reusable Terraform modules with clean interfaces, input validation, version pinning, and knowing when to extract shared logic. Useful when writing new modules, designing variables and outputs, or deciding whether abstraction is warranted.
Ships in devops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A module is a promise: call it with these inputs and it gives you these outputs, and you never need to read its internals to trust it. That promise only holds if the interface is deliberately designed, not just whatever variables happened to exist when the code was extracted from a working root module.
The failure mode isn't usually too few modules — it's modules built too early, from a single use case, whose interface is a guess dressed up as an abstraction.
A module's job is to hide detail behind an interface, not to hide detail behind a maze.
The first time you write a VPC config, it's a root module. The second time, resist the urge — you don't yet know which parts vary and which are load-bearing constants. By the third real call site, the variance is visible: you know what actually needs to be a parameter versus what was just an artifact of one environment's choices.
Done when: the module's variable list was derived from comparing multiple real call sites, not authored speculatively for cases that don't exist yet.
Every variable and output is a contract with every future caller. A module with forty required variables and no defaults isn't flexible — it's a burden that guarantees every caller gets it slightly wrong.
variable "environment" {
type = string
description = "Deployment environment: dev, staging, or prod."
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "environment must be dev, staging, or prod."
}
}
Done when: a new caller can use the module correctly by reading variables.tf and
outputs.tf alone, without opening main.tf.
mainA module source pointing at a Git branch or an unpinned registry version means every consumer
gets whatever the module author pushed today, including bugs, silently, on their next init.
That's the same class of risk as an unpinned base image — see immutable-infrastructure for the
image-side version of this problem.
terraform init -upgrade.Done when: every module source in the codebase resolves to a pinned, immutable version, not a mutable ref.
A module that calls a module that calls a module is hard to debug — a plan error three layers down forces the reader to trace variables through every intermediate layer to find where a value actually originates. Depth doesn't buy reuse; it buys indirection.
Done when: tracing any output back to its source resource takes at most two hops through module boundaries.
A module should have no idea whether it's being called for dev or prod — that distinction belongs
in the calling root module's .tfvars, not baked into conditional logic inside the module
itself. A module littered with count = var.environment == "prod" ? 1 : 0 is really two modules
pretending to be one.
Done when: no module source file references an environment name directly — all environment-specific behavior comes in through variables set by the caller.
A module without a test is only validated by whoever calls it first, in whatever environment
they happen to be applying to — often production. Use terraform test, Terratest, or a
plan-only CI check against a fixed set of example inputs before publishing a change. See
infrastructure-testing for the broader discipline this belongs to.
Done when: every published module has at least one automated test that applies it with representative inputs and asserts on the resulting plan or real resources.
State which modules exist, what real call sites justified each one, and whether their sources are version-pinned across the codebase. Name the honest gap — usually a module extracted too early from a single caller, an unpinned source still floating on a branch, or a module with no test — rather than presenting the module library as fully mature.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub arjunprabhulal/devops-skills --plugin devops-skills88 skills in this plugin
/alertingCovers designing alerts that page a human only when a human needs to act — symptom-based alerting over cause-based, multi-window burn-rate alerts on error budgets, severity tiers that route between page/ticket/dashboard, requiring every page to link a runbook, and tuning out alert fatigue. Use this whenever the user is writing a new alert rule, asking why on-call is paged too often or missing real incidents, choosing an alert threshold, or designing severity routing. For the SLO the burn-rate math comes from use `slo-definition`, and for what a runbook should contain use `runbooks`./api-gatewayCovers the managed front-door pattern for APIs — request routing, centralized auth, rate limiting and quotas, request/response shaping, and recognizing when a gateway helps versus becomes a bottleneck or single point of failure. Use this whenever the user is designing an API entry point, adding rate limits or quotas, centralizing auth for several backend services, transforming a request between an external and internal contract, or debugging a gateway timeout. For east-west traffic between internal services use `service-connectivity`, and for token issuance details use `iam-access-management`./argocd-operationsCovers running Argo CD day to day — structuring app-of-apps, choosing sync policies and waves, reading health versus sync status correctly, and unsticking a degraded or hung Application. Use this whenever the user mentions Argo CD, an Application stuck "Progressing" or "OutOfSync," app-of-apps or ApplicationSets, sync waves and hooks, or asks why a deploy shows synced but the workload is unhealthy. For the underlying model this tool implements use `gitops`; for automated canary analysis on top of it use `progressive-delivery`; for the workloads it manages use `kubernetes-operations`.