upgrade-rails

upgrade-rails is a skill for Claude Code, Codex from Phaedra-Solutions/cursor-rules. It costs 119 tokens per session (1,287 once invoked), scanned A, original, MIT.

A guided process for upgrading a Rails application, a Ruby web framework, one minor release at a time while checking its gems and framework defaults.

In plain words
What is it for?
Use it to test the next Rails version alongside the current one, update gems and application defaults, track warnings, and verify the test suite.
Why use it?
It makes breaking changes and deprecations visible without combining unrelated Ruby and Rails upgrades in one change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to test the next Rails version alongside the current one, update gems and application defaults, track warnings, and verify the test suite.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/phaedra-solutions/cursor-rules/upgrade-rails
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Phaedra-Solutions/cursor-rules --skill upgrade-rails
Clone the repo
git clone --depth 1 https://github.com/Phaedra-Solutions/cursor-rules

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upgrade-rails

README.md
[![agentmods](https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-rails/github.svg)](https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-rails)
Your own site
<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-rails"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-rails/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upgrade-rails

Your own site · 80×15
<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-rails"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-rails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,287 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00119 $0.01287
Opus 5.5 $0.00048 $0.00515
Sonnet 5.5 $0.00024 $0.00257
Haiku 4.5 $0.00012 $0.00129

Measured 3d ago against content hash 1b07a4e20c27, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

upgrade-rails scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/upgrade-rails/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Upgrade Rails

When to use

  • The app runs Rails 8.0 or older (8.0 security support ends 7 Nov 2026; 7.2 and older are EOL; see legacy/rails-legacy).
  • A security fix exists only in a supported release (8.1).

For a patch release within the same minor, update the gem and run Verify.

Before you start

  • Read Rails, Ruby and gems with their own Rails ranges (Devise, Sidekiq, Pundit/CanCanCan, Paperclip/Shrine, Ransack, RSpec Rails, Webpacker/jsbundling) from Gemfile.lock.
  • Ruby per target: Rails 8.0 and 8.1 need Ruby 3.2+ (3.2 is EOL; aim for 3.4 or 4.0). Upgrade Ruby as its own step, before or after a Rails hop, never in the same change.
  • Working tree clean; new branch (chore/rails-7.2); test suite green (record failures); CI can run a second Gemfile.
  • Ask the user:
    • target (default 8.1);
    • whether to stop after each minor for review;
    • whether installing next_rails and gem updates is approved (core/supply-chain).
  • Plan the hops: every minor in order (6.1 → 7.0 → 7.1 → 7.2 → 8.0 → 8.1). From 5.x or older, go through each minor as well.

Steps

  1. Baseline: patch the current minor to its last release, then save deprecation warnings:

    bundle exec rspec                         # or: bin/rails test
    DEPRECATION_TRACKER=save bundle exec rspec
    
  2. Dual boot: add next_rails (1.7) to the development and test groups, run next_rails --init (adds the next? helper and Gemfile.next), and set the next version conditionally:

    if next?
      gem "rails", "~> 7.2.0"
    else
      gem "rails", "~> 7.1.0"
    end
    

    Then next bundle install and add a CI job with BUNDLE_GEMFILE=Gemfile.next.

  3. Compatibility: bundle_report compatibility --rails-version=7.2 and bundle_report outdated; upgrade blocking gems in the current Gemfile first, where they support both versions.

  4. Fix until green on both: run the suite with next bundle exec rspec; fix deprecations and breaking changes from the upgrade guide for that version; use next? branches only as temporary shims.

  5. Switch: make the next version the default, run bin/rails app:update, review every config diff (don't accept overwrites blindly), and commit the generated new_framework_defaults_X_Y.rb.

  6. Framework defaults: enable the new defaults one at a time (with a deploy between risky ones like cookie or cache formats), then set config.load_defaults X.Y and delete the initializer.

  7. Release-specific checks (examples): 7.0 Zeitwerk-only autoloading and encrypted cookies changes; 7.1 config.autoload_lib, ActiveRecord encryption defaults; 7.2 Ruby 3.1+, YJIT on by default, browser-version guard and dev container generator; 8.0 Solid Queue/Cache/Cable defaults (opt-in for existing apps), Propshaft for new apps, Kamal 2; 8.1 the guide's removals.

  8. After each hop: Verify, show the diff and results, wait for approval. Commit only when asked (git-commit skill). Remove next_rails shims at the end.

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 78 lines · 119 tokens per session scan A 1b07a4e20c27

Subscribe to this mod's changes

upgrade-rails is a skill published in the GitHub repository Phaedra-Solutions/cursor-rules (4 stars, last pushed 2d ago), licensed MIT. It adds 119 tokens to every session and 1,287 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-01.