Companion Gem
RailsCTO's skills assume a specific quality toolchain is installed and configured in your Rails project — RuboCop with the Rails and Minitest cops, Reek, Flog, Flay, Brakeman, bundler-audit, SimpleCov with the JSON formatter, and Herb. Plus the matching .rubocop.yml, .reek.yml, config/brakeman.yml, and .herb/ config files that the skills expect.
Installing and configuring all of that by hand would be tedious. The rails-cto gem does it for you.
Source
The companion gem is maintained at mattsears/rails-cto-gem.
What the gem provides
- A single
rails-cto initcommand that installs the toolchain gems, drops in config templates, patchestest/test_helper.rbfor SimpleCov, and wires yourCLAUDE.md. - A
rails-cto doctorcommand that detects drift between your project's config files and the bundled templates. - The config templates themselves — sensible defaults that match what the skills expect.
- A custom RuboCop cop and Herb rewriter rules that enforce project conventions the stock tools don't cover.
Installation
Add the gem to your Gemfile:
group :development, :test do
gem "rails-cto"
endInstall it:
bundle installBootstrap the project:
bundle exec rails-cto initSee rails-cto init for a full breakdown of what the command does, what files it touches, and the --force flag.
Keeping it in sync
Config files can drift over time — people edit .rubocop.yml, add exemptions, or upgrade toolchain versions. Run rails-cto doctor whenever you want to verify that every config file is still present and still matches the bundled template:
bundle exec rails-cto doctorSee rails-cto doctor for what it checks and how to interpret the output.
Customizing the templates
Every config file the gem installs is a starting point, not a lock. You can edit .rubocop.yml, .reek.yml, and the rest to match your project's needs. The doctor command will flag drift but won't stop you from diverging. See Config Templates for details on what each file contains and which fields are safe to customize.