skill-rails-upgrade
放心升级 Rails 应用程序
此技能分析您的 Rails 应用程序并提供全面的升级评估,包含特定版本的指导以及选择性文件合并计划,可安全升级到更新的 Rails 版本。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“skill-rails-upgrade”。 Analyze my Rails app for upgrading to the latest version
预期结果:
- Current Rails Version: 7.1.3
- Latest Rails Version: 8.0.1
- Upgrade Type: Major
- Complexity: Large - expect significant changes
- Key Breaking Changes:
- - New framework defaults require review
- - Active Storage configuration changes
- - Turbo 8.0 updates needed
- Recommended Steps:
- 1. Review deprecation warnings in 7.1.3
- 2. Update Gemfile to Rails 8.0.1
- 3. Run bundle update rails
- 4. Review JavaScript dependencies
- 5. Create selective merge plan
正在使用“skill-rails-upgrade”。 What files will change in my Rails upgrade?
预期结果:
- New Files to Create:
- - config/initializers/new_framework_defaults_8_0.rb
- - bin/ci (new CI script)
- Safe to Update (no local changes):
- - public/404.html, public/500.html
- Needs Manual Merge:
- - config/application.rb (i18n config)
- - config/environments/development.rb (letter_opener)
- - bin/dev (foreman setup)
安全审计
安全All static findings are false positives. The 'external_commands' detections are shell command examples in documentation (not code execution). The 'network' detections are legitimate Rails documentation URLs. The 'weak cryptographic algorithm' detections are false positives - YAML frontmatter and plain text were incorrectly flagged. This is a legitimate Rails upgrade assistant skill with no security concerns.
中风险问题 (1)
低风险问题 (2)
风险因素
⚙️ 外部命令 (73)
📁 文件系统访问 (5)
检测到的模式
质量评分
你能构建什么
规划 Rails 7 到 8 的升级
全面评估从 Rails 7.x 升级到 Rails 8.x 所需的更改,包括破坏性变更和必需的文件更新。
安全渐进式升级
遵循分步流程,在更新文件之前检查本地自定义配置,确保不会丢失任何项目特定的更改。
JavaScript 依赖对齐
检查并推荐更新 Rails 相关的 JavaScript 软件包(Turbo、Stimulus、Action Cable),以匹配目标 Rails 版本。
试试这些提示
Use the rails-upgrade skill to analyze this Rails application and tell me what version it is running and what the latest Rails version is.
Use the rails-upgrade skill to perform a complete upgrade assessment. I want to upgrade from my current version to the latest Rails. Provide a summary of breaking changes, new files needed, and a plan for handling my local customizations.
Use the rails-upgrade skill to generate a selective file update plan. Check which config files have local customizations and show me exactly what would change for each file.
Use the rails-upgrade skill to check my JavaScript dependencies. I use npm/yarn and want to ensure my Rails-related packages (Turbo, Stimulus) are compatible with the target Rails version.
最佳实践
- 在进行更改之前,务必在干净的 git 分支上运行升级分析
- 在升级之前查看当前版本的弃用警告
- 一次测试一个框架默认设置的启用
- 保持 JavaScript 依赖与 Rails 版本一致
避免
- 直接运行 rails app:update 而不检查本地自定义配置
- 使用 Turbo 或 Stimulus 时跳过 JavaScript 依赖审计
- 在开始升级之前忽略弃用警告
- 未经测试就一次性启用所有新的框架默认设置