[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FTMZSAVD0S37TM6C7AMTBM":3,"skill-same:01M6FTMZSAVD0S37TM6C7AMTBM":61},{"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":23,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6FTMZSAVD0S37TM6C7AMTBM","skill-rails-upgrade",null,"Analyze Rails apps and provide upgrade assessments","reikiplanet\u002Fdaoskills","reikiplanet","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F96377599?v=4","01M6CVWCMD740YHQDK7E9QYBW4","Reiki Planet","01M6CVWCS4KXVA2CWFVJ43EAXK",0,"MIT","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fdata\u002Fskill-rails-upgrade\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32],"rails upgrade","rails","upgrade","skill rails upgrade","safe","github","https","analyze","apps","2026-11-10 10:12:30",false,"---\nname: skill-rails-upgrade\ndescription: \"Analyze Rails apps and provide upgrade assessments\"\nsource: \"https:\u002F\u002Fgithub.com\u002Frobzolkos\u002Fskill-rails-upgrade\"\nrisk: safe\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":28,"source":38,"description":7},"https:\u002F\u002Fgithub.com\u002Frobzolkos\u002Fskill-rails-upgrade","master","dff58085da947e81e8418c922055644bf0082b1b","data\u002Fskill-rails-upgrade","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills","https:\u002F\u002Fgithub.com\u002Freikiplanet","https:\u002F\u002Fwww.reiki-planet.com","Reiki Planet Game","2026-03-29 06:02:29",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add reikiplanet\u002Fdaoskills --skill skill-rails-upgrade",{"tool":53,"command":54},"bunx","bunx skills add reikiplanet\u002Fdaoskills --skill skill-rails-upgrade",{"tool":56,"command":57},"pnpm","pnpm dlx skills add reikiplanet\u002Fdaoskills --skill skill-rails-upgrade","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fdata\u002Fskill-rails-upgrade\u002FSKILL.md",true,[],[62,89,101,116,136,159],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":33},"01M6G614JTEQJHPT8AKK3YQ18S","web-games","Web browser game development principles. Framework selection, WebGPU, optimization, PWA.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fweb-games\u002FSKILL.md",[],[69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88],"games","web games","web","grep","principles","selection","community","framework selection","edit","write","read","pwa","game","web browser","game development","Optimization","framework","browser","development","webgpu",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":33},"01M6G611H2YGV0GZFP90D38ZMJ","vr-ar","VR\u002FAR development principles. Comfort, interaction, performance requirements.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fvr-ar\u002FSKILL.md",[],[96,97,87,98,99,75,77,78,79,72,100,73],"ar","vr ar","interaction","requirements","performance",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":33},"01M6G60XNMHAMV1SV0EJ1CX0AY","templates","Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Ftemplates\u002FSKILL.md",[],[103,108,109,110,111,112,75,113,79,114,115,72],"project scaffolding","From Scratch","tech","project","scaffolding","use","projects","applications",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":33},"01M6G60T0GATMK3Q5H8GDC1Z8S","wcag-audit-patterns","Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing ac...","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fwcag-audit-patterns\u002FSKILL.md",[],[123,124,125,126,127,75,128,129,130,131,113,132,133,134,135],"wcag audit patterns","wcag audit","patterns","WCAG","audit","manual","with","automated testing","guidance","remediation","verification","accessibility","testing",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":33},"01M6G60PMCHW1FRZ63F931QK3R","vulnerability-scanner","Advanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fvulnerability-scanner\u002FSKILL.md",[],[143,144,145,146,147,148,149,150,75,79,72,151,73,152,153,154,155,156,157,158],"scanner","vulnerability scanner","vulnerability","prioritization","2025","mapping","chain","supply chain","Bash","analysis","risk","owasp","supply chain security","security","supply","advanced",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":33},"01M6G60JZBB8DK0W3DSG1WNMZK","threat-modeling-expert","Expert in threat modeling methodologies, security architecture review, and risk assessment. Masters STRIDE, PASTA, attack trees, and security requirement extraction. Use for security architecture r...","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fthreat-modeling-expert\u002FSKILL.md",[],[166,167,168,169,170,171,172,173,156,113,174,175,176,75,177,178,179,153,180,181],"modeling","threat modeling expert","threat modeling","expert","threat","risk assessment","architecture review","architecture","security architecture review","trees","security architecture","security requirement extraction","assessment","extraction","review","stride"]