Skip to content

ombulabs/claude-code_rails-upgrade-skill / rails-upgrade

rails-upgrade

Verified

Analyzes Rails applications and generates comprehensive upgrade reports with breaking changes, deprecations, and step-by-step migration guides for Rails 2.3 through 8.1. Use when upgrading Rails applications, planning multi-hop upgrades, querying version-specific changes, or answering what stands between the app and the next Rails version. Based on FastRuby.io methodology and "The Complete Guide to Upgrade Rails" ebook.

FileKindSize
SKILL.mdskill md11.0 KB
detection-scripts/gem_limits.rbscript6.0 KB
detection-scripts/hop.rbscript2.2 KB
detection-scripts/patterns/rails-40-patterns.expectations.ymlconfig43.8 KB
detection-scripts/patterns/rails-40-patterns.ymlconfig96.5 KB
detection-scripts/patterns/rails-41-patterns.expectations.ymlconfig25.6 KB
detection-scripts/patterns/rails-41-patterns.ymlconfig59.8 KB
detection-scripts/patterns/rails-42-patterns.expectations.ymlconfig27.5 KB
detection-scripts/patterns/rails-42-patterns.ymlconfig48.7 KB
detection-scripts/patterns/rails-50-patterns.expectations.ymlconfig1.9 KB
detection-scripts/patterns/rails-50-patterns.ymlconfig8.1 KB
detection-scripts/patterns/rails-51-patterns.expectations.ymlconfig4.2 KB
detection-scripts/patterns/rails-51-patterns.ymlconfig15.0 KB
detection-scripts/patterns/rails-52-patterns.expectations.ymlconfig5.0 KB
detection-scripts/patterns/rails-52-patterns.ymlconfig14.7 KB
detection-scripts/patterns/rails-60-patterns.expectations.ymlconfig1007 B
detection-scripts/patterns/rails-60-patterns.ymlconfig14.2 KB
detection-scripts/patterns/rails-70-patterns.expectations.ymlconfig4.0 KB
detection-scripts/patterns/rails-70-patterns.ymlconfig11.2 KB
detection-scripts/patterns/rails-71-patterns.expectations.ymlconfig3.1 KB
detection-scripts/patterns/rails-71-patterns.ymlconfig9.5 KB
detection-scripts/patterns/rails-72-patterns.expectations.ymlconfig1.2 KB
detection-scripts/patterns/rails-72-patterns.ymlconfig6.1 KB
detection-scripts/patterns/rails-80-patterns.expectations.ymlconfig6.6 KB
detection-scripts/patterns/rails-80-patterns.ymlconfig21.2 KB
detection-scripts/patterns/rails-81-patterns.expectations.ymlconfig4.3 KB
detection-scripts/patterns/rails-81-patterns.ymlconfig13.2 KB
detection-scripts/scan_patterns.rbscript42.8 KB
examples/multi-hop-upgrade.mdmarkdown18.9 KB
examples/simple-upgrade.mdmarkdown4.0 KB
references/breaking-changes-by-version-reference.mdmarkdown3.9 KB
references/deprecation-warnings-reference.mdmarkdown10.7 KB
references/gem-compatibility-reference.mdmarkdown8.2 KB
references/js-compressor-sprockets-mismatch-reference.mdmarkdown4.7 KB
references/multi-hop-strategy-reference.mdmarkdown8.8 KB
references/next-hop-readiness-reference.mdmarkdown2.1 KB
references/no-test-suite-smoke-reference.mdmarkdown4.7 KB
references/request-patterns-reference.mdmarkdown3.7 KB
references/sequential-strategy-reference.mdmarkdown2.1 KB
references/staying-current-reference.mdmarkdown7.8 KB
references/testing-checklist-reference.mdmarkdown6.3 KB
templates/app-update-preview-template.mdmarkdown4.3 KB
templates/upgrade-report-template.mdmarkdown10.2 KB
version-guides/upgrade-3.2-to-4.0.mdmarkdown68.0 KB
version-guides/upgrade-4.0-to-4.1.mdmarkdown66.7 KB
version-guides/upgrade-4.1-to-4.2.mdmarkdown60.7 KB
version-guides/upgrade-4.2-to-5.0.mdmarkdown9.7 KB
version-guides/upgrade-5.0-to-5.1.mdmarkdown19.1 KB
version-guides/upgrade-5.1-to-5.2.mdmarkdown17.7 KB
version-guides/upgrade-5.2-to-6.0.mdmarkdown6.4 KB
version-guides/upgrade-6.0-to-6.1.mdmarkdown6.8 KB
version-guides/upgrade-6.1-to-7.0.mdmarkdown14.7 KB
version-guides/upgrade-7.0-to-7.1.mdmarkdown13.2 KB
version-guides/upgrade-7.1-to-7.2.mdmarkdown11.2 KB
version-guides/upgrade-7.2-to-8.0.mdmarkdown23.1 KB
version-guides/upgrade-8.0-to-8.1.mdmarkdown14.0 KB
workflows/00-verify-latest-patch-workflow.mdmarkdown1.7 KB
workflows/01-run-test-suite-workflow.mdmarkdown12.7 KB
workflows/02-resolve-deprecation-warnings-workflow.mdmarkdown6.3 KB
workflows/03-validate-upgrade-path-workflow.mdmarkdown1.8 KB
workflows/04-setup-next-rails-workflow.mdmarkdown1.5 KB
workflows/05-detect-breaking-changes-workflow.mdmarkdown20.0 KB
workflows/06-check-gem-compatibility-workflow.mdmarkdown11.1 KB
workflows/07-boot-smoke-test-workflow.mdmarkdown7.3 KB
workflows/08-generate-upgrade-report-workflow.mdmarkdown12.7 KB
workflows/09-generate-app-update-preview-workflow.mdmarkdown7.3 KB
workflows/10-implement-and-upgrade-workflow.mdmarkdown2.5 KB
workflows/11-sync-ci-workflow.mdmarkdown8.6 KB
workflows/12-align-load-defaults-workflow.mdmarkdown952 B
workflows/13-mention-cleanup-workflow.mdmarkdown1.3 KB

workflows/02-resolve-deprecation-warnings-workflow.md

View on GitHub
# Workflow 02: Resolve Deprecation Warnings

**Purpose:** Make deprecation warnings visible, collect the ones the current Rails version emits, and fix them on the current version before any dual-boot or version bump. Deprecation warnings are the roadmap of the next hop: what warns on X is what breaks on X+1. Fixing them on X, with the suite green on X, is the cheapest point in the campaign to do it, and it keeps the later diff (Workflow 10) about the version bump only.

**When to use:** After Workflow 01 has a green baseline on the latest patch of the current series. Before dual-boot setup (Workflow 04), so no `NextRails.next?` branching is needed: every fix here is an unconditional replacement that the current version already accepts.

## Inputs

- Green test baseline from Workflow 01, plus the result of its Step 2 sweep for deprecation-behavior overrides
- `references/deprecation-warnings-reference.md` (how to find, read and fix warnings, per Rails version)

## Outputs

- Deprecation inventory: every distinct warning the suite emitted on the current version, with count, first location and status (fixed / deferred with reason)
- Fixes applied on the current version, suite green after them
- The inventory is handed to Workflow 08: fixed entries go in the report's baseline; entries deferred to the bump (setter removed on the target) go in the fix-before-bump bucket; entries deferred to a later hop or owned by a gem stay in the report's inventory table with that status

## Gates (must be true before the next workflow that runs)

- Deprecation warnings are visible in the test environment (no `:silence`, no `report_deprecations = false`, no override hiding them)
- Every warning emitted by the current Rails version about an API that changes at the target version is either fixed or deferred with a written reason in the inventory
- Test suite still passes (0 failures) after the fixes

## Pre-upgrade checklist (FastRuby.io best practices, recommended before starting any upgrade)

**Deprecation Warnings**
- [ ] Run app with Rails deprecations turned on (configured in config/environment files)
- [ ] Address existing deprecation warnings
- [ ] Enable verbose deprecations in test environment

## Step 1: Make sure deprecation warnings are not silenced

Read the Workflow 01 Step 2 sweep result. If anything silences or hides deprecations in the test environment (`config.active_support.deprecation = :silence`, `config.active_support.report_deprecations = false`, an `ActiveSupport::Deprecation.silence` block around suite setup, `config.active_support.disallowed_deprecation = :silence`), change the test environment so warnings reach the output:

```ruby
# config/environments/test.rb
config.active_support.deprecation = :stderr   # or :log if the team reads log/test.log; :raise is stricter
```

Prefer the least invasive change that makes warnings visible. `references/deprecation-warnings-reference.md` recommends `:raise` as the steady state for development and test; for this collection step use `:stderr` (or `:log`) so one suite run lists every warning, because under `:raise` each warning becomes a test failure and an initializer-time warning aborts the run before anything else is seen. Switch to `:raise` after Step 4 if the team wants it. The behavior table and per-version forms are in the reference, section "Deprecation Configuration Options".

## Step 2: Run the suite and collect the warnings

Run the full suite once with output captured, then extract the distinct warnings:

```bash
bundle exec rails test 2>&1 | tee tmp/deprecations.log      # or: bundle exec rspec 2>&1 | tee tmp/deprecations.log
grep -h "DEPRECATION WARNING" tmp/deprecations.log | sed 's/^.*DEPRECATION WARNING: //' | sort | uniq -c | sort -rn
```

Record each distinct warning with its count and the first file:line the message names. For apps that will keep a running inventory across the campaign, `next_rails` ships `DeprecationTracker`; the dual-boot skill's `references/deprecation-tracking.md` shows the RSpec and Minitest setup. Optional here, useful from Workflow 04 on.

Also boot the app once outside the suite, in the environment Step 1 just made visible: `RAILS_ENV=test bin/rails runner 'puts Rails.version' 2>&1 | grep -i deprecat`. Initializer-time warnings do not always appear in test output, and the development environment logs them to `log/development.log` instead of the terminal.

## Step 3: Triage each warning

Keep two piles:

- **Fix now:** warnings emitted by the current Rails version about behavior or APIs that change at the target version. These are the reason this workflow exists.
- **Defer:** warnings about behavior scheduled to change two or more versions out, or warnings that come from a gem rather than the app (those are Workflow 06's concern, note the gem). Write the reason next to each deferred entry.

The version guide for this hop (`version-guides/upgrade-{FROM}-to-{TO}.md`) says what each warning becomes at the target version; `references/deprecation-warnings-reference.md`, section "Common Deprecation Patterns by Rails Version", has the usual fixes.

## Step 4: Fix the "fix now" pile on the current version

Apply each fix as an unconditional replacement: the current version already accepts the new form, that is what the warning says. No `NextRails.next?` branch, no dual-boot yet. One exception: when the fix is a config setter that the target version removes (Rails 7.0's `legacy_connection_handling = false` raises on 7.1 boot), defer it to Workflow 10, where it goes in as the bump lands, and note it in the inventory. One commit per warning type keeps the review readable. Re-run the affected tests after each fix and the full suite at the end.

## Step 5: Record the inventory

Write the inventory (fixed / deferred, counts, locations) where Workflow 08 will find it, for example `tmp/deprecation-inventory.md` or the notes location the user prefers. Workflow 08 lists fixed entries in the baseline, the ones deferred to the bump in the fix-before-bump bucket, and the rest in the inventory table with their status.

## Self-review checklist

- [ ] Test environment shows deprecation warnings (verified after Step 1, not assumed)
- [ ] Suite run captured; distinct warnings listed with counts
- [ ] Each warning is marked fixed or deferred with a reason
- [ ] Fixes are unconditional replacements, no version branching
- [ ] Suite green after the fixes
- [ ] Inventory saved for the report
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall