Writes Terraform, Kubernetes, Helm, Kustomize and CI definitions from an agreed design into a real infrastructure repository. Use for implementing infrastructure code with pinned versions and verified outputs.
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.
Shared files: a path written @rules/…, @skills/…, @templates/… or @docs/… is relative to the
plugin root, ${CLAUDE_PLUGIN_ROOT} — not to the project being worked on. Read it from there.
Usage: /infra:implement [target] [--env=<env>] [--cloud=<cloud>] [--auto]
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, $OKF and the freshness list
arrive already settled. Do not re-ask them.
The freshness list names the bundle documents past stale_after or awaiting re-verification
(from tools/update-okf-bundle.sh status --bundle=k8s-tf when invoked directly). A version, API
version, flag or chart value taken from a listed document is resolved from its registry or
official page rather than copied (@rules/dependency-versions.md), and the implementation notes
say the document awaits re-verification and why.
Nothing is written until the target is settled. In interactive use the user confirms each item.
Under --auto the items must arrive as explicit arguments: a missing one stops the skill, and the
question is recorded as an open question with status unasked (rules/open-questions.md §5). Under
--auto the skill never guesses a repository, path, environment or cloud.
| Item | Source | Interactive | Under --auto |
|---|---|---|---|
| Target repository | [target], the path of the real infrastructure repository | Ask. Offer git rev-parse --show-toplevel of the working directory as the first option and show the absolute path | [target] must be given; otherwise stop, unasked |
| Write paths | Directory Convention below, resolved inside that repository | List the exact paths to be created or changed and ask for a yes | Printed in the output; not asked |
| Environment | --env | Ask | --env must be given; otherwise stop, unasked |
| Cloud | --cloud | Ask | --cloud must be given; otherwise stop, unasked |
Before the first write, state the confirmed target in one block: repository (absolute path),
branch, environment(s), cloud(s) and write paths. When production is among the environments, also
state that this skill writes code only; production is applied by Argo CD after approval, never by
this skill. Inputs settled by /infra:start count as confirmed; the block is still printed.
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 skill edits files in the target repository and runs only offline checks. These are never run, in any mode, whatever the user asks:
terraform apply, terraform destroy, terraform import, terraform force-unlock, and any terraform state
command that writes statekubectl apply, kubectl delete, kubectl patch or kubectl replace without --dry-runhelm install, helm upgrade, helm uninstall, helm rollbackargocd app sync or any other Argo CD writegit push to any remote or branchkubectl get secret)tools/update-okf-bundle.sh update, which fetches from the network. Only status is used; a refresh belongs
to /architect:update-knowledgeTwo kinds of run take a state lock or reach a cluster, so they need the user's explicit request in this session:
terraform plan, and kubectl apply --dry-run=server. On staging or production they are never run unless
the user asks for that run; on test they run only when the user asks. Otherwise the CI pipeline, with its
own credentials, runs them.Allowed by default, offline: terraform fmt -check -recursive, terraform init -backend=false,
terraform validate, helm lint, helm template, kubectl kustomize <overlay>.
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 is not part of the default verification; see Never run by this skill.
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>
The server-side dry run is not part of the default verification; see Never run by this skill.
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 | No questions. [target], --env and --cloud must be given as arguments; a missing one stops the skill and is recorded as unasked. Nothing is guessed |
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
infrastructure-implementation, terraform, kubernetes, helm, kustomize, ci-cd
/infra:implement [target] [--env=<env>] [--cloud=<cloud>] [--auto]from infra
npx claudepluginhub wfukatsu/nexus-architect --plugin infra4 skills in this plugin
/designInfrastructure DesignDesign a multi-cloud, four-environment infrastructure: design document, environment matrix and
ADRs, no code. Use for "design the infrastructure" or "compare the approaches".
/reviewInfrastructure ReviewReview infrastructure code or a design against the platform bundle: ownership overlap, image
digest continuity, secret exposure, cloud and environment parity. Use for "review this Terraform".
/startInfrastructure Triage and RoutingEntry point for infrastructure work on AWS, Azure or GCP across local, test, staging and
production: fixes the environment and cloud, then routes to design, implement or review.
Other plugins' skills for the same job