skill-rails-upgradelisted
Install: claude install-skill aiskillstore/marketplace
## When to Use This Skill
Analyze Rails apps and provide upgrade assessments
Use this skill when working with analyze rails apps and provide upgrade assessments.
# Rails Upgrade Analyzer
Analyze the current Rails application and provide a comprehensive upgrade assessment with selective file merging.
## Step 1: Verify Rails Application
Check that we're in a Rails application by looking for these files:
- `Gemfile` (must exist and contain 'rails')
- `config/application.rb` (Rails application config)
- `config/environment.rb` (Rails environment)
If any of these are missing or don't indicate a Rails app, stop and inform the user this doesn't appear to be a Rails application.
## Step 2: Get Current Rails Version
Extract the current Rails version from:
1. First, check `Gemfile.lock` for the exact installed version (look for `rails (x.y.z)`)
2. If not found, check `Gemfile` for the version constraint
Report the exact current version (e.g., `7.1.3`).
## Step 3: Find Latest Rails Version
Use the GitHub CLI to fetch the latest Rails release:
```bash
gh api repos/rails/rails/releases/latest --jq '.tag_name'
```
This returns the latest stable version tag (e.g., `v8.0.1`). Strip the 'v' prefix for comparison.
Also check recent tags to understand the release landscape:
```bash
gh api repos/rails/rails/tags --jq '.[0:10] | .[].name'
```
## Step 4: Determine Upgrade Type
Compare current and latest versions to classify the upgrade:
- **Patch upgrade**: Same major.minor, diff