planguard-refactorlisted
Install: claude install-skill vivekbhange-hub/plan-guard-skill
# planguard-refactor: change the code, not the infrastructure
Terraform tracks resources by address (`aws_db_instance.main`). Rename the block, move it into a
module or change `count` to `for_each`, and the old address disappears from the code: Terraform
plans to destroy the old object and create a new one. A refactor should produce a plan with no
destroy or replace at all, and this skill is built around proving that.
## Inputs
- The refactor in one sentence (rename, move to module, count to for_each, split a stack, adopt
an existing resource) and the Terraform version (`moved` needs 1.1, `import` blocks need 1.5).
- The current addresses and the new addresses. If the user does not know the old ones, they run
`terraform state list` themselves.
- Where state lives (local file, S3 backend, Terraform Cloud) and whether it is versioned.
- No script runs in this skill; on Windows use `python` (or `py -3`) for the review commands of
`planguard-terraform` that it hands off to.
## Outputs
- The code change: a `moved {}` block per renamed or moved address, or an `import {}` block, shown
as a diff.
- When a `moved` block cannot express it (cross-state moves), the exact `terraform state mv` or
`terraform state rm` plus `import` commands, as text for the user to run.
- A verification checklist ending in a plan with zero destroy and zero replace.
## Steps
1. **Confirm authorization.** The user should own the state and the infrastructure. Claude edits
code and prints co