rails-8-upgrade

rails-8-upgrade is a skill for Claude Code from davidteren/hotwire-codex-skills. It costs 120 tokens per session (887 once invoked), scanned A, original, MIT.

A checklist and procedure for upgrading a Ruby on Rails 7 application to Rails 8. It also checks for a known flaky route-helper test problem that can appear after the upgrade.

In plain words
What is it for?
Use it to audit an app before upgrading, check Ruby and Rails configuration, identify risky dependencies, establish a green baseline, and investigate route-helper test flakes.
Why use it?
It helps separate required version changes from optional work and exposes upgrade risks that may be hidden when tests pass only in serial runs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the hotwire-codex-skills plugin — 8 skills shipped together

Good fit Use it to audit an app before upgrading, check Ruby and Rails configuration, identify risky dependencies, establish a green baseline, and investigate route-helper test flakes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davidteren/hotwire-codex-skills/rails-8-upgrade
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 davidteren/hotwire-codex-skills --skill rails-8-upgrade
Clone the repo
git clone --depth 1 https://github.com/davidteren/hotwire-codex-skills

Made for: Claude Code.

Or install hotwire-codex-skills, the plugin that ships this one along with the rest of its 8 skills.

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 rails-8-upgrade

README.md
[![agentmods](https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/rails-8-upgrade/github.svg)](https://agentmods.dev/skills/davidteren/hotwire-codex-skills/rails-8-upgrade)
Your own site
<a href="https://agentmods.dev/skills/davidteren/hotwire-codex-skills/rails-8-upgrade"><img src="https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/rails-8-upgrade/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 rails-8-upgrade

Your own site · 80×15
<a href="https://agentmods.dev/skills/davidteren/hotwire-codex-skills/rails-8-upgrade"><img src="https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/rails-8-upgrade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 887 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.00120 $0.00887
Opus 5 $0.00060 $0.00443
Sonnet 5 $0.00024 $0.00177
Haiku 4.5 $0.00012 $0.00089

Measured 11d ago against content hash be91bcd553a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

rails-8-upgrade 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/lint_route_test_helper.sh, scripts/upgrade_audit.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/rails-8-upgrade/SKILL.md · 72 lines

How it starts

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

Rails 7 → 8 upgrade

Two things kill time in a 7→8 upgrade: deciding what to bump vs defer, and a flaky route-helper test that Rails 8's LazyRouteSet introduces and that hides behind single green test runs. This skill handles both.

Read references/rails-7-to-8.md for the full checklist and the why.

When to use

  • Bumping rails 7.x → 8.x, or checking whether an app is ready.
  • Tests started flaking after a Rails 8 bump with undefined method 'login_path'/'root_path' in unrelated controllers; serial runs stay green.
  • Reviewing a PR that adds/edits a draw_test_routes-style route helper.

1. Pre-flight audit (read-only)

scripts/upgrade_audit.sh path/to/app

Reports: Ruby/Rails versions (+ flags a Gemfile.lock RUBY VERSION mismatch that makes bundle refuse), config.load_defaults vs Rails major, presence of a new_framework_defaults_*.rb, known-risky gems (notably pagy <6 with custom pagy view helpers — a real porting cost), and whether the test suite uses the flaky route pattern. Changes nothing.

  1. Baseline green on current versions first (a bisectable starting point).
  2. Bump rails ~> 8.x and Ruby; leave config.load_defaults where it is (run new library code with old framework behavior — low risk).
  3. bundle update; only hand-pin where a transitive conflict forces it.
  4. Run the suite ≥6× (parallel flakes hide — see below). Boot the server, check a public (200) and a protected (401/redirect) route.
  5. Flip framework defaults separately later, via config/initializers/new_framework_defaults_8_1.rb, one line at a time.

3. The LazyRouteSet route-test flake (the expensive one)

If the suite appends test-only routes via a helper that toggles Rails.application.routes.disable_clear_and_finalize, Rails 8 makes it flaky under parallel runs. Detect it:

scripts/lint_route_test_helper.sh path/to/app

It checks the helper (a) materializes the LazyRouteSet (reload_routes_unless_loaded) before setting the flag, (b) resets the flag in an ensure, (c) doesn't use the finalize! dead-end, and (d) every draw_test_routes caller has a teardown { reload_routes! }. Exits non-zero on risk and prints the fix.

Read the full file on GitHub · 72 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 72 lines · 120 tokens per session scan A be91bcd553a0

Subscribe to this mod's changes

rails-8-upgrade is a skill published in the GitHub repository davidteren/hotwire-codex-skills (3 stars, last pushed 2mo ago), licensed MIT. It adds 120 tokens to every session and 887 once invoked, about $0.0006 per session on Opus 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-08-31.

Related

Other skills, from other repositories

test-driven-development

Strict red-green-refactor TDD workflow for implementing features, fixing bugs, or changing behavior in Rails applications. Enforces the discipline of writing a failing test before any production code. Use whenever you want to implement with TDD — whether a new feature, a bugfix, a refactor, or any behavior change.

thoughtbot/rails-consultant · 68 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens

ruzzy

Use when asked to set up and run coverage-guided fuzzing of Ruby code or C extensions with Ruzzy, producing crash reports or clean campaign summaries. Not for C/C++ fuzzing: use libfuzzer or libfuzzer.

OutlineDriven/odin-claude-plugin · 51 tokens

litestar-testing

Auto-activate for test.py, conftest.py, litestar.testing, TestClient, AsyncTestClient, createtestclient, createasynctestclient, anyio, Guard mocks, DI overrides, or handler tests. Not for generic pytest.

litestar-org/litestar-skills · 56 tokens

phx-verify

Verify Elixir/Phoenix changes — compile, format, and test in one loop. Use after implementation, before PRs, or after fixing bugs.

oliver-kriska/claude-elixir-phoenix · 36 tokens

swi-prolog-programmer

SWI-Prolog-specific tooling, standards, and idioms. Use when working with SWI-Prolog code. Emphasizes relational thinking, steadfastness, DCGs, constraints, and mandatory testing with PlUnit.

Pyroxin/opinionated-claude-skills · 51 tokens