/ Каталог / Песочница / claude-code_rails-upgrade-skill
● Сообщество ombulabs ⚡ Сразу

claude-code_rails-upgrade-skill

автор ombulabs · ombulabs/claude-code_rails-upgrade-skill

Claude Code skill that methodically upgrades Rails — from audit through deprecation fixes to bundle update — without breaking everything.

Rails Upgrade Skill (by OmbuLabs) walks Claude through the standard Rails upgrade playbook: audit the codebase, fix deprecations, apply framework defaults, handle gem incompatibilities, and verify on the new version. Based on OmbuLabs' production experience upgrading Rails apps. Good for going N → N+1, or catching up from older versions.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

claude-code-rails-upgrade-skill.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "claude-code-rails-upgrade-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/ombulabs/claude-code_rails-upgrade-skill",
        "~/.claude/skills/claude-code_rails-upgrade-skill"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "claude-code-rails-upgrade-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/ombulabs/claude-code_rails-upgrade-skill",
        "~/.claude/skills/claude-code_rails-upgrade-skill"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "claude-code-rails-upgrade-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/ombulabs/claude-code_rails-upgrade-skill",
        "~/.claude/skills/claude-code_rails-upgrade-skill"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "claude-code-rails-upgrade-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/ombulabs/claude-code_rails-upgrade-skill",
        "~/.claude/skills/claude-code_rails-upgrade-skill"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "claude-code-rails-upgrade-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/ombulabs/claude-code_rails-upgrade-skill",
        "~/.claude/skills/claude-code_rails-upgrade-skill"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "claude-code-rails-upgrade-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/ombulabs/claude-code_rails-upgrade-skill",
          "~/.claude/skills/claude-code_rails-upgrade-skill"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add claude-code-rails-upgrade-skill -- git clone https://github.com/ombulabs/claude-code_rails-upgrade-skill ~/.claude/skills/claude-code_rails-upgrade-skill

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: claude-code_rails-upgrade-skill

How to plan a Rails upgrade before touching code

👤 Rails devs facing a multi-version jump ⏱ ~60 min intermediate

Когда использовать: You're on Rails 6.1 and need to get to 7.2. You want a plan, not a prayer.

Предварительные требования
  • Skill installed — git clone https://github.com/ombulabs/claude-code_rails-upgrade-skill ~/.claude/skills/rails-upgrade-skill
  • Git-clean working tree — Always upgrade on a branch; commit current state
Поток
  1. Audit current state
    Audit this Rails app: current version, Ruby version, gems, deprecation warnings from a test run.✓ Скопировано
    → Baseline report
  2. Build the path
    Plan the upgrade to Rails 7.2. Go version-by-version (6.1 → 7.0 → 7.1 → 7.2), each with milestone criteria.✓ Скопировано
    → Multi-stage plan
  3. Identify blockers
    Which gems don't have a 7.2-compatible version? Proposals for each (upgrade/replace/fork).✓ Скопировано
    → Per-gem blocker list

Итог: A realistic upgrade plan with staged milestones.

Подводные камни
  • Jumping two major versions at once — Skill enforces one minor/major at a time — don't override

Sweep and fix deprecation warnings

👤 Rails devs mid-upgrade ⏱ ~90 min intermediate

Когда использовать: You're between versions and the test run is a wall of deprecation warnings.

Поток
  1. Collect
    Run tests, collect all unique deprecation warnings.✓ Скопировано
    → Deduped list with file:line occurrences
  2. Group + fix
    Group by cause. Propose minimal fixes with diffs for each group.✓ Скопировано
    → Grouped fix diffs

Итог: A clean test run ready for the next version bump.

Apply new framework defaults safely

👤 Rails devs navigating rails app:update ⏱ ~60 min advanced

Когда использовать: You've bumped the Gemfile and ran rails app:update; now you have a bunch of new initializers.

Поток
  1. Review diff
    Review the diff from rails app:update. Flag any default change that could break our app (strict_loading, zeitwerk mode, etc.).✓ Скопировано
    → Per-change risk annotation
  2. Staged enable
    For each risky default, produce a staged rollout: enable behind env flag, validate on staging, then flip.✓ Скопировано
    → Staged plan per default

Итог: Defaults enabled without surprise regressions.

Подводные камни
  • Enabling all load_defaults at once — Use new_framework_defaults_X.Y.rb to ramp individually

Комбинации

Сочетайте с другими MCP — эффект x10

claude-code-rails-upgrade-skill + claude-code-owasp-skill

Security review on the upgraded code

After upgrade to Rails 7.2, run OWASP review on the auth and params handling.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
Audit repo Start of every upgrade Claude tokens
Plan upgrade path current, target After audit Claude tokens
Gem compat check Gemfile, target Rails Before bumping Claude tokens + RubyGems API
Deprecation sweep test log Between versions Claude tokens
Framework defaults migration diff from rails app:update After rails app:update Claude tokens

Стоимость и лимиты

Во что обходится

Квота API
None
Токенов на вызов
20-80k across an upgrade
Деньги
Free
Совет
Run deprecation sweeps on specific directories rather than the whole app at once.

Безопасность

Права, секреты, радиус поражения

Хранение учётных данных: No credentials
Исходящий трафик: Code sent to Claude for inference

Устранение неполадок

Частые ошибки и исправления

rails app:update produces uncommitted binary files

These are usually system files. Gitignore them and regenerate cleanly.

Tests pass locally, fail in CI after upgrade

Likely autoloading differences or eager_load in production mode. Run with RAILS_ENV=production locally.

Gem bundle resolution fails

Skill will suggest alternative gem versions; sometimes a fork or replacement is required.

Проверить: bundle update --conservative

Альтернативы

claude-code_rails-upgrade-skill в сравнении

АльтернативаКогда использоватьКомпромисс
next_rails gemYou want a deterministic upgrade helperNo LLM-guided deprecation fixes

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills