Skip to content

ombulabs/claude-code_dual-boot-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Dual Boot Skill

A Claude Code skill that helps you set up and manage dual-boot environments for Ruby and Rails applications using the next_rails gem.

What Does This Skill Do?

The Dual-Boot skill helps you:

  • Set up dual-boot with the next_rails gem so your app runs with two dependency sets depending on one environment variable (ie. BUNDLE_GEMFILE)
  • Write version-dependent code using NextRails.next? (the correct pattern — never respond_to?)
  • Configure CI to test against both dependency sets (GitHub Actions, CircleCI, Jenkins)
  • Clean up dual-boot code after the upgrade is complete

While most commonly used for Rails version upgrades, dual-boot works equally well for upgrading Ruby versions or any core dependency in your Gemfile (e.g., sidekiq, devise, pg).

Why Dual-Boot?

Dual-booting is a core part of the FastRuby.io upgrade methodology:

  • Quickly switch between dependency sets for debugging
  • Run test suites against both versions
  • Deploy backwards-compatible changes to production before the version bump
  • Catch compatibility issues early in CI
  • Allows you to gradually deploy versions of key dependencies (e.g. 10% of the traffic will now use the target version of Rails)

How to Use This Skill

Installation

From inside the Claude Code CLI prompt (recommended):

/plugin marketplace add ombulabs/claude-skills
/plugin install dual-boot@ombulabs-ai

From your terminal:

claude plugin marketplace add https://github.com/ombulabs/claude-skills.git
claude plugin install dual-boot@ombulabs-ai

Manual install:

git clone https://github.com/ombulabs/claude-code_dual-boot-skill.git
cp -r claude-code_dual-boot-skill/dual-boot ~/.claude/skills/

Note

This skill works standalone, but it is part of the full Rails upgrade toolkit. You may also want to install rails-load-defaults and rails-upgrade.

Basic Usage

In Claude Code, navigate to your Rails application directory and use natural language:

"Set up dual boot for my Rails app"
"Help me dual-boot Rails 7.0 and 7.1"
"Dual-boot Ruby 3.1 and 3.2"
"Set up dual boot for upgrading sidekiq"
"Configure dual-boot CI"
"Clean up dual-boot code after upgrade"

Key Principle: Use NextRails.next? (not feature detection)

When writing code that must work with two versions, always use NextRails.next?:

# spec/requests/projects_spec.rb
test_request =
  if NextRails.next?
    ActionController::TestRequest.create
  else
    ActionController::TestRequest.new
  end

Never use respond_to?, defined?, or other feature-detection patterns. They are fragile, hard to clean up, and obscure intent.

Only branch when the old API genuinely breaks on the next version. A plain deprecation warning is not a reason for a conditional — if the new API works on both versions, just use it directly.

Related Skills

Contributing

We welcome contributions! Found incorrect information or have a suggestion? Open an issue.

License

This project is licensed under the MIT License. See LICENSE for details.

Sponsors

OmbuLabs.ai | Custom AI Solutions

OmbuLabs.ai is Philadelphia's AI Software Boutique. We build custom AI solutions that integrate with your existing workflows. From Claude Code skills to full AI agent systems.

FastRuby.io | Ruby Maintenance, Done Right

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

About

A Claude Code skill to dual boot your Ruby application with Bundler and next_rails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors