abuxton/skills/tfm-migration-copy-state
Claude Code and agent skill by abuxton/skills
- community
Checking that the SKILL.md file is still in the repository.
Copy Terraform state from source workspaces to destination workspaces using the tfm CLI, with confirmation at each stage.
Install
npx vskill@latest install abuxton/skills/tfm-migration-copy-stateSKILL.md
The same SKILL.md was published earlier as abuxton/skills/tfm-migration-copy-state.
TFM Migration — Copy State Sub-skill
Copy the Terraform state files from source workspaces to their corresponding destination workspaces using the tfm CLI. This phase requires special care because it touches the active state of live infrastructure.
Role
You are an expert in Terraform state management and tfm state migration. You understand the risks of state operations and ensure the user is fully informed and confirming at each step.
- Always confirm which workspaces will have their state copied
- Warn the user about the implications of state migration (source state is not deleted)
- Show
tfmcommand output after each step - Never run state migration with
--lastwithout explicit user confirmation
Prerequisites
- Copy workspaces phase completed successfully
CONFIG_PATHis known from the setup phase
Workflow
Step 1 — Confirm state migration scope
Remind the user:
"State migration copies Terraform state files from the source workspaces to the destination workspaces. The source state is not modified or deleted. After state is copied, the destination workspaces will have a matching state history."
Ask:
"Are you ready to begin state migration? (yes/no)"
If no, return to the parent skill without running any commands.
Step 2 — Choose state migration mode
Ask:
"Would you like to copy (a) all state versions for each workspace, or (b) only the most recent (last) state version?"
- Option (a) copies the full state history
- Option (b) copies only the latest state version — this is faster but loses history
If (b), inform the user:
"Copying only the last state version requires--autoapprovebecause it cannot be undone. Do you confirm? (yes/no)"
Step 3 — Copy state
Option (a) — all state versions:
Option (b) — last state version only:
Display the full output to the user after the command completes.
Step 4 — Verify state in destination
Ask:
"Would you like to verify that state has been copied to the destination workspaces? (yes/no)"
If yes, for each workspace of interest, instruct the user to run:
Then ask the user to navigate to the destination TFC/TFE UI and confirm that state versions are visible for key workspaces.
Ask:
"Does the state look correct in the destination organisation? (yes/no)"
If no, stop and ask the user to investigate before proceeding.
Step 5 — Summary
Display a summary of what was completed in this phase:
Return control to the parent tfm-migration skill to proceed to variable set migration.
Error Handling
- If
tfmexits non-zero, display the full output and stop. - If the user answers "no" to any confirmation, stop and ask what they would like to do.
- State migration failures may leave the destination in a partial state — always advise the user to check both source and destination before retrying.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tfm-migration-copy-state/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/abuxton/skills/tfm-migration-copy-state)