ombulabs/claude-code_rails-upgrade-skill / rails-upgrade
rails-upgrade
VerifiedAnalyzes 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.
detection-scripts/patterns/rails-70-patterns.expectations.yml
View on GitHub# Fixture expectations for rails-70-patterns.yml.
#
# Keyed by variable_name (matching the entries in rails-70-patterns.yml). For
# each pattern you cover, list:
# match - lines the pattern MUST flag (the real breaking-change shapes)
# no_match - lines it MUST NOT flag (safe code + known false-positive traps)
#
# A line is "flagged" when the entry's `pattern` regex matches it AND the
# entry's `exclude` regex (when present) does not: a per-line grep + grep -v.
#
# Run with:
# bin/test-patterns rails-upgrade/detection-scripts/patterns/rails-70-patterns.yml
#
# The patterns without an entry here predate the expectations tooling. Add
# entries as they are revisited.
OPEN_REDIRECT_PROTECTION:
match:
# dynamic destination straight from user input, the classic open redirect
- " redirect_to params[:return_to]"
- " redirect_back_or_to session[:forward_url]"
# redirecting to the referer, the common replacement for redirect_to :back
- " redirect_to request.referer"
# literal external URL, both quote styles
- " redirect_to \"https://example.com\""
- " redirect_to 'http://example.com/callback'"
# interpolated destination built from a host
- " redirect_to \"#{other_host}/path\""
no_match:
# internal path/url helpers and records are unaffected, must not flag
- " redirect_to root_path"
- " redirect_to @user, notice: \"Saved\""
- " redirect_to edit_post_path(@post)"
# params nested inside a path helper is a safe internal redirect, not the
# dangerous `redirect_to params[...]` shape
- " redirect_to user_path(params[:id])"
# already opted in, the exclude regex must suppress it
- " redirect_to \"https://example.com\", allow_other_host: true"
EXPLICIT_TEMPLATE_EXTENSION:
match:
# the dotted name 6.1 warned about and 7.0 takes literally
- " render template: \"posts/show.html.erb\""
- " render template: 'posts/show.html'"
- " render layout: \"pdf.html\""
# the wicked_pdf shape, template: forwarded straight through
- " render pdf: \"report\", template: \"reports/show.html.erb\", layout: \"pdf.html\""
no_match:
# the fixed form, no extension in the string
- " render template: \"posts/show\""
- " render layout: \"pdf\""
# a bare action render is unaffected
- " render :show"
RUBY_VERSION:
# Rails 7.0 requires Ruby >= 2.7.0 (rails gemspec). Lines come from the
# Gemfile, .ruby-version and .tool-versions.
match:
- "ruby \"2.6.10\""
- "ruby '~> 2.6.3'"
- "ruby '~> 1.9'"
- "2.6.10"
- "ruby-2.5.9"
- "ruby 2.6.10"
no_match:
- "ruby \"2.7.8\""
- "ruby \"~> 2.6\""
- "ruby \">= 2.5.0\""
- "3.0.6"
- "ruby 3.1.4"
- "2.10.0"
- "gem \"rack\", \"2.6.1\""
ACTIVE_STORAGE_VARIANT:
match:
# ImageMagick geometry strings passed to resize:, which libvips rejects
- "<%= image_tag user.avatar.variant(resize: \"100x100>\") %>"
- " @photo.image.variant(resize: \"300x300\", auto_orient: true)"
no_match:
# the image_processing macros work under both processors
- "<%= image_tag user.avatar.variant(resize_to_limit: [100, 100]) %>"
- " @photo.image.variant(resize_to_fill: [300, 300])"
SPRING:
match:
- " gem \"spring\""
- " gem 'spring', '~> 2.1'"
no_match:
# the 7.0 Gemfile template ships it commented out, the exclude drops it
- " # gem \"spring\""
# companion gems are not spring itself
- " gem \"spring-watcher-listen\""
- " gem \"spring-commands-rspec\""
URLSAFE_CSRF_TOKENS:
# Rails 7.0 warns on any assignment of the setting (true or false).
match:
- " config.action_controller.urlsafe_csrf_tokens = false"
- "Rails.application.config.action_controller.urlsafe_csrf_tokens = true"
- " config.action_controller.urlsafe_csrf_tokens=false"
no_match:
- " # Rails.application.config.action_controller.urlsafe_csrf_tokens = true"
- " config.action_controller.allow_forgery_protection = false"
- " if ActionController::Base.urlsafe_csrf_tokens"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 119k | Updated | Claude CodeCodex | Verified | Install |
| 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: 118k | Updated | Claude CodeCodex | Verified | Install |
| 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: 108k | Updated | Claude CodeCodex | Verified | Install |
| 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: 108k | Updated | Claude CodeCodex | Verified | Install |