upgrade-cleanup
配套升级技能,确保代码库回归单一基线并减少技术债。
会执行或建议删除分支/文件,操作前需用户确认与备份。
升级完成后的清理流程,移除双轨脚手架与过渡分支文件。
在完成或放弃 Rails 升级后清理双轨残留,把 NextRails.next?/current? 分支和 Gemfile.next 等过渡文件移除,把代码库对齐到你要保留的版本。所有有破坏性的步骤都会先和你确认是保留 next 还是回滚到 current,避免误删。基于 FastRuby 的“升级完成”方法,并扩展了放弃/暂停流程。
▸ 展开 SKILL.md 英文原文
Clean up after (or abandon) a Rails upgrade. Drop NextRails.next? and NextRails.current? branches and retire dual-boot scaffolding (Gemfile.next, Gemfile.next.lock, conditional Gemfile groups), keeping either the next or the current version. Trigger when the user says they are done with the upgrade, want to clean up dual-boot, want to drop NextRails branches, want to finish the upgrade, want to abandon or revert the upgrade attempt, want to roll back to the current Rails version, or want to pause this upgrade hop. Based on FastRuby.io's "Finishing an Upgrade" methodology, extended with an abandon/pause path.
帮我安装这个 skill:https://raw.githubusercontent.com/ombulabs/claude-code_rails-upgrade-skill/main/upgrade-cleanup/upgrade-cleanup/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/ombulabs/claude-code_rails-upgrade-skill/main/upgrade-cleanup/upgrade-cleanup/SKILL.md"# Upgrade Cleanup Skill Companion to the `rails-upgrade` plugin. Runs the cleanup pass that removes dual-boot scaffolding and aligns the codebase to the new version baseline. When activated, follow the workflow in `workflows/upgrade-cleanup-workflow.md` end-to-end. **Before any destructive step, confirm direction with the user** (Phase 0 Step 1): are they keeping the **next** version (finishing the upgrade) or keeping the **current** version (abandoning or pausing this hop)? Every subsequent step branches on that answer. To detect the next version, read the `Gemfile` (look for the `if NextRails.next?` / `else` block; the `next?` branch holds the upgraded-to version) or `Gemfile.next.lock`.