Install Upgrade Cleanup
Pick your agent. Every command is ready to paste.
npx skills add ombulabs/claude-code_rails-upgrade-skill --skill upgrade-cleanupThe open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads upgrade-cleanup when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the upgrade-cleanup skill”. In Codex, type $upgrade-cleanup.
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 andGemfile.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_defaultsalignment: out of scope. Therails-upgradeskill handles this via itsrails-load-defaultsstep before cleanup runs.
Critical Rules
- Do NOT leave
NextRails.next?orNextRails.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-bootplugin'sworkflows/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.
Tips for Upgrade Cleanup
- • Start a fresh session after installing so your agent picks up the new skill.
- • It is part of a pack with 2 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Upgrade Cleanup
What does the Upgrade Cleanup skill do?
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
How do I install Upgrade Cleanup?
Run "npx skills add ombulabs/claude-code_rails-upgrade-skill --skill upgrade-cleanup" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Upgrade Cleanup work in Cursor and Codex?
Yes. Upgrade Cleanup uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is Upgrade Cleanup free?
Upgrade Cleanup is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made Upgrade Cleanup?
Upgrade Cleanup is published by ombulabs in the ombulabs/claude-code_rails-upgrade-skill repository, together with 1 other skills.

