跳到主要内容
知仓学习社ZHICANG

upgrade-cleanup

Clean up after (or abandon) a Rails upgrade. Drop NextRails.next? and NextRails.current? branches and retire dual-boot scaffolding (Gemfile.next, Ge…

不碰外部(只输出文字)无严重或高危命中ombulabs/claude-code_rails-upgrade-skill

它会碰到什么

扫了多少2 个文本文件,18 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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. Do NOT rely on Gemfile.lock alone, since during dual-boot it still pins the current version.

When to Run

Run when the user has explicitly decided to end the dual-boot phase in one of two directions:

  • Keep next: upgrade is done (final hop or stopping point), drop the else / current branches.
  • Keep current: abandoning or pausing this hop, drop the if NextRails.next? / next branches and Gemfile.next*.

Either way the previous parallel branch must no longer be needed (no rollback window). Deployment to production is not a hard prerequisite.

Ownership and Delegations

This skill owns the cleanup. Phase 1 below is the step list to follow. The dual-boot skill's workflows/cleanup-workflow.md is older optional reading; if it drifts from this workflow, this workflow wins.

  • Dual-boot scaffolding removal: performed here in Phase 1.
  • load_defaults alignment: out of scope. The rails-upgrade skill handles this via its rails-load-defaults step before cleanup runs.

Critical Rules

  • Do NOT leave NextRails.next? or NextRails.current? branches in the tree. That is the failure mode this skill exists to prevent.
  • Do NOT start removing branches before confirming direction. Keeping the wrong side throws away the work the user wants to keep. If the user has not stated next vs current, ask.

Workflow

See workflows/upgrade-cleanup-workflow.md for the full process: a pre-flight check, dual-boot scaffolding removal, old-version code retirement, CI and Ruby pin alignment, final verification, and the cleanup PR.

Reference

  • Finishing an Upgrade, FastRuby.io
  • workflows/upgrade-cleanup-workflow.md, full workflow
  • The dual-boot plugin's workflows/cleanup-workflow.md, optional reading for context. This skill's Phase 1 is the step list to follow, do not use dual-boot's version when it conflicts.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 384
本站分层T2
该仓技能数2
原文件路径upgrade-cleanup/upgrade-cleanup/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 2 个技能