[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CDSVNNFYS87QXQ49KBZNKW":3,"skill-same:01M7CDSVNNFYS87QXQ49KBZNKW":50},{"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":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7CDSVNNFYS87QXQ49KBZNKW","skill-rails-upgrade",null,"Analyze Rails apps and provide upgrade assessments","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fskill-rails-upgrade\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\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\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\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","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fskill-rails-upgrade",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill skill-rails-upgrade",{"tool":42,"command":43},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill skill-rails-upgrade",{"tool":45,"command":46},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill skill-rails-upgrade","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills\u002Fskills\u002Fskill-rails-upgrade\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]