rails-load-defaultslisted
Install: claude install-skill ombulabs/claude-code_rails-load-defaults-skill
# Rails load_defaults Upgrade Skill
This skill guides the incremental upgrade of `config.load_defaults` in a Rails
application. The process walks through each config introduced in a new Rails
version, one at a time, so the user can test each change in isolation.
## Overview
When a Rails app has a `load_defaults` version lower than its Rails version,
there are framework default configs that need to be adopted. This skill:
1. Detects the current `load_defaults` version
2. Determines the next target version
3. Generates the `new_framework_defaults_X_Y.rb` initializer with all configs commented
4. Walks through each config one by one, analyzing the codebase to recommend values
5. Waits for the user to test/commit each change before moving to the next
6. Consolidates into `config/application.rb` when all configs are done
## Step 1: Detect Current State
Read `config/application.rb` and look for:
```ruby
config.load_defaults X.Y
```
Also check if a `config/initializers/new_framework_defaults_*.rb` file already
exists (the user may be mid-upgrade).
Report to the user:
- Current `load_defaults` version
- Current Rails version (from Gemfile.lock)
- Which version transitions are needed (e.g., 6.1 → 7.0 → 7.1 → 7.2)
## Step 2: Load Version Config Reference
Read the appropriate config reference file for the target version:
- **5.0**: `configs/5_0.yml`
- **5.1**: `configs/5_1.yml`
- **5.2**: `configs/5_2.yml`
- **6.0**: `configs/6_0.yml`
- **6.1**: `configs/6_1.yml`
- **7.0**: `