Agent skill

Rails Upgrade Cleanup

by ombulabs in ombulabs/claude-code_rails-upgrade-skill

Finishes or abandons a dual-boot Rails upgrade by removing NextRails branches and Gemfile.next scaffolding, keeping either the next or the current version.

MITAuto-check passedDevelopment

Install Rails Upgrade Cleanup

skills CLI
$ npx skills add ombulabs/claude-code_rails-upgrade-skill --skill upgrade-cleanup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ombulabs/claude-code_rails-upgrade-skill upgrade-cleanup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ombulabs/claude-code_rails-upgrade-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/upgrade-cleanup/upgrade-cleanup .claude/skills/upgrade-cleanup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
upgrade-cleanup
GitHub stars
389
Token cost
~826 tokens
SKILL.md length
356 words
Files
2
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Finishes or abandons a dual-boot Rails upgrade by removing NextRails branches and Gemfile.next scaffolding, keeping either the next or the current version.

  • Finishing a Rails upgrade and removing dual-boot code
  • SKILL.md covers When to Run, Ownership and Delegations, Critical Rules and Workflow, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Dropping NextRails.next? and NextRails.current? branches

What it does

This companion to a rails-upgrade plugin runs the cleanup pass once you decide to end the dual-boot phase. Before deleting anything it asks which side you are keeping: the next version, when the upgrade is done, or the current one, when you are abandoning or pausing the hop. Every later step depends on that answer. It reads the Gemfile and Gemfile.next.lock to find the next version, not Gemfile.lock alone, since that still pins the current version during dual-boot.

The aim is that no NextRails.next? or NextRails.current? branch stays in the tree. The workflow in workflows/upgrade-cleanup-workflow.md covers a pre-flight check, removal of dual-boot scaffolding (Gemfile.next, Gemfile.next.lock and conditional Gemfile groups), retiring old-version code, aligning CI and Ruby pins, final verification and a cleanup pull request. Aligning load_defaults is out of scope and belongs to the rails-upgrade skill. The approach builds on FastRuby.io's Finishing an Upgrade method.

When your agent uses it

  • Finishing a Rails upgrade and removing dual-boot code
  • Dropping NextRails.next? and NextRails.current? branches
  • Abandoning or pausing an upgrade hop and returning to the current Rails version
  • Opening a cleanup pull request after the final upgrade step

Example prompts

  • “We shipped the Rails upgrade; clean up the dual-boot setup and keep the new version.”
  • “Abandon this upgrade attempt and roll the app back to the current Rails version.”
  • “Remove every NextRails.next? branch and delete Gemfile.next and Gemfile.next.lock.”

Requirements

  • A Rails app in dual-boot mode with NextRails branches

What it can do on your machine

Read from SKILL.md and the folder at commit 8d13113. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • fastruby.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rails Upgrade Cleanup loads about 826 tokens when it runs. Until then it costs about 158 tokens; SKILL.md has 356 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~158
When it runs · the whole SKILL.md, loaded when a task matches
~826

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ombulabs/claude-code_rails-upgrade-skill at commit 8d13113, republished under its MIT licence (© ombulabs). 356 words, ~826 tokens.

Download SKILL.mdSave it as .claude/skills/upgrade-cleanup/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
upgrade-cleanup
description
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.

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.
Show full SKILL.md (114 more words)Show less

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.

© ombulabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in upgrade-cleanup/upgrade-cleanup of ombulabs/claude-code_rails-upgrade-skill.

  • SKILL.md
  • workflows/upgrade-cleanup-workflow.md

Open the folder on GitHubat commit 8d13113

Compare with similar skills

Rails Upgrade Cleanup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rails Upgrade Cleanup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rails Upgrade Cleanup this skillombulabs/claude-code_rails-upgrade-skill389—~826Automated safety check: PassMIT
Breaking Change Analysisruby-git/ruby-git1.8k—~1.7kAutomated safety check: PassMIT
Extract Command from Git::Libruby-git/ruby-git1.8k—~4.4kAutomated safety check: PassMIT
Legacy ModernizerJeffallan/claude-skills12k—~1.6kAutomated safety check: PassMIT
Ruby Prodavila7/claude-code-templates32k8 repos~445Automated safety check: PassMIT
Rubyericrisco/rsc-harness174—~3.2kAutomated safety check: PassMIT

Similar skills

  • Breaking Change Analysis

    ruby-git/ruby-git

    Assesses what an API change would break before it is made, finds every usage, documents the impact and plans a deprecation or migration path.

    1.8k GitHub stars~1.7k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Migrates a direct command call in Ruby Git's Git::Lib to a Git::Commands class, as part of a Strangler Fig redesign, with a plan, legacy tests and a pull request.

    1.8k GitHub stars~4.4k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Legacy Modernizer

    Jeffallan/claude-skills

    Plans incremental migrations of aging systems with the strangler fig pattern, using dependency maps, rollback plans, characterization tests and gradual traffic shifts.

    12k GitHub stars~1.6k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Ruby Pro

    davila7/claude-code-templates

    Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization.

    32k GitHub starsUsed in 8 repos~445 tokens
    DevelopmentAuto-check passed
  • Ruby

    ericrisco/rsc-harness

    A skill your agent uses when writing or refactoring plain Ruby outside Rails — scripts, CLIs, gems, libraries: Enumerable chains and blocks, module mixins and value objects, Bundler/gemspec…

    174 GitHub stars~3.2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Antipattern Prevention

    doorkeeper-gem/doorkeeper

    Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.

    5.5k GitHub stars~1.1k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed

More from ombulabs/claude-code_rails-upgrade-skill

  • Rails Upgrade Assistant

    ombulabs/claude-code_rails-upgrade-skill

    Analyzes a Rails app and builds an upgrade report with breaking changes, deprecations and step-by-step migration guides, one version at a time from Rails 2.3 through 8.1.

    389 GitHub stars~2.7k tokensUpdated 9 days ago
    Auto-check passed

Categories

Questions about Rails Upgrade Cleanup

What does Rails Upgrade Cleanup do?

Finishes or abandons a dual-boot Rails upgrade by removing NextRails branches and Gemfile.next scaffolding, keeping either the next or the current version. This companion to a rails-upgrade plugin runs the cleanup pass once you decide to end the dual-boot phase. Before deleting anything it asks which side you are keeping: the next version, when the upgrade is done, or the current one, when you are abandoning or pausing the hop.

When should I use Rails Upgrade Cleanup?

Rails Upgrade Cleanup fits situations like: finishing a Rails upgrade and removing dual-boot code; dropping NextRails.next? and NextRails.current? branches; abandoning or pausing an upgrade hop and returning to the current Rails version; opening a cleanup pull request after the final upgrade step.

How do I install Rails Upgrade Cleanup in Claude Code?

Run `npx skills add ombulabs/claude-code_rails-upgrade-skill --skill upgrade-cleanup -a claude-code`. Or copy the skill folder (upgrade-cleanup/upgrade-cleanup in ombulabs/claude-code_rails-upgrade-skill) into .claude/skills/upgrade-cleanup in your project. Claude Code loads it when a task matches its description.

How do I install Rails Upgrade Cleanup in Codex?

Run `npx skills add ombulabs/claude-code_rails-upgrade-skill --skill upgrade-cleanup -a codex`. Or copy the skill folder (upgrade-cleanup/upgrade-cleanup in ombulabs/claude-code_rails-upgrade-skill) into .agents/skills/upgrade-cleanup in your project. Codex loads it when a task matches its description.

Can I use Rails Upgrade Cleanup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ombulabs/claude-code_rails-upgrade-skill --skill upgrade-cleanup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/upgrade-cleanup, .gemini/skills/upgrade-cleanup, .github/skills/upgrade-cleanup and .opencode/skills/upgrade-cleanup in your project.

What does Rails Upgrade Cleanup need to run?

SKILL.md names no scripts, command-line tools or credentials: Rails Upgrade Cleanup is instructions for the agent only. Our summary lists: A Rails app in dual-boot mode with NextRails branches.

Does Rails Upgrade Cleanup access the network?

SKILL.md names 1 domain. As links in the text: fastruby.io. This is read from the text; nothing was executed.

Is Rails Upgrade Cleanup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rails Upgrade Cleanup use?

Rails Upgrade Cleanup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rails Upgrade Cleanup use?

About 826 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rails Upgrade Cleanup?

Skills that share tags, products or a category with Rails Upgrade Cleanup: Breaking Change Analysis (ruby-git/ruby-git, 1.8k stars), Extract Command from Git::Lib (ruby-git/ruby-git, 1.8k stars), Legacy Modernizer (Jeffallan/claude-skills, 12k stars) and Ruby Pro (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rails Upgrade Cleanup?

ombulabs (a GitHub organization) maintains it in ombulabs/claude-code_rails-upgrade-skill, which has 389 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 1, 2026.

Source: ombulabs/claude-code_rails-upgrade-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.