home / skills / shotaiuchi / dotclaude / migration-transform
This skill helps automate code migrations by transforming deprecated syntax, API updates, and import paths while preserving behavior.
npx playbooks add skill shotaiuchi/dotclaude --skill migration-transformReview the files below or copy the command above to add this skill to your agents.
---
name: migration-transform
description: >-
Automated code transformation for migrations. Apply when performing codemods,
syntax updates, API renames, import path changes, and pattern replacements
across the codebase.
user-invocable: false
---
# Code Transformation
Perform automated code transformations for migration.
## Migration Checklist
### Syntax Transformations
- Identify deprecated syntax patterns requiring updates
- Apply language version syntax migrations consistently
- Verify transformed code preserves original semantics
- Check for edge cases missed by automated transforms
### API & Import Updates
- Rename changed API calls across the codebase
- Update import paths to reflect new module structure
- Replace removed APIs with recommended alternatives
- Verify no stale imports remain after transformation
### Pattern Replacements
- Convert deprecated patterns to idiomatic new patterns
- Replace obsolete utility usage with modern equivalents
- Update error handling to match new conventions
- Transform configuration formats to new schema
### Automated Verification
- Run transformed code through type checker and linter
- Verify all codemods are idempotent and safe to re-run
- Check that no unintended changes were introduced
- Validate transformation coverage with before/after diffs
## Output Format
Report findings with risk ratings:
| Risk | Description |
|------|-------------|
| Critical | Transformation alters program behavior, manual fix needed |
| High | Ambiguous transformation, requires human review |
| Medium | Transformation is safe but needs verification |
| Low | Straightforward rename or import update |
This skill performs automated code transformations for migration tasks across a codebase. It focuses on codemods, syntax updates, API renames, import path changes, and pattern replacements while producing a risk-rated report of findings. The goal is to make large-scale edits predictable, repeatable, and verifiable so teams can migrate with confidence.
The skill scans code for specified patterns and applies deterministic transforms such as AST-based syntax changes, API renames, and import path rewrites. It runs linters and type checkers after edits, generates before/after diffs, and classifies each change with a risk rating (Critical, High, Medium, Low). Outputs include a summary of changed files, suggested manual fixes, and verification steps for reviewers.
How are risk ratings assigned?
Transforms are scored by potential behavioral impact: Critical alters behavior and needs manual fixes; High is ambiguous; Medium is likely safe but requires verification; Low is straightforward.
Can I preview changes before applying them?
Yes. The skill generates before/after diffs and a summary so you can review edits and run tests locally before committing.