Writes Terraform, Kubernetes manifests, Helm values, Kustomize overlays, and CI definitions from an agreed infrastructure design into a real repository. Enforces pinned versions, single ownership, digest continuity, and no secret exposure.
Ships in infra. 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.
Code that can be applied to the named environment, in which every version is pinned, every touched resource has a single identifiable owner, the image digest is continuous from build to deploy, and no secret value appears in any artifact — accompanied by the verification commands that were actually run and their results.
| Situation | Do this |
|---|---|
| No design exists | Run a short design pass first — at minimum the ownership split, target clouds and target environments. Do not start writing without them |
| The repository and the bundle disagree | Follow the repository and report the difference. The bundle is a snapshot of specific commits (@rules/okf-k8s-tf-bundle.md §4) |
| The write target is owned by something else | Stop. Never hand-edit a Terraform-managed resource, never touch an Argo CD-managed resource from CI [architecture/platform-architecture.md] |
| A version must be written | Look it up; never recall it, and never copy it from an example in this repository (@rules/dependency-versions.md) |
| The work hits hard ground (complex migration, state surgery, CRD upgrade) | Do not push through. Say so and suggest /model opus |
| File | Required/Recommended | Source |
|---|---|---|
knowledge/okf-k8s-tf/ | Required | Vendored bundle (@rules/okf-k8s-tf-bundle.md) |
| The agreed design document | Required | /infra:design, or the user |
| The target repository | Required | Read its real structure before writing |
When invoked from /infra:start, environment, cloud, target path and $OKF arrive already
settled. Do not re-ask them.
The environment changes both where the code goes and who applies it.
| Environment | Where it is written | Applied by | Bundle |
|---|---|---|---|
| local | Shared base + a local overlay, plus a startup script | The developer | Out of scope |
| test | kubernetes/test or the app's k8s/ | A documented procedure or CI kubectl apply | Observed implementation |
| staging | kubernetes/staging (the app-of-apps entry kustomization.yaml) | Argo CD | Observed implementation |
| production | To be decided (follows staging) | Argo CD + approval | No observed implementation |
Production code is written as staging's configuration plus approval, protection and sync windows — stating explicitly that the bundle has no precedent for it (@rules/infra/environments.md §0, §4).
The bundle describes specific commits. Where the real repository differs, the repository wins; report the difference rather than quietly converging on the bundle. Confirm the owner of every write target before writing.
Following the observed implementation [foundation/terraform.md, architecture/platform-architecture.md]:
terraform/
global/
environments/<cloud>/<env>/infra/ # network, cluster, database, IAM, storage
environments/<cloud>/<env>/kubernetes/ # shared components (helm_release etc.)
modules/{aws,azure,gcp,kubernetes}/
charts/ # per-environment values for upstream charts
kubernetes/
base/ # common to every environment; no environment branching
local/ # overlay onto base. Out of the bundle's scope (replica 1, substituted dependencies)
test/ # overlay onto base. Applied by procedure or CI kubectl apply
staging/ # overlay onto base. The app-of-apps entry point
production/ # overlay onto base. To be decided (follows staging)
<env> is test / staging / production. Local never enters the terraform tree (it builds
no L1); its manifest differences live in the Kustomize overlay.
The observed implementation has only kubernetes/test and kubernetes/staging; factoring out
base/ and adding local/ and production/ is this skill's convention, not the bundle's.
Where the existing repository is arranged differently, follow it and report the difference.
Mandatory [foundation/terraform.md]:
.terraform.lock.hcl per root configuration; for several OS/arch, pre-register hashes
with terraform providers lock -platform=...network, database, kubernetes-cluster). Keep the
module tree shallow and prefer composing small modulesvariables.tf carries type, description and validation; outputs.tf carries descriptiondepends_on only where order cannot
be expressed as a valuemoved blocks rather than relying on terraform state mvsensitive = true suppresses display; it does not remove the value from state. Keep secret
values out of tfvars, plan artifacts, CI logs and local-exec argumentsFor multi-cloud, align L1 module output names across the three clouds (@rules/infra/multi-cloud.md §1).
Minimum verification after generating:
terraform fmt -check -recursive
terraform init -backend=false
terraform validate
terraform plan -detailed-exitcode # only where credentials are available
Mandatory [foundation/kubernetes.md]:
cluster-admin, no wildcard verbs or
resources, no default ServiceAccount token[foundation/helm.md]
values.yaml holds defaults, environment differences go in separate values, secret values come
from an external secret store. Even set_sensitive can persist in Terraform state — prefer a
design that never passes the secret at allVerification: run helm lint, helm template and a server-side dry-run equivalent in CI.
[foundation/kustomize.md]
images transformer, never by string substitution in YAMLVerification:
kubectl kustomize <overlay>
kubectl apply --server-side --dry-run=server -k <overlay>
Keep the Kustomize version used by Argo CD, by CI and locally in step.
[delivery/gitlab-cicd.md]
main or latestdocker:27. Enable TLSresource_group[delivery/docker-cosign.md]
.dockerignore that excludes .git, credentials and build artifactsARG / ENV / layers; use BuildKit secret mounts[secrets/vault.md, secrets/external-secrets.md]
SecretStore (namespace-scoped) is the default; use ClusterSecretStore only after designing
namespace restrictions, controller class and RBACrefreshPolicy (Periodic / OnChange / CreatedOnce) with
creationPolicy / deletionPolicy that the requirement calls for. For a value that must be
immutable after first creation, consider CreatedOnce plus immutable: true and ownership on
the targetprune / selfHeal settings together with the break-glass procedure and drift auditingresource_group
[delivery/gitlab-cicd.md]| Flag | Effect |
|---|---|
--env=<env> | Target environment: local / test / staging / production. Repeatable |
--cloud=<cloud> | Target cloud: aws / azure / gcp. Repeatable |
--auto | Do not ask. Unresolved items become open questions rather than questions |
Code is written into the target repository at the paths above — never into
${CLAUDE_PLUGIN_ROOT}, and never into generated/ (that is
/architect:generate-infra-code's output location).
Every delivery is accompanied by:
| Skill | Relationship |
|---|---|
| /infra:design | Upstream — supplies the design this implements |
| /infra:review | Reviews what this wrote |
| /architect:generate-infra-code | Sibling — emits IaC scaffolding into generated/ plus the quality-gate CI workflow, as a pipeline codegen step. This skill writes merge-bound code into a real infrastructure repository |
| /architect:update-knowledge | Reports the bundle's state (--bundle=k8s-tf) |
What SKILL.md sets; muted values are Claude Code's defaults
sonnetThree short reads, in order
/infra:implementfrom infra
npx claudepluginhub ryuking1228/ai-dev-codex-version --plugin infra4 skills in this plugin
/designInfrastructure DesignDesign a multi-cloud, four-environment infrastructure configuration from requirements and emit
the design document, environment matrix and ADRs. Grounded in the OKF k8s/tf bundle; writes no
implementation code.
/infra:design [target] [--env=<env>] [--cloud=<cloud>] [--auto] to invoke.
Use for "design the infrastructure", "decide the configuration", "select the technology",
"compare the approaches". Implementation follows separately via /infra:implement, after the
design is agreed.
/reviewInfrastructure ReviewReview existing infrastructure code or a design document against the OKF k8s/tf bundle and
return severity-ranked findings. Checks ownership overlap, image digest continuity and secret
exposure first, and always includes a multi-cloud and an environment-parity section.
/infra:review [target] [--env=<env>] [--cloud=<cloud>] [--round=<n>] to invoke.
Use for "review this infrastructure", "IaC review", "look at this Terraform". For reviewing a
GitLab MR as a review write-up, use gitlab-review.
/startInfrastructure Triage and RoutingTriage entry point for multi-cloud (AWS / Azure / GCP) x four-environment
(local / test / staging / production) infrastructure work: resolves the OKF k8s/tf knowledge
bundle, checks its freshness, fixes the target environment and cloud, then routes to the
design, implement or review skill.
/infra:start [target] [--env=<env>] [--cloud=<cloud>] to invoke.
Use for "design the infrastructure", "write the Terraform", "review this IaC" and anything
that does not yet name a mode. Not for application domain design (/architect:*), ScalarDB
data modeling (/scalardb:*), or GitLab MR review write-ups (gitlab-review).
Other plugins' skills for the same job