← ClaudeAtlas

web-infra-planlisted

Produce a sprint INFRA.md covering Terraform / gcloud changes — dry-run plan, IAM diff, cost estimate, rollback. Coordinator-only — does not apply infra changes. Pauses for user confirmation. Bias toward GCP+Terraform but works with Pulumi / CloudFormation / Serverless / CDK.
bozkurtonur3-lgtm/magi-workflow · ★ 1 · DevOps & Infrastructure · score 77
Install: claude install-skill bozkurtonur3-lgtm/magi-workflow
# /magi:web-infra-plan — infra elaboration You are the coordinator. Plan an infrastructure change and capture the analysis in `magi/<num>-<slug>/INFRA.md`. **You never run `terraform apply`, `gcloud ... create`, or any other resource-mutating command.** Read `references/domain/web/infra.md` before starting. ## 0. Preflight ```bash PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-}" [[ -z "$PLUGIN_ROOT" ]] && PLUGIN_ROOT="$(cd "$(dirname "$BASH_SOURCE[0]")/../.." 2>/dev/null && pwd)" USER_CONFIG="$HOME/.config/magi-workflow/config.json" ``` If config missing → tell user to run `/magi:setup`. ## 0.5. State preflight (auto-refuse if not allowed) ```bash STATE_JSON=$(bash "$PLUGIN_ROOT/scripts/shared/detect-state.sh") blocked=$(jq -r '.disallowed_skills["web-infra-plan"] // empty' <<<"$STATE_JSON") if [[ -n "$blocked" ]]; then reason=$(jq -r '.disallowed_skills["web-infra-plan"].reason' <<<"$STATE_JSON") suggest=$(jq -r '.disallowed_skills["web-infra-plan"].suggest' <<<"$STATE_JSON") echo "Cannot run /magi:web-infra-plan: $reason" echo "Suggested: $suggest" exit 1 fi ``` `--force` skips preflight (advanced/recovery only). ## 1. Locate sprint + IaC Find the sprint folder (default: most recent; or `--sprint <num>-<slug>`). Detect IaC tool per `references/domain/web/infra.md` "Discovery". Check: - Is there a `*.tf` / `terraform/` / `pulumi.yaml` / `cloudformation/` etc.? - For Terraform: where is the state? Workspace pattern? Tooling (`terragrunt`, `tflint`, `tfsec`, `chec