/arn-infra:arn-infra-deployfrom arn-infra
Executes infrastructure deployments to target environments with environment promotion enforcement, CI/CD awareness, cost gates, safety layers, and post-deployment resource tracking.
Ships in arn-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.
Read when SKILL.md points to them.
Execute infrastructure deployment to a target environment with environment promotion enforcement, CI/CD pipeline awareness, cost gates, safety layers, and post-deployment resource tracking. This skill orchestrates the actual apply/deploy step, producing handoff files with secret references and updating the issue lifecycle.
This skill is expertise-adaptive: beginner users deploy via platform CLI commands (fly deploy, railway up), while intermediate and expert users deploy via IaC tools (tofu apply, pulumi up). All experience levels receive the same safety protections.
Read ## Arness from the project's CLAUDE.md. If no ## Arness section exists or Arness Infra fields are missing, inform the user: "Arness Infra is not configured for this project yet. Run /arn-infra-wizard to get started — it will set everything up automatically." Do not proceed without it.
Extract:
yes, inform the user that infrastructure is deferred and suggest running /arn-infra-assess first. Stop.~/.arness/user-profile.yaml (or .claude/arness-profile.local.md if it exists — project override takes precedence). Apply the experience derivation mapping from ${CLAUDE_PLUGIN_ROOT}/skills/arn-infra-ensure-config/references/experience-derivation.md. If no profile exists, check for legacy Experience level in ## Arness as fallback.providers.md for per-provider details and IaC tool overridesenvironments.md for promotion pipeline and deployment statetooling-manifest.json for tool availability checksactive-resources.json for resource tracking## Arness config, for locating INFRA spec and handoff files (default: .arness/infra-specs)Read the provider configuration:
Read <providers-config-path>
Read the environment configuration:
Read <environments-config-path>
Ask the user which environment they want to deploy to (if not already specified in the invocation):
"Which environment would you like to deploy to? [list environments from config in promotion order]"
Environment promotion enforcement:
Read the promotion pipeline from environments.md. Enforce the following rules:
No skipping stages: If the promotion pipeline is dev --> staging --> production, the user cannot deploy directly to production unless staging has been deployed and verified. Check the Last deployed field for each environment in the pipeline.
Refuse direct-to-prod when staging exists: If the promotion pipeline includes a staging environment and the user requests deployment to production:
Last deployed timestamp)arn-infra-verified label or lastVerified in resource manifest)/arn-infra-deploy targeting staging, then /arn-infra-verify to validate it."First deployment to any environment is allowed: If no environment in the pipeline has been deployed yet, allow deployment to the first environment in the pipeline (typically dev or staging).
Check whether CI/CD pipelines exist for the target environment.
Scan for pipeline configurations:
.github/workflows/ -- GitHub Actions.gitlab-ci.yml -- GitLab CIbitbucket-pipelines.yml -- Bitbucket PipelinesIf pipelines exist AND the target is staging or production:
Warn: "I detected CI/CD pipelines in this project. For staging and production deployments, CI/CD is the recommended deployment method -- it ensures reproducibility, audit trails, and team visibility."
Ask (using AskUserQuestion):
"How would you like to deploy?"
Options:
If the user chooses CI/CD: help them trigger the pipeline (e.g., git push, gh workflow run) and monitor the deployment. Skip to Step 8 for post-deployment tracking.
If the user chooses local deployment: proceed with a warning logged and continue to Step 3.
If no pipelines exist OR the target is dev: Continue to Step 3 without CI/CD enforcement.
Read the local override or plugin default for
deployment-safety-checklist.md.
Run the pre-deployment safety checklist. For each gate:
IaC validation: Has the IaC been validated? Check if arn-infra-define has been run and the validation ladder passed. If not, suggest running /arn-infra-define first.
Security scan: Has a security scan been performed? (Level 2 validation). If the validation ceiling is >= 2 and no scan has been run, warn.
Cost estimation: Has a cost estimate been produced? Compare against the cost threshold. If the estimate exceeds the threshold, present a cost gate warning requiring explicit acknowledgment.
State lock check: For IaC tools that support state locking (OpenTofu, Terraform, Pulumi), verify that the state is not locked by another deployment. If locked, warn and ask whether to wait or force-unlock.
Rollback plan: Ensure a rollback strategy exists. Load the rollback patterns reference:
Read the local override or plugin default for
rollback-patterns.md.
Pending changes diff: Show the user what will change compared to the current deployed state. For IaC tools, use plan/preview output and save the plan file for exact apply:
tofu plan -var-file=environments/<env>.tfvars -out=deploy.tfplanterraform plan -var-file=environments/<env>.tfvars -out=deploy.tfplanCDK users: The deployment will use --require-approval never because CDK does not support saved plan files. The safety checklist above replaces CDK's built-in approval prompt.
Present the checklist results:
"Pre-deployment checklist for [environment]:
Proceed with deployment?"
User confirmation is required for ALL deployments. Never auto-deploy.
Based on the experience level and provider configuration, execute the deployment.
Beginner path (platform CLI):
Map the provider to the appropriate deploy command:
fly deploy --app <app-name> [--env <environment>]railway up [--environment <environment>]render deploy (if CLI available)vercel --prod (production) or vercel (preview)netlify deploy --prod (production) or netlify deploy (draft)Run the command and stream output to the user.
Intermediate / Expert path (IaC tool):
Map the IaC tool to the appropriate apply command:
| IaC Tool | Apply Command |
|---|---|
| OpenTofu | tofu apply deploy.tfplan |
| Terraform | terraform apply deploy.tfplan |
| Pulumi | pulumi up --stack <env> --yes |
| CDK | cdk deploy --context env=<env> --require-approval never |
| Bicep | az deployment group create --resource-group <rg> --template-file main.bicep --parameters @<env>.parameters.json |
| kubectl | kubectl apply -k environments/<env>/ or kubectl apply -f <manifests> |
| Helm | helm upgrade --install <release> <chart> -f values-<env>.yaml --namespace <env> |
Important: For OpenTofu/Terraform, the saved plan file (deploy.tfplan) from Step 3's pending changes diff is applied directly. This guarantees the user approves exactly what gets deployed, eliminating plan-apply drift. No -auto-approve flag is needed — saved plan files apply without prompting. For Pulumi and CDK, --yes/--require-approval never flags are used because these tools do not support saved plan files; the user has already confirmed in Step 3.
Ephemeral deployments (environments with a TTL): Before executing, set a TTL for the deployment:
Ask: "This is an ephemeral deployment. How long should these resources live? (e.g., 2h, 24h, 7d)"
Record the TTL. After deployment:
active-resources.json)arn-infra-cleanup label:
Persistent deployments (long-lived environments): Execute with state locking enabled. Ensure the state backend is configured for team collaboration (remote state in S3, GCS, Azure Blob, Pulumi Cloud, etc.).
Stream deployment output and monitor for errors.
Success indicators by tool:
If deployment fails:
Capture the error output
Categorize the failure (authentication, quota, permission, resource conflict, timeout, network)
Present the error with remediation suggestions
Ask (using AskUserQuestion):
"Deployment failed. What would you like to do?"
Options:
Update issue label to arn-infra-failed if issue tracking is configured
Skip to Step 8 to record the failure
If deployment shows no progress for 30 minutes: Present: "Deployment appears to be stalled -- no progress for 30 minutes." Offer options: continue waiting / cancel the deployment / investigate the stuck resource.
Read
${CLAUDE_PLUGIN_ROOT}/skills/arn-infra-deploy/references/resource-manifest-schema.mdfor theactive-resources.jsonschema.
After successful deployment, update active-resources.json (path from ## Arness Resource manifest field):
For each deployed resource, record:
If active-resources.json does not exist, create it with the initial resource entries.
Read
${CLAUDE_PLUGIN_ROOT}/skills/arn-infra-deploy/references/infra-handoff-template.mdfor the handoff file template.
Generate INFRA_HANDOFF_<environment>.md in the Infra specs directory (from ## Arness config, default: .arness/infra-specs).
Generate the handoff file using the template from the reference. The handoff includes deployment summary, endpoints, connection strings, environment variables, access instructions, monitoring endpoints, and rollback procedures.
CRITICAL SECURITY RULE: Handoff files must NEVER contain raw secret values. All connection strings, passwords, tokens, and API keys must be referenced by their storage location (secret manager ARN, Vault path, environment variable name, platform secret reference). This is non-negotiable.
Update issue labels (if issue tracking is configured):
On successful deployment:
arn-infra-stagingarn-infra-productionarn-infra-failed label from previous attemptsOn failed deployment:
arn-infra-failedUpdate environments.md:
Update the target environment entry in environments.md:
Present the deployment summary:
"Deployment Summary:
Files created/modified:
Recommended next steps:
/arn-infra-verify to validate health checks, DNS, SSL, and resource state/arn-infra-pipeline to automate future deployments/arn-infra-deploy targeting [next environment]/arn-infra-monitor to set up observabilityOr run /arn-infra-wizard for the full guided pipeline."
## Arness config missing: Suggest running /arn-infra-wizard to get started. Stop.Deferred: yes): Inform the user that infrastructure is deferred. Suggest running /arn-infra-assess to produce a full infrastructure plan first, then /arn-infra-define to generate IaC, then re-running deploy. Stop./arn-infra-define to generate infrastructure code before deploying. Stop./arn-infra-init to configure providers. Stop./arn-infra-discover to check and install required tools. Stop.aws sso login, gcloud auth login, az login, fly auth login, etc.) and retrying. Do not retry automatically. Stop.arn-infra-failed label. The state file reflects the partial state -- subsequent applies will reconcile./arn-infra-init to set it up.What SKILL.md sets; muted values are Claude Code's defaults
25 skills in this plugin
/arn-infra-assessThis skill should be used when the user says "assess infrastructure", "infra assess", "arn infra assess", "infrastructure assessment", "analyze infrastructure needs", "what infrastructure do I need", "infrastructure audit", "app infrastructure assessment", "full infra assessment", "infrastructure review", "assess my app", "un-defer infrastructure", "infra backlog", or wants a comprehensive analysis of their application's infrastructure needs, including processing deferred infrastructure backlogs, to produce a prioritized infrastructure backlog published as issues./arn-infra-change-planThis skill should be used when the user says "plan infra change", "arn-infra-change-plan", "infra change plan", "plan this infrastructure change", "create infra plan", "arn infra plan", "plan the infra spec", "infrastructure implementation plan", "infra plan from spec", "generate infra plan", "plan infrastructure", or wants to generate a phased implementation plan from an infrastructure change specification, structured by provisioning order, blast radius, rollback checkpoints, and environment promotion gates./arn-infra-change-specThis skill should be used when the user says "infra change spec", "infrastructure change", "specify infrastructure change", "change spec", "arn infra spec", "describe infra change", "what infrastructure needs to change", "infra spec", "spec this infra change", "write infra spec", "infrastructure change specification", "create infra change spec", "upgrade to pipeline", "convert to pipeline", or wants to iteratively develop an infrastructure change idea into a well-formed specification through guided conversation, or wants to upgrade existing interactive IaC artifacts into the structured change pipeline./arn-infra-cleanupThis skill should be used when the user says "cleanup", "infra cleanup", "arn infra cleanup", "clean up resources", "destroy expired resources", "check ttl", "check expired", "ttl cleanup", "remove old deployments", "destroy dev environment", "tear down", "teardown infra", "destroy resources", "cleanup ephemeral", "check for expired resources", "clean up infra", "resource cleanup", "destroy old resources", "prune resources", "delete expired deployments", "decommission", or wants to check for and destroy expired ephemeral infrastructure resources. This skill also supports periodic monitoring via `/loop 6h /arn-infra-cleanup` for session-duration TTL enforcement./arn-infra-containerizeThis skill should be used when the user says "containerize", "dockerize", "create dockerfile", "docker setup", "container setup", "arn infra containerize", "infra containerize", "generate docker", "docker compose", "compose setup", "containerize my app", "docker configuration", "create docker-compose", "multi-stage docker", "container config", "dockerize my application", "infra docker", "set up containers", or wants to generate Dockerfiles, docker-compose configurations, and .dockerignore files for their application with security auditing and multi-stage build best practices./arn-infra-defineThis skill should be used when the user says "define infrastructure", "generate IaC", "infra define", "arn infra define", "generate terraform", "generate opentofu", "generate pulumi", "generate cdk", "generate bicep", "create kubernetes manifests", "provision cloud resources", "create IaC", "infrastructure as code", or wants to generate infrastructure-as-code in their chosen IaC tool for configured cloud provider(s). It produces provider-specific infrastructure code, validates it through a multi-level validation ladder, and writes an infrastructure architecture spec.npx claudepluginhub appsvortex/arness --plugin arn-infraOther plugins' skills for the same job