agentleFS
sebyx07sebyx07/ruby2html/.claude/skills/upgrade-deps/SKILL.md

upgrade-deps

Skill23 starsChanged 13 days agoMITView on GitHub

Upgrade ruby2html's development/demo dependencies (Rails, view_component, phlex-rails, slim, rspec-rails, rubocop, lefthook, rake-compiler, ...) safely - bundle outdated, bump in small groups, run the full suite and benchmarks, record changes. Use when asked to update gems, fix outdated or vulnerable dependencies, or move to a new Rails/Ruby.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-pr.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    test: rspec-rails, capybara, benchmark-ips, faker

    line 19
  2. Very specific:

    After each group: bundle exec rake compile, CI=1 bundle exec rspec, RUBY2HTML_DISABLE_EXT=1 bundle exec rspec spec/gem, bundle exec rubocop …

    line 22
  3. Very specific:

    Never run bundle update with no arguments in one go.

    line 28
  4. Very specific:

    Never relax required_ruby_version or add gemspec runtime deps without asking.

    line 29
  5. Distinctive:

    Never commit or push unless asked.

    line 30

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Upgrade dependencies

Patch and minor updates arrive as grouped Dependabot PRs and auto-merge when CI passes; this skill is for what is left: major-version bumps (Dependabot PRs that did not auto-merge, or a manual upgrade). Do not pin or list versions in docs; the lockfiles are the record.

The Gemfile serves the demo app and specs; the gem's only runtime dependency is in ruby2html.gemspec (keep it minimal; htmlbeautifier is optional at runtime via the middleware's lazy require). Do not add runtime dependencies to the gemspec while upgrading.

Steps

  1. Baseline: clean tree, bundle exec rake compile, CI=1 bundle exec rspec green, save bundle exec rake bench output (benchmark skill) to the scratch dir.
  2. Survey: bundle outdated --only-explicit (and bundle outdated for transitive). Read each major bump's changelog/upgrade guide for breaking changes (Rails config.load_defaults, view_component major versions, phlex-rails majors, rspec-rails majors, lefthook config format).
  3. Bump in groups, one commit-sized step each:
    • framework: rails (+ sprockets-rails, web-console, bootsnap, puma, sqlite3)
    • view layer: view_component, phlex-rails, slim-rails
    • test: rspec-rails, capybara, benchmark-ips, faker
    • tooling: rubocop-rails_config, lefthook, brakeman, rake-compiler Edit constraints in Gemfile, then bundle update <gems> --conservative. Check gemfiles/*.gemfile (CI matrix gemfiles, e.g. per Rails line, and standalone.gemfile) for constraints that need the same change; add a gemfile for a new Rails major. For Ruby: update .ruby-version (most CI jobs use it); the Ruby matrix itself is generated.
  4. After each group: bundle exec rake compile, CI=1 bundle exec rspec, RUBY2HTML_DISABLE_EXT=1 bundle exec rspec spec/gem, bundle exec rubocop (new cops: autocorrect only safe ones, review the diff), bin/brakeman --no-pager, bundle exec rake smoke. Fix breakages in the demo app (app/, config/) or specs; touch lib/gem/ only for genuine compatibility fixes and note them in CHANGELOG.
  5. Framework/view-layer upgrades: rerun benchmarks (bundle exec rake bench; and bundle exec rspec spec/benchmarks/ if Rails/ViewComponent/Phlex changed, ~6 min) and compare with the baseline. Report regressions; README tables only change on request.
  6. Report: table of gem old → new, breakages fixed, test/benchmark results. CHANGELOG ### Changed only if the gem's supported Ruby/Rails range or behavior changed.

Never

  • Never run bundle update with no arguments in one go.
  • Never relax required_ruby_version or add gemspec runtime deps without asking.
  • Never commit or push unless asked.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.