by ombulabs
A Claude Code Skill to Upgrade Rails
# Add to your Claude Code skills
git clone https://github.com/ombulabs/claude-code_rails-upgrade-skillGuides for using ai agents skills like claude-code_rails-upgrade-skill.
A Claude Code skill that helps you upgrade Ruby on Rails applications from version 2.3 through 8.1.
The Rails Upgrade Assistant analyzes your Rails application and generates:
rails app:updateThe skill follows a sequential upgrade strategy—you upgrade one minor/major version at a time (e.g., 5.2 → 6.0 → 6.1 → 7.0), never skipping versions.
This skill is built on real-world experience, not just documentation:
We've encountered (and solved) edge cases that don't appear in any documentation. This skill encapsulates that hard-won knowledge.
This skill depends on two companion skills: rails-load-defaults and dual-boot. A fourth sibling plugin, upgrade-cleanup, lives in this repo and runs the post-upgrade scaffolding teardown. The marketplace install handles all four.
No comments yet. Be the first to share your thoughts!
From inside the Claude Code CLI prompt (recommended):
/plugin marketplace add ombulabs/claude-skills
/plugin install rails-upgrade@ombulabs-ai
/plugin install rails-load-defaults@ombulabs-ai
/plugin install dual-boot@ombulabs-ai
/plugin install upgrade-cleanup@ombulabs-ai
From your terminal:
claude plugin marketplace add https://github.com/ombulabs/claude-skills.git
claude plugin install rails-upgrade@ombulabs-ai
claude plugin install rails-load-defaults@ombulabs-ai
claude plugin install dual-boot@ombulabs-ai
claude plugin install upgrade-cleanup@ombulabs-ai
Manual install:
# 1. This skill
git clone https://github.com/ombulabs/claude-code_rails-upgrade-skill.git
cp -r claude-code_rails-upgrade-skill/rails-upgrade ~/.claude/skills/
# 2. upgrade-cleanup (sibling plugin, same repo)
cp -r claude-code_rails-upgrade-skill/upgrade-cleanup ~/.claude/skills/
# 3. rails-load-defaults (dependency)
git clone https://github.com/ombulabs/claude-code_rails-load-defaults-skill.git
cp -r claude-code_rails-load-defaults-skill/rails-load-defaults ~/.claude/skills/
# 4. dual-boot (dependency)
git clone https://github.com/ombulabs/claude-code_dual-boot-skill.git
cp -r claude-code_dual-boot-skill/dual-boot ~/.claude/skills/
In Claude Code, navigate to your Rails application directory and use natural language:
"Upgrade my Rails app to 7.2"
"Help me upgrade from Rails 6.1 to 7.0"
"What breaking changes are in Rails 8.0?"
| Command | Description |
|---------|-------------|
| /rails-upgrade | Start the upgrade assistant |
| "Finish the upgrade" / "Clean up dual-boot" / "Abandon this upgrade" | Trigger the upgrade-cleanup plugin. Asks whether to keep the next or current version, then drops NextRails.next? / NextRails.current? branches and retires dual-boot scaffolding. |
| "Upgrade to Rails X.Y" | Generate reports from detection results |
| "Show app:update changes" | Preview configuration file changes |
| "Plan upgrade from X to Y" | Get multi-hop upgrade strategy |
This skill implements the FastRuby.io upgrade methodology, which includes:
Run your application with two versions of Rails simultaneously using the next_rails gem. This allows you to test both versions during the transition and deploy backwards-compatible changes before the version bump.
See the dual-boot skill for setup, code patterns, and CI configuration.
Once a hop is finished (or abandoned), the upgrade-cleanup sibling plugin tears down the dual-boot scaffolding so the tree stops carrying two Rails versions in parallel. It is scoped tightly to scaffolding removal, not a kitchen-sink "finish the upgrade" pass.
Activate it with phrases like "finish the upgrade", "clean up dual-boot", or "abandon this upgrade". The workflow:
bundle / bin/rails runner on both sides, and asks whether to keep the next version (finishing) or the current version (abandoning / pausing the hop).NextRails.next? / NextRails.current? branches, strips the next? Gemfile method and conditional groups, sweeps for deprecation_tracker residue before removing next_rails (the gem ships DeprecationTracker; leftover requires break test boot), swaps lockfiles, and updates CI to drop the dual-boot job.docker-compose.yml / compose.yaml sister services (web-next, worker-next with BUNDLE_GEMFILE: Gemfile.next), and doc drift (README, bin/setup, .tool-versions, Dockerfile).Dockerfile / .ruby-version / .tool-versions alignment for Ruby bumps.Out of scope by design: load_defaults alignment (handled by rails-load-defaults), deprecation triage (next-hop work owned by rails-upgrade), and migration class suffix / db/schema.rb regen (upgrade artifacts, not cleanup).
We never skip versions. Each Rails minor/major version introduces changes that build on previous versions. Skipping creates compound issues that are nearly impossible to debug.
✅ Correct: 6.0 → 6.1 → 7.0 → 7.1
❌ Wrong: 6.0 → 7.1 (skipping 6.1 and 7.0)
Before upgrading:
This reduces the upgrade to a single Gemfile change.
Be aware of these limitations:
| Limitation | Explanation | |------------|-------------| | Gradual deployments | This skill focuses on code changes, not deployment strategies. Rolling deployments, canary releases, and feature flags are outside its scope. | | Debugging monkeypatching issues | If gems or your code monkeypatch Rails internals, you may encounter weird issues that require manual investigation. | | Accurate time estimates | The difficulty ratings and time estimates are rough guidelines based on typical applications. Your mileage will vary based on codebase size, test coverage, and custom code complexity. | | Automated code changes | The skill provides guidance and examples, but you implement the changes. It won't automatically refactor your code. | | Gem compatibility resolution | While we note common gem version requirements, resolving complex dependency conflicts requires manual intervention. | | Rails LTS upgrades | While many of the things this Skill can do will work to upgrade Rails LTS, the strategy for those apps will be different and the Rails source code is not the same as the main Rails repository |
We welcome contributions! Here's how you can help:
git checkout -b add-rails-X-Y-guideversion-guides/This project is licensed under the MIT License. See LICENSE for details.
This project is sponsored by:
We build custom AI solutions that integrate with your existing workflows. From Claude Code skills to full AI agent systems.
The Rails upgrade experts. We've been upgrading Rails applications professionally since 2017, helping companies stay current and secure.
Questions? Open an issue or reach out to us at hello@ombulabs.com