kramme-cc-workflow/skills/kramme:code:migrate/SKILL.md
(experimental) Plan and execute framework or library version migrations with phased upgrades and verification gates. Use when upgrading major framework versions (Angular, React, Node) or migrating between libraries.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:code:migrateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Plan and execute framework/library version migrations with phased upgrades, codemod automation, and verification gates between each phase.
Use kramme:code:source-driven for the official-doc grounding discipline inside this workflow, and kramme:code:deprecate after the migration when the old path still needs an explicit announcement / migration / removal plan.
Skip for: patch or minor version bumps with no breaking changes, isolated single-package upgrades, runtime-only changes (e.g. bumping .nvmrc without language/API changes), and routine dependency updates — use kramme:deps:audit or kramme:pr:create directly instead.
Wherever this skill says "ask the user", ask via the structured question tool when available, otherwise in plain prose, and wait for an explicit choice before proceeding.
Parse $ARGUMENTS for --auto before Step 1.
AUTO_MODE=true and remove the flag from the remaining input.--auto means: execute the full migration plan without pausing for review, skip phase-by-phase checkpoints, and abort on unresolved verification failures after the built-in retry budget is exhausted./kramme:code:migrate "Angular 19" [--auto]
|
v
[Step 0: Preflight] -> Check clean working tree, detect prior plan/branch
|
v
[Step 1: Parse Target] -> Framework + current/target versions
|
v
[Step 2: Fetch Migration Guide] -> Official docs, breaking changes, codemods
|
v
[Step 3: Codebase Impact Analysis] -> Grep for affected patterns
|
v
[Step 4: Generate Migration Plan] -> Phased plan with verification gates
|
v
[Step 5: User Review] -> Execute / phase-by-phase / plan only / SIW
(skipped under --auto: executes full plan)
|
v
[Step 6: Execute Phase-by-Phase] -> Migrate → verify → checkpoint
(per-phase pause skipped under --auto)
|
v
[Step 7: Completion Report] -> Summary + next steps
git status --porcelain.
AUTO_MODE=true, abort with: Working tree is dirty. Commit or stash changes before running --auto migration. Files: {list}.header: Working Tree Not Clean
question: Uncommitted changes will be carried onto the migration branch, mixing pre-existing work with migration changes. How to proceed?
options:
- Abort — let me commit or stash first
- Stash and continue — run `git stash -u`, restore after
- Continue anyway — I accept the mixed diff
migration-plan-*.md in the project root and an existing migrate/* branch.
AUTO_MODE=true, abort with: Prior migration artifacts detected ({plan-file} / {branch-name}). Auto mode will not overwrite. Remove artifacts or run without --auto to choose.header: Prior Migration Detected
question: Found existing migration artifacts ({plan-file} / {branch-name}). How to proceed?
options:
- Resume — keep plan, switch to branch, ask which phase to start from
- Restart — delete plan, abandon branch (confirm), start fresh
- Abort — leave artifacts untouched, stop here
$ARGUMENTS.
Angular 19, React 19, Node 22, Next.js 15, TypeScript 5.5AUTO_MODE=true:
Auto mode requires an explicit migration target such as "Angular 19" or "Node 22".AUTO_MODE is false, ask the user:header: Migration Target
question: What framework/library and version do you want to migrate to?
options:
- (freeform) e.g. "Angular 19", "React 19", "Node 22"
Detect the current version from project files:
package.json — dependencies, devDependencies, enginesCargo.toml — [dependencies]pyproject.toml / requirements.txtgo.mod*.csproj — <PackageReference>, <TargetFramework>.nvmrc / .node-version / .tool-versionsValidate direction:
AUTO_MODE=true, abort with a warning instead of prompting.Report: Current: {framework} {current} → Target: {framework} {target}
Run the DETECT / FETCH / IMPLEMENT / CITE workflow from kramme:code:source-driven here. Treat that skill as the source of truth for how to ground, fetch, and cite documentation. This step adds only the migration-specific scope: which sources to check and what migration details to extract.
Read known migration sources from references/migration-sources.md to identify the official migration-guide URLs, changelogs, and framework-specific upgrade hubs for the target stack.
Use the kramme:code:source-driven fetch discipline to retrieve the official migration guide and any adjacent official changelog / breaking-change references for {framework} {current} -> {target}.
references/migration-sources.md.UNVERIFIED instead of guessing.Extract from the guide:
Check for codemods from references/codemod-registry.md.
Read common patterns from references/common-breaking-patterns.md.
If no official guide found: mark that gap explicitly, then search community resources as a fallback and warn the user that manual verification may be needed before implementation.
For each breaking change from Step 2:
For large codebases (50+ affected files), use the platform's subagent primitive when available to parallelize analysis; otherwise analyze serially.
Breaking changes applicable: {N} of {total from guide}
Files affected: {N}
Automated (codemod): {N} changes across {N} files
Semi-automated: {N} changes across {N} files
Manual: {N} changes across {N} files
Read the template from assets/migration-plan.md.
Create a phased plan:
Phase 0: Pre-Migration (Quick)
migrate/{slug} from current HEAD — {slug} follows the same derivation rules as the plan filename below. This naming is mandatory: Step 0 resume detection looks for migrate/* branches./kramme:deps:audit if availablePhase 1: Automated Migration — Codemods (Quick to Moderate)
Phase 2: Breaking Changes — Manual Fixes (Moderate to Significant)
Phase 3: Configuration Updates (Quick)
Phase 4: Fix Compilation and Type Errors (Moderate)
Phase 5: Fix Tests (Moderate to Significant)
Phase 6: Cleanup (Quick)
Write plan to migration-plan-{slug}.md in the project root, where {slug} is {framework}-{target} normalized as:
-- trimmedExamples: Angular 19 → angular-19, Next.js 15 → next-js-15, Node 22 → node-22. Reject the input and abort if the slug is empty after normalization.
Refuse to write outside the project root. If a file already exists at the target path, the Step 0 preflight should have handled it — if it slips through, ask the user (overwrite / abort), or abort under AUTO_MODE.
If AUTO_MODE=true, skip this prompt and choose Execute full plan — all phases with verification gates.
Otherwise, ask the user:
header: Migration Plan Ready
question: How would you like to proceed?
options:
- Execute full plan — all phases with verification gates
- Phase by phase — pause after each phase for review
- Plan only — save plan, don't execute
- Create SIW workflow — init SIW with phases as issues
Run /kramme:siw:init {plan-path} for the user, do not invoke it automatically, then STOP.For each phase:
Announce:
── Phase {N}: {Name} ──────────────────────
Effort: {estimate}
Execute migration steps (codemods, code changes, config updates).
Run verification gate — invoke /kramme:verify:run via the Skill tool for comprehensive checks, or fall back to the project's build/lint/test commands if the skill is unavailable.
If verification fails: attempt fix (max 3 iterations), then escalate:
If AUTO_MODE=true, skip the prompt below after the 3 failed attempts, print the errors, and abort while keeping changes made so far.
Otherwise, ask the user:
header: Verification Failed — Phase {N}
question: Phase {N} verification failed after 3 attempts. How to proceed?
options:
- Show errors — display full output
- Skip phase — mark incomplete, continue
- Abort — stop, keep changes so far
- Retry — another round of fixes
Skip this checkpoint entirely when AUTO_MODE=true. Otherwise, ask the user:
header: Phase {N} Complete
question: Continue to Phase {N+1}?
options:
- Continue to Phase {N+1}
- Review changes — show git diff
- Abort — stop here
Migration Complete
Framework: {framework} {current} → {target}
Branch: {branch_name}
Phases Completed: {N}/{total}
Phase 0: Pre-migration {DONE/SKIPPED/FAILED}
Phase 1: Codemods {DONE/SKIPPED/FAILED} ({N} files)
Phase 2: Breaking changes {DONE/SKIPPED/FAILED} ({N} files)
Phase 3: Configuration {DONE/SKIPPED/FAILED}
Phase 4: Type fixes {DONE/SKIPPED/FAILED}
Phase 5: Test fixes {DONE/SKIPPED/FAILED} ({N}/{total})
Phase 6: Cleanup {DONE/SKIPPED/FAILED}
Verification:
Build: {PASS/FAIL}
Lint: {PASS/FAIL}
Tests: {PASS/FAIL} ({passed}/{total})
Manual Steps Remaining:
- {list if any}
Next Steps:
- /kramme:verify:run for full verification
- /kramme:pr:create to submit migration PR
STOP — Do not continue unless the user gives further instructions.
| Scenario | Action |
| --- | --- |
| No migration guide found | Proceed with codebase analysis, warn about manual research |
| Target version doesn't exist | Abort: Version {target} not found for {framework} |
| Current version not detected | If AUTO_MODE=true, abort with a clear error. Otherwise ask the user for the current version |
| Codemod fails | Capture error, skip to manual approach, log failure |
| Codemod produces invalid code | Revert affected files, fall back to manual |
| Verification gate fails 3 times | If AUTO_MODE=true, print errors and abort while keeping changes so far. Otherwise escalate to user with options |
| Conflicting peer dependencies | Report conflicts, suggest resolution order |
| Migration branch exists | If AUTO_MODE=true, abort with a clear error. Otherwise ask the user: use existing, create new, or abort |
development
Runs kramme:pr:code-review as a closeout review loop for local or PR branch changes before commit, ship, or final response. Use when the user asks for autoreview, second-model review, or a final code-review pass after non-trivial edits. Not for UX, visual, accessibility, or product review.
development
Guides topic-level understanding verification for a PR, branch, feature, document, spec, design decision, bug fix, or other concrete subject. Use when the user asks to confirm, quiz, drill, teach-and-check, or verify that they understand a topic. Maintains a topic-specific checklist artifact and requires demonstrated understanding before marking the topic complete. Not for ordinary explanations without verification, end-of-session summaries, or code/test correctness checks.
testing
Design a CI/CD pipeline with quality gates, a <10-minute budget, feature-flag lifecycle, and an exit checklist. Use when adding a new CI pipeline, changing gate configuration, or planning a rollout for a new service. Complementary to kramme:pr:fix-ci (which fixes failures in an existing pipeline). Covers gate ordering, secrets storage, branch protection, rollback mechanism, and staged-rollout guardrails — not a rollout-execution runbook.
tools
--- name: kramme:visual:demo-reel description: Capture local demo evidence for observable product behavior: screenshots, before/after image sets, browser reels, terminal recordings, and short GIF/video proof. Use when shipping UI changes, CLI features, or any change where PR reviewers would benefit from visual or behavioral evidence. argument-hint: "[what to capture] [--url <url>|auto] [--tier static|before-after|browser-reel|terminal-recording]" disable-model-invocation: true user-invocable: tr