[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73BQM4MBQPNNPMTZ6A00TKG":3,"skill-same:01M73BQM4MBQPNNPMTZ6A00TKG":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M73BQM4MBQPNNPMTZ6A00TKG","skill-rails-upgrade",null,"Analyze Rails apps and provide upgrade assessments","kalash33\u002Fkstack","kalash33","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F90259149?v=4","01M7365X8Q0B73NYHA730SMZWN","Kalash Poddar","01M7365X9D0JK47C3Q0YCCK9Z2",0,"MIT","https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack\u002Fblob\u002Fmain\u002Fskills\u002Fskill-rails-upgrade\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: skill-rails-upgrade\ndescription: \"Analyze Rails apps and provide upgrade assessments\"\nrisk: safe\nsource: \"https:\u002F\u002Fgithub.com\u002Frobzolkos\u002Fskill-rails-upgrade\"\ndate_added: \"2026-02-27\"\n---\n\n## When to Use This Skill\n\nAnalyze Rails apps and provide upgrade assessments\n\nUse this skill when working with analyze rails apps and provide upgrade assessments.\n# Rails Upgrade Analyzer\n\nAnalyze the current Rails application and provide a comprehensive upgrade assessment with selective file merging.\n\n## Step 1: Verify Rails Application\n\nCheck that we're in a Rails application by looking for these files:\n- `Gemfile` (must exist and contain 'rails')\n- `config\u002Fapplication.rb` (Rails application config)\n- `config\u002Fenvironment.rb` (Rails environment)\n\nIf 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.\n\n## Step 2: Get Current Rails Version\n\nExtract the current Rails version from:\n1. First, check `Gemfile.lock` for the exact installed version (look for `rails (x.y.z)`)\n2. If not found, check `Gemfile` for the version constraint\n\nReport the exact current version (e.g., `7.1.3`).\n\n## Step 3: Find Latest Rails Version\n\nUse the GitHub CLI to fetch the latest Rails release:\n\n```bash\ngh api repos\u002Frails\u002Frails\u002Freleases\u002Flatest --jq '.tag_name'\n```\n\nThis returns the latest stable version tag (e.g., `v8.0.1`). Strip the 'v' prefix for comparison.\n\nAlso check recent tags to understand the release landscape:\n\n```bash\ngh api repos\u002Frails\u002Frails\u002Ftags --jq '.[0:10] | .[].name'\n```\n\n## Step 4: Determine Upgrade Type\n\nCompare current and latest versions to classify the upgrade:\n\n- **Patch upgrade**: Same major.minor, different patch (e.g., 7.1.3 → 7.1.5)\n- **Minor upgrade**: Same major, different minor (e.g., 7.1.3 → 7.2.0)\n- **Major upgrade**: Different major version (e.g., 7.1.3 → 8.0.0)\n\n## Step 5: Fetch Upgrade Guide\n\nUse WebFetch to get the official Rails upgrade guide:\n\nURL: `https:\u002F\u002Fguides.rubyonrails.org\u002Fupgrading_ruby_on_rails.html`\n\nLook for sections relevant to the version jump. The guide is organized by target version with sections like:\n- \"Upgrading from Rails X.Y to Rails X.Z\"\n- Breaking changes\n- Deprecation warnings\n- Configuration changes\n- Required migrations\n\nExtract and summarize the relevant sections for the user's specific upgrade path.\n\n## Step 6: Fetch Rails Diff\n\nUse WebFetch to get the diff between versions from railsdiff.org:\n\nURL: `https:\u002F\u002Frailsdiff.org\u002F{current_version}\u002F{target_version}`\n\nFor example: `https:\u002F\u002Frailsdiff.org\u002F7.1.3\u002F8.0.0`\n\nThis shows:\n- Changes to default configuration files\n- New files that need to be added\n- Modified initializers\n- Updated dependencies\n- Changes to bin\u002F scripts\n\nSummarize the key file changes.\n\n## Step 7: Check JavaScript Dependencies\n\nRails applications often include JavaScript packages that should be updated alongside Rails. Check for and report on these dependencies.\n\n### 7.1: Identify JS Package Manager\n\nCheck which package manager the app uses:\n\n```bash\n# Check for package.json (npm\u002Fyarn)\nls package.json 2>\u002Fdev\u002Fnull\n\n# Check for importmap (Rails 7+)\nls config\u002Fimportmap.rb 2>\u002Fdev\u002Fnull\n```\n\n### 7.2: Check Rails-Related JS Packages\n\nIf `package.json` exists, check for these Rails-related packages:\n\n```bash\n# Extract current versions of Rails-related packages\ncat package.json | grep -E '\"@hotwired\u002F|\"@rails\u002F|\"stimulus\"|\"turbo-rails\"' || echo \"No Rails JS packages found\"\n```\n\n**Key packages to check:**\n\n| Package | Purpose | Version Alignment |\n|---------|---------|-------------------|\n| `@hotwired\u002Fturbo-rails` | Turbo Drive\u002FFrames\u002FStreams | Should match Rails version era |\n| `@hotwired\u002Fstimulus` | Stimulus JS framework | Generally stable across Rails versions |\n| `@rails\u002Factioncable` | WebSocket support | Should match Rails version |\n| `@rails\u002Factivestorage` | Direct uploads | Should match Rails version |\n| `@rails\u002Factiontext` | Rich text editing | Should match Rails version |\n| `@rails\u002Frequest.js` | Rails UJS replacement | Should match Rails version era |\n\n### 7.3: Check for Updates\n\nFor npm\u002Fyarn projects, check for available updates:\n\n```bash\n# Using npm\nnpm outdated @hotwired\u002Fturbo-rails @hotwired\u002Fstimulus @rails\u002Factioncable @rails\u002Factivestorage 2>\u002Fdev\u002Fnull\n\n# Or check latest versions directly\nnpm view @hotwired\u002Fturbo-rails version 2>\u002Fdev\u002Fnull\nnpm view @rails\u002Factioncable version 2>\u002Fdev\u002Fnull\n```\n\n### 7.4: Check Importmap Pins (if applicable)\n\nIf the app uses importmap-rails, check `config\u002Fimportmap.rb` for pinned versions:\n\n```bash\ncat config\u002Fimportmap.rb | grep -E 'pin.*turbo|pin.*stimulus|pin.*@rails' || echo \"No importmap pins found\"\n```\n\nTo update importmap pins:\n```bash\nbin\u002Fimportmap pin @hotwired\u002Fturbo-rails\nbin\u002Fimportmap pin @hotwired\u002Fstimulus\n```\n\n### 7.5: JS Dependency Summary\n\nInclude in the upgrade summary:\n\n```\n### JavaScript Dependencies\n\n**Package Manager**: [npm\u002Fyarn\u002Fimportmap\u002Fnone]\n\n| Package | Current | Latest | Action |\n|---------|---------|--------|--------|\n| @hotwired\u002Fturbo-rails | 8.0.4 | 8.0.12 | Update recommended |\n| @rails\u002Factioncable | 7.1.0 | 8.0.0 | Update with Rails |\n| ... | ... | ... | ... |\n\n**Recommended JS Updates:**\n- Run `npm update @hotwired\u002Fturbo-rails` (or yarn equivalent)\n- Run `npm update @rails\u002Factioncable @rails\u002Factivestorage` to match Rails version\n```\n\n---\n\n## Step 8: Generate Upgrade Summary\n\nProvide a comprehensive summary including all findings from Steps 1-7:\n\n### Version Information\n- Current version: X.Y.Z\n- Latest version: A.B.C\n- Upgrade type: [Patch\u002FMinor\u002FMajor]\n\n### Upgrade Complexity Assessment\n\nRate the upgrade as **Small**, **Medium**, or **Large** based on:\n\n| Factor | Small | Medium | Large |\n|--------|-------|--------|-------|\n| Version jump | Patch only | Minor version | Major version |\n| Breaking changes | None | Few, well-documented | Many, significant |\n| Config changes | Minimal | Moderate | Extensive |\n| Deprecations | None active | Some to address | Many requiring refactoring |\n| Dependencies | Compatible | Some updates needed | Major dependency updates |\n\n### Key Changes to Address\n\nList the most important changes the user needs to handle:\n1. Configuration file updates\n2. Deprecated methods\u002Ffeatures to update\n3. New required dependencies\n4. Database migrations needed\n5. Breaking API changes\n\n### Recommended Upgrade Steps\n\n1. Update test suite and ensure passing\n2. Review deprecation warnings in current version\n3. Update Gemfile with new Rails version\n4. Run `bundle update rails`\n5. Update JavaScript dependencies (see JS Dependencies section)\n6. **DO NOT run `rails app:update` directly** - use the selective merge process below\n7. Run database migrations\n8. Run test suite\n9. Review and update deprecated code\n\n### Resources\n\n- Rails Upgrade Guide: https:\u002F\u002Fguides.rubyonrails.org\u002Fupgrading_ruby_on_rails.html\n- Rails Diff: https:\u002F\u002Frailsdiff.org\u002F{current}\u002F{target}\n- Release Notes: https:\u002F\u002Fgithub.com\u002Frails\u002Frails\u002Freleases\u002Ftag\u002Fv{target}\n\n---\n\n\n## When to Use This Skill\n\nAnalyze Rails apps and provide upgrade assessments\n\nUse this skill when working with analyze rails apps and provide upgrade assessments.\n## Step 9: Selective File Update (replaces `rails app:update`)\n\n**IMPORTANT:** Do NOT run `rails app:update` as it overwrites files without considering local customizations. Instead, follow this selective merge process:\n\n### 9.1: Detect Local Customizations\n\nBefore any upgrade, identify files with local customizations:\n\n```bash\n# Check for uncommitted changes\ngit status\n\n# List config files that differ from a fresh Rails app\n# These are the files we need to be careful with\ngit diff HEAD --name-only -- config\u002F bin\u002F public\u002F\n```\n\nCreate a mental list of files in these categories:\n- **Custom config files**: Files with project-specific settings (i18n, mailer, etc.)\n- **Modified bin scripts**: Scripts with custom behavior (bin\u002Fdev with foreman, etc.)\n- **Standard files**: Files that haven't been customized\n\n### 9.2: Analyze Required Changes from Railsdiff\n\nBased on the railsdiff output from Step 6, categorize each changed file:\n\n| Category | Action | Example |\n|----------|--------|---------|\n| **New files** | Create directly | `config\u002Finitializers\u002Fnew_framework_defaults_X_Y.rb` |\n| **Unchanged locally** | Safe to overwrite | `public\u002F404.html` (if not customized) |\n| **Customized locally** | Manual merge needed | `config\u002Fapplication.rb`, `bin\u002Fdev` |\n| **Comment-only changes** | Usually skip | Minor comment updates in config files |\n\n### 9.3: Create Upgrade Plan\n\nPresent the user with a clear upgrade plan:\n\n```\n## Upgrade Plan: Rails X.Y.Z → A.B.C\n\n### New Files (will be created):\n- config\u002Finitializers\u002Fnew_framework_defaults_A_B.rb\n- bin\u002Fci (new CI script)\n\n### Safe to Update (no local customizations):\n- public\u002F400.html\n- public\u002F404.html\n- public\u002F500.html\n\n### Needs Manual Merge (local customizations detected):\n- config\u002Fapplication.rb\n  └─ Local: i18n configuration\n  └─ Rails: [describe new Rails changes if any]\n\n- config\u002Fenvironments\u002Fdevelopment.rb\n  └─ Local: letter_opener mailer config\n  └─ Rails: [describe new Rails changes]\n\n- bin\u002Fdev\n  └─ Local: foreman + Procfile.dev setup\n  └─ Rails: changed to simple ruby script\n\n### Skip (comment-only or irrelevant changes):\n- config\u002Fpuma.rb (only comment changes)\n```\n\n### 9.4: Execute Upgrade Plan\n\nAfter user confirms the plan:\n\n#### For New Files:\nCreate them directly using the content from railsdiff or by extracting from a fresh Rails app:\n\n```bash\n# Generate a temporary fresh Rails app to extract new files\ncd \u002Ftmp && rails new rails_template --skip-git --skip-bundle\n# Then copy needed files\n```\n\nOr use the Rails generator for specific files:\n```bash\nbin\u002Frails app:update:configs  # Only updates config files, still interactive\n```\n\n#### For Safe Updates:\nOverwrite these files as they have no local customizations.\n\n#### For Manual Merges:\nFor each file needing merge, show the user:\n\n1. **Current local version** (their customizations)\n2. **New Rails default** (from railsdiff)\n3. **Suggested merged version** that:\n   - Keeps all local customizations\n   - Adds only essential new Rails functionality\n   - Removes deprecated settings\n\nExample merge for `config\u002Fapplication.rb`:\n```ruby\n# KEEP local customizations:\nconfig.i18n.available_locales = [:de, :en]\nconfig.i18n.default_locale = :de\nconfig.i18n.fallbacks = [:en]\n\n# ADD new Rails 8.1 settings if needed:\n# (usually none required - new defaults come via new_framework_defaults file)\n```\n\n### 9.5: Handle Active Storage Migrations\n\nAfter file updates, run any new migrations:\n\n```bash\nbin\u002Frails db:migrate\n```\n\nCheck for new migrations that were added:\n```bash\nls -la db\u002Fmigrate\u002F | tail -10\n```\n\n### 9.6: Verify Upgrade\n\nAfter completing the merge:\n\n1. Start the Rails server and check for errors:\n   ```bash\n   bin\u002Fdev  # or bin\u002Frails server\n   ```\n\n2. Check the Rails console:\n   ```bash\n   bin\u002Frails console\n   ```\n\n3. Run the test suite:\n   ```bash\n   bin\u002Frails test\n   ```\n\n4. Review deprecation warnings in logs\n\n---\n\n## Step 10: Finalize Framework Defaults\n\nAfter verifying the app works:\n\n1. Review `config\u002Finitializers\u002Fnew_framework_defaults_X_Y.rb`\n2. Enable each new default one by one, testing after each\n3. Once all defaults are enabled and tested, update `config\u002Fapplication.rb`:\n   ```ruby\n   config.load_defaults X.Y  # Update to new version\n   ```\n4. Delete the `new_framework_defaults_X_Y.rb` file\n\n---\n\n\n## When to Use This Skill\n\nAnalyze Rails apps and provide upgrade assessments\n\nUse this skill when working with analyze rails apps and provide upgrade assessments.\n## Error Handling\n\n- If `gh` CLI is not authenticated, instruct the user to run `gh auth login`\n- If railsdiff.org doesn't have the exact versions, try with major.minor.0 versions\n- If the app is already on the latest version, congratulate the user and note any upcoming releases\n- If local customizations would be lost, ALWAYS stop and show the user what would be overwritten before proceeding\n\n## Key Principles\n\n1. **Never overwrite without checking** - Always check for local customizations first\n2. **Preserve user intent** - Local customizations exist for a reason\n3. **Minimal changes** - Only add what's necessary for the new Rails version\n4. **Transparency** - Show the user exactly what will change before doing it\n5. **Reversibility** - User should be able to `git checkout` to restore if needed\n","## When to Use This Skill\n\nAnalyze Rails apps and provide upgrade assessments\n\nUse this skill when working with analyze rails apps and provide upgrade assessments.\n# Rails Upgrade Analyzer\n\nAnalyze the current Rails application and provide a comprehensive upgrade assessment with selective file merging.\n\n## Step 1: Verify Rails Application\n\nCheck that we're in a Rails application by looking for these files:\n- `Gemfile` (must exist and contain 'rails')\n- `config\u002Fapplication.rb` (Rails application config)\n- `config\u002Fenvironment.rb` (Rails environment)\n\nIf 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.\n\n## Step 2: Get Current Rails Version\n\nExtract the current Rails version from:\n1. First, check `Gemfile.lock` for the exact installed version (look for `rails (x.y.z)`)\n2. If not found, check `Gemfile` for the version constraint\n\nReport the exact current version (e.g., `7.1.3`).\n\n## Step 3: Find Latest Rails Version\n\nUse the GitHub CLI to fetch the latest Rails release:\n\n```bash\ngh api repos\u002Frails\u002Frails\u002Freleases\u002Flatest --jq '.tag_name'\n```\n\nThis returns the latest stable version tag (e.g., `v8.0.1`). Strip the 'v' prefix for comparison.\n\nAlso check recent tags to understand the release landscape:\n\n```bash\ngh api repos\u002Frails\u002Frails\u002Ftags --jq '.[0:10] | .[].name'\n```\n\n## Step 4: Determine Upgrade Type\n\nCompare current and latest versions to classify the upgrade:\n\n- **Patch upgrade**: Same major.minor, different patch (e.g., 7.1.3 → 7.1.5)\n- **Minor upgrade**: Same major, different minor (e.g., 7.1.3 → 7.2.0)\n- **Major upgrade**: Different major version (e.g., 7.1.3 → 8.0.0)\n\n## Step 5: Fetch Upgrade Guide\n\nUse WebFetch to get the official Rails upgrade guide:\n\nURL: `https:\u002F\u002Fguides.rubyonrails.org\u002Fupgrading_ruby_on_rails.html`\n\nLook for sections relevant to the version jump. The guide is organized by target version with sections like:\n- \"Upgrading from Rails X.Y to Rails X.Z\"\n- Breaking changes\n- Deprecation warnings\n- Configuration changes\n- Required migrations\n\nExtract and summarize the relevant sections for the user's specific upgrade path.\n\n## Step 6: Fetch Rails Diff\n\nUse WebFetch to get the diff between versions from railsdiff.org:\n\nURL: `https:\u002F\u002Frailsdiff.org\u002F{current_version}\u002F{target_version}`\n\nFor example: `https:\u002F\u002Frailsdiff.org\u002F7.1.3\u002F8.0.0`\n\nThis shows:\n- Changes to default configuration files\n- New files that need to be added\n- Modified initializers\n- Updated dependencies\n- Changes to bin\u002F scripts\n\nSummarize the key file changes.\n\n## Step 7: Check JavaScript Dependencies\n\nRails applications often include JavaScript packages that should be updated alongside Rails. Check for and report on these dependencies.\n\n### 7.1: Identify JS Package Manager\n\nCheck which package manager the app uses:\n\n```bash\n# Check for package.json (npm\u002Fyarn)\nls package.json 2>\u002Fdev\u002Fnull\n\n# Check for importmap (Rails 7+)\nls config\u002Fimportmap.rb 2>\u002Fdev\u002Fnull\n```\n\n### 7.2: Check Rails-Related JS Packages\n\nIf `package.json` exists, check for these Rails-related packages:\n\n```bash\n# Extract current versions of Rails-related packages\ncat package.json | grep -E '\"@hotwired\u002F|\"@rails\u002F|\"stimulus\"|\"turbo-rails\"' || echo \"No Rails JS packages found\"\n```\n\n**Key packages to check:**\n\n| Package | Purpose | Version Alignment |\n|---------|---------|-------------------|\n| `@hotwired\u002Fturbo-rails` | Turbo Drive\u002FFrames\u002FStreams | Should match Rails version era |\n| `@hotwired\u002Fstimulus` | Stimulus JS framework | Generally stable across Rails versions |\n| `@rails\u002Factioncable` | WebSocket support | Should match Rails version |\n| `@rails\u002Factivestorage` | Direct uploads | Should match Rails version |\n| `@rails\u002Factiontext` | Rich text editing | Should match Rails version |\n| `@rails\u002Frequest.js` | Rails UJS replacement | Should match Rails version era |\n\n### 7.3: Check for Updates\n\nFor npm\u002Fyarn projects, check for available updates:\n\n```bash\n# Using npm\nnpm outdated @hotwired\u002Fturbo-rails @hotwired\u002Fstimulus @rails\u002Factioncable @rails\u002Factivestorage 2>\u002Fdev\u002Fnull\n\n# Or check latest versions directly\nnpm view @hotwired\u002Fturbo-rails version 2>\u002Fdev\u002Fnull\nnpm view @rails\u002Factioncable version 2>\u002Fdev\u002Fnull\n```\n\n### 7.4: Check Importmap Pins (if applicable)\n\nIf the app uses importmap-rails, check `config\u002Fimportmap.rb` for pinned versions:\n\n```bash\ncat config\u002Fimportmap.rb | grep -E 'pin.*turbo|pin.*stimulus|pin.*@rails' || echo \"No importmap pins found\"\n```\n\nTo update importmap pins:\n```bash\nbin\u002Fimportmap pin @hotwired\u002Fturbo-rails\nbin\u002Fimportmap pin @hotwired\u002Fstimulus\n```\n\n### 7.5: JS Dependency Summary\n\nInclude in the upgrade summary:\n\n```\n### JavaScript Dependencies\n\n**Package Manager**: [npm\u002Fyarn\u002Fimportmap\u002Fnone]\n\n| Package | Current | Latest | Action |\n|---------|---------|--------|--------|\n| @hotwired\u002Fturbo-rails | 8.0.4 | 8.0.12 | Update recommended |\n| @rails\u002Factioncable | 7.1.0 | 8.0.0 | Update with Rails |\n| ... | ... | ... | ... |\n\n**Recommended JS Updates:**\n- Run `npm update @hotwired\u002Fturbo-rails` (or yarn equivalent)\n- Run `npm update @rails\u002Factioncable @rails\u002Factivestorage` to match Rails version\n```\n\n---\n\n## Step 8: Generate Upgrade Summary\n\nProvide a comprehensive summary including all findings from Steps 1-7:\n\n### Version Information\n- Current version: X.Y.Z\n- Latest version: A.B.C\n- Upgrade type: [Patch\u002FMinor\u002FMajor]\n\n### Upgrade Complexity Assessment\n\nRate the upgrade as **Small**, **Medium**, or **Large** based on:\n\n| Factor | Small | Medium | Large |\n|--------|-------|--------|-------|\n| Version jump | Patch only | Minor version | Major version |\n| Breaking changes | None | Few, well-documented | Many, significant |\n| Config changes | Minimal | Moderate | Extensive |\n| Deprecations | None active | Some to address | Many requiring refactoring |\n| Dependencies | Compatible | Some updates needed | Major dependency updates |\n\n### Key Changes to Address\n\nList the most important changes the user needs to handle:\n1. Configuration file updates\n2. Deprecated methods\u002Ffeatures to update\n3. New required dependencies\n4. Database migrations needed\n5. Breaking API changes\n\n### Recommended Upgrade Steps\n\n1. Update test suite and ensure passing\n2. Review deprecation warnings in current version\n3. Update Gemfile with new Rails version\n4. Run `bundle update rails`\n5. Update JavaScript dependencies (see JS Dependencies section)\n6. **DO NOT run `rails app:update` directly** - use the selective merge process below\n7. Run database migrations\n8. Run test suite\n9. Review and update deprecated code\n\n### Resources\n\n- Rails Upgrade Guide: https:\u002F\u002Fguides.rubyonrails.org\u002Fupgrading_ruby_on_rails.html\n- Rails Diff: https:\u002F\u002Frailsdiff.org\u002F{current}\u002F{target}\n- Release Notes: https:\u002F\u002Fgithub.com\u002Frails\u002Frails\u002Freleases\u002Ftag\u002Fv{target}\n\n---\n\n\n## When to Use This Skill\n\nAnalyze Rails apps and provide upgrade assessments\n\nUse this skill when working with analyze rails apps and provide upgrade assessments.\n## Step 9: Selective File Update (replaces `rails app:update`)\n\n**IMPORTANT:** Do NOT run `rails app:update` as it overwrites files without considering local customizations. Instead, follow this selective merge process:\n\n### 9.1: Detect Local Customizations\n\nBefore any upgrade, identify files with local customizations:\n\n```bash\n# Check for uncommitted changes\ngit status\n\n# List config files that differ from a fresh Rails app\n# These are the files we need to be careful with\ngit diff HEAD --name-only -- config\u002F bin\u002F public\u002F\n```\n\nCreate a mental list of files in these categories:\n- **Custom config files**: Files with project-specific settings (i18n, mailer, etc.)\n- **Modified bin scripts**: Scripts with custom behavior (bin\u002Fdev with foreman, etc.)\n- **Standard files**: Files that haven't been customized\n\n### 9.2: Analyze Required Changes from Railsdiff\n\nBased on the railsdiff output from Step 6, categorize each changed file:\n\n| Category | Action | Example |\n|----------|--------|---------|\n| **New files** | Create directly | `config\u002Finitializers\u002Fnew_framework_defaults_X_Y.rb` |\n| **Unchanged locally** | Safe to overwrite | `public\u002F404.html` (if not customized) |\n| **Customized locally** | Manual merge needed | `config\u002Fapplication.rb`, `bin\u002Fdev` |\n| **Comment-only changes** | Usually skip | Minor comment updates in config files |\n\n### 9.3: Create Upgrade Plan\n\nPresent the user with a clear upgrade plan:\n\n```\n## Upgrade Plan: Rails X.Y.Z → A.B.C\n\n### New Files (will be created):\n- config\u002Finitializers\u002Fnew_framework_defaults_A_B.rb\n- bin\u002Fci (new CI script)\n\n### Safe to Update (no local customizations):\n- public\u002F400.html\n- public\u002F404.html\n- public\u002F500.html\n\n### Needs Manual Merge (local customizations detected):\n- config\u002Fapplication.rb\n  └─ Local: i18n configuration\n  └─ Rails: [describe new Rails changes if any]\n\n- config\u002Fenvironments\u002Fdevelopment.rb\n  └─ Local: letter_opener mailer config\n  └─ Rails: [describe new Rails changes]\n\n- bin\u002Fdev\n  └─ Local: foreman + Procfile.dev setup\n  └─ Rails: changed to simple ruby script\n\n### Skip (comment-only or irrelevant changes):\n- config\u002Fpuma.rb (only comment changes)\n```\n\n### 9.4: Execute Upgrade Plan\n\nAfter user confirms the plan:\n\n#### For New Files:\nCreate them directly using the content from railsdiff or by extracting from a fresh Rails app:\n\n```bash\n# Generate a temporary fresh Rails app to extract new files\ncd \u002Ftmp && rails new rails_template --skip-git --skip-bundle\n# Then copy needed files\n```\n\nOr use the Rails generator for specific files:\n```bash\nbin\u002Frails app:update:configs  # Only updates config files, still interactive\n```\n\n#### For Safe Updates:\nOverwrite these files as they have no local customizations.\n\n#### For Manual Merges:\nFor each file needing merge, show the user:\n\n1. **Current local version** (their customizations)\n2. **New Rails default** (from railsdiff)\n3. **Suggested merged version** that:\n   - Keeps all local customizations\n   - Adds only essential new Rails functionality\n   - Removes deprecated settings\n\nExample merge for `config\u002Fapplication.rb`:\n```ruby\n# KEEP local customizations:\nconfig.i18n.available_locales = [:de, :en]\nconfig.i18n.default_locale = :de\nconfig.i18n.fallbacks = [:en]\n\n# ADD new Rails 8.1 settings if needed:\n# (usually none required - new defaults come via new_framework_defaults file)\n```\n\n### 9.5: Handle Active Storage Migrations\n\nAfter file updates, run any new migrations:\n\n```bash\nbin\u002Frails db:migrate\n```\n\nCheck for new migrations that were added:\n```bash\nls -la db\u002Fmigrate\u002F | tail -10\n```\n\n### 9.6: Verify Upgrade\n\nAfter completing the merge:\n\n1. Start the Rails server and check for errors:\n   ```bash\n   bin\u002Fdev  # or bin\u002Frails server\n   ```\n\n2. Check the Rails console:\n   ```bash\n   bin\u002Frails console\n   ```\n\n3. Run the test suite:\n   ```bash\n   bin\u002Frails test\n   ```\n\n4. Review deprecation warnings in logs\n\n---\n\n## Step 10: Finalize Framework Defaults\n\nAfter verifying the app works:\n\n1. Review `config\u002Finitializers\u002Fnew_framework_defaults_X_Y.rb`\n2. Enable each new default one by one, testing after each\n3. Once all defaults are enabled and tested, update `config\u002Fapplication.rb`:\n   ```ruby\n   config.load_defaults X.Y  # Update to new version\n   ```\n4. Delete the `new_framework_defaults_X_Y.rb` file\n\n---\n\n\n## When to Use This Skill\n\nAnalyze Rails apps and provide upgrade assessments\n\nUse this skill when working with analyze rails apps and provide upgrade assessments.\n## Error Handling\n\n- If `gh` CLI is not authenticated, instruct the user to run `gh auth login`\n- If railsdiff.org doesn't have the exact versions, try with major.minor.0 versions\n- If the app is already on the latest version, congratulate the user and note any upcoming releases\n- If local customizations would be lost, ALWAYS stop and show the user what would be overwritten before proceeding\n\n## Key Principles\n\n1. **Never overwrite without checking** - Always check for local customizations first\n2. **Preserve user intent** - Local customizations exist for a reason\n3. **Minimal changes** - Only add what's necessary for the new Rails version\n4. **Transparency** - Show the user exactly what will change before doing it\n5. **Reversibility** - User should be able to `git checkout` to restore if needed\n",{"name":5,"risk":24,"source":25,"date_added":26,"description":7},"safe","https:\u002F\u002Fgithub.com\u002Frobzolkos\u002Fskill-rails-upgrade","2026-02-27","main","b30820b3248f6676d5389f0ccabd4e5250c9c536","skills\u002Fskill-rails-upgrade","https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack","https:\u002F\u002Fgithub.com\u002Fkalash33","kalashpoddar.me","Tech-savvy Full Stack Developer 🚀 | Cybersecurity enthusiast 🔒 | Passionate about innovation and securing the digital world 🌐 | Let's code securely! 💻🔐","2026-05-20 04:11:22",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add kalash33\u002Fkstack --skill skill-rails-upgrade",{"tool":41,"command":42},"bunx","bunx skills add kalash33\u002Fkstack --skill skill-rails-upgrade",{"tool":44,"command":45},"pnpm","pnpm dlx skills add kalash33\u002Fkstack --skill skill-rails-upgrade","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack\u002Fblob\u002Fmain\u002Fskills\u002Fskill-rails-upgrade\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M73CFERCR43JCAP606E41EFB","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reacti...","https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M73CFCMFVTAQEMTZ5HR10X8V","zoom-automation","Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-automation\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M73CFAA7EBWXJVXDQ1X555MB","zoho-crm-automation","Automate Zoho CRM tasks via Rube MCP (Composio): create\u002Fupdate records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack\u002Fblob\u002Fmain\u002Fskills\u002Fzoho-crm-automation\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M73CF80XCM9K81567MJ8QZFW","zod-validation-expert","Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.","https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack\u002Fblob\u002Fmain\u002Fskills\u002Fzod-validation-expert\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M73CF4YPMF3RA8ZJDXZSMD93","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M73CF2S25EN3XNAMKY47XHPS","zendesk-automation","Automate Zendesk tasks via Rube MCP (Composio): tickets, users, organizations, replies. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002Fkalash33\u002Fkstack\u002Fblob\u002Fmain\u002Fskills\u002Fzendesk-automation\u002FSKILL.md",[],[]]