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.
npx skills add Phaedra-Solutions/cursor-rules --skill upgrade-railsgit clone --depth 1 https://github.com/Phaedra-Solutions/cursor-rulesWrote 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.
[](https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-rails)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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_railsand 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
-
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 -
Dual boot: add
next_rails(1.7) to the development and test groups, runnext_rails --init(adds thenext?helper andGemfile.next), and set the next version conditionally:if next? gem "rails", "~> 7.2.0" else gem "rails", "~> 7.1.0" endThen
next bundle installand add a CI job withBUNDLE_GEMFILE=Gemfile.next. -
Compatibility:
bundle_report compatibility --rails-version=7.2andbundle_report outdated; upgrade blocking gems in the current Gemfile first, where they support both versions. -
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; usenext?branches only as temporary shims. -
Switch: make the next version the default, run
bin/rails app:update, review every config diff (don't accept overwrites blindly), and commit the generatednew_framework_defaults_X_Y.rb. -
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.Yand delete the initializer. -
Release-specific checks (examples): 7.0 Zeitwerk-only autoloading and encrypted cookies changes; 7.1
config.autoload_lib,ActiveRecordencryption 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. -
After each hop: Verify, show the diff and results, wait for approval. Commit only when asked (
git-commitskill). Removenext_railsshims at the end.
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.
- 3d ago First seen · 78 lines · 119 tokens per session scan A 1b07a4e20c27
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.
Other skills, from other repositories
x-api
X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.
nextjs-fullstack
Use for Next.js App Router, React Server Components, server actions, API routes, auth, database integration, caching, deployment, or full-stack product features.
flask
Skill "flask" from rishapgandhi/python-skills, covering flask skill, stack, project structure, app factory and app/init.py.
django
Skill "django" from rishapgandhi/python-skills, covering django skill, stack, project structure, settings pattern (split by environment) and config/settings/base.py.
drf
Skill "drf" from rishapgandhi/python-skills, covering django rest framework (drf) skill, stack additions (on top of django), settings, config/settings/base.py and serializer standards.
fastapi
Skill "fastapi" from rishapgandhi/python-skills, covering fastapi skill, stack, project structure (fastapi-specific additions), app factory pattern and app/main.py.