技能 skill-rails-upgrade
📦

skill-rails-upgrade

安全 ⚙️ 外部命令🌐 网络访问📁 文件系统访问

放心升级 Rails 应用程序

此技能分析您的 Rails 应用程序并提供全面的升级评估,包含特定版本的指导以及选择性文件合并计划,可安全升级到更新的 Rails 版本。

支持: Claude Codex Code(CC)
🥉 72 青铜
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“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)

安全审计

安全
v1 • 2/25/2026

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
已扫描文件
409
分析行数
6
发现项
1
审计总数
中风险问题 (1)
Shell Command Examples in Documentation
The skill contains 73 examples of shell commands (gh, git, npm, rails) as documentation. These are instructions for the AI to run during upgrade analysis, not actual code execution vulnerabilities.
低风险问题 (2)
Hardcoded Documentation URLs
The skill references official Rails documentation URLs (guides.rubyonrails.org, railsdiff.org, github.com). These are legitimate, publicly-accessible resources.
File System Checks for Configuration
The skill includes file existence checks (ls, cat) for standard Rails configuration files like package.json and importmap.rb.

检测到的模式

False Positive: Weak Cryptographic Algorithm Detection
审计者: claude

质量评分

38
架构
100
可维护性
87
内容
50
社区
96
安全
83
规范符合性

你能构建什么

规划 Rails 7 到 8 的升级

全面评估从 Rails 7.x 升级到 Rails 8.x 所需的更改,包括破坏性变更和必需的文件更新。

安全渐进式升级

遵循分步流程,在更新文件之前检查本地自定义配置,确保不会丢失任何项目特定的更改。

JavaScript 依赖对齐

检查并推荐更新 Rails 相关的 JavaScript 软件包(Turbo、Stimulus、Action Cable),以匹配目标 Rails 版本。

试试这些提示

基本 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.
JavaScript 依赖审计
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 依赖审计
  • 在开始升级之前忽略弃用警告
  • 未经测试就一次性启用所有新的框架默认设置

常见问题

此技能可以帮助升级哪些版本的 Rails?
此技能可帮助从 Rails 5.0 到最新的 Rails 8.x 的升级。它适用于补丁、次要和主要版本升级。
此技能会自动更新我的应用程序吗?
不会。该技能分析您的应用程序并创建升级计划。它会显示将要更改的内容,并在修改任何文件之前需要您的确认。
我会丢失我的本地自定义配置吗?
不会。该技能专门检查配置文件和 bin 脚本中的本地自定义配置。它永远不会在首先显示更改内容的情况下覆盖自定义文件。
如果我没有安装 gh CLI 怎么办?
该技能仍然可以工作,但您需要手动检查最新的 Rails 版本。gh CLI 仅用于获取最新的发布信息。
此技能可以帮助处理 JavaScript 依赖吗?
可以。该技能会检查 Rails 相关的 JavaScript 库(如 Turbo、Stimulus、Action Cable 和 Active Storage)的 npm/yarn 软件包和 importmap 引用。
文件更新后会发生什么?
更新文件后,该技能将指导您运行迁移、测试应用程序以及逐个启用新的框架默认设置。