Skip to content

Installation

Getting RailsCTO running in a project takes three steps: install the plugin, install its marketplace dependencies, and install the companion gem. None of them take more than a minute.

Requirements

  • A Rails 7+ project (Rails 8 recommended)
  • Claude Code installed and working
  • Ruby and Bundler available on your PATH

1. Install the plugin

From inside Claude Code, add the marketplace and install the plugin:

bash
/plugin marketplace add mattsears/rails-cto
/plugin install rails-cto@rails-cto

That registers all 16 skills with Claude Code.

2. Install marketplace dependencies

The Stimulus skill (rails-cto-stimulus) depends on better-stimulus@obie-skills. Add the marketplace and install it:

bash
/plugin marketplace add obie/skills
/plugin install better-stimulus@obie-skills

3. Install the companion gem

The plugin's skills rely on a quality toolchain — RuboCop, Reek, Flog, Flay, Brakeman, bundler-audit, SimpleCov, Herb — plus matching config files. Rather than installing each piece by hand, add the companion rails-cto gem to your project.

Add it to your Gemfile:

ruby
group :development, :test do
  gem "rails-cto"
end

Install it and run the init command:

bash
bundle install
bundle exec rails-cto init

rails-cto init will:

  • Install the entire quality toolchain as gem dependencies
  • Drop config templates into your project (skipping anything that already exists)
  • Patch test/test_helper.rb so SimpleCov writes coverage/coverage.json
  • Append a short block to your project's CLAUDE.md that wires the mandatory skills into every session

See the companion gem docs for details on what init does, flag options, and the doctor command.

4. Install the Node-side Herb tools

Herb's formatter and linter aren't part of the gem — they ship as Node packages. Add them to your package.json:

json
"devDependencies": {
  "@herb-tools/formatter": "0.9.2",
  "@herb-tools/linter": "0.9.2"
}

Then install:

bash
npm install
# or
yarn install

5. Verify the install

Open Claude Code in your Rails project and start a session. The orchestrator skill (rails-cto) should initialize automatically. If it doesn't, check that the CLAUDE.md block from rails-cto init is still in place — see CLAUDE.md Wiring.

You can also run the gem's drift detector at any time:

bash
bundle exec rails-cto doctor

See rails-cto doctor for what it checks.

Released under the MIT License.