/rails-cto:rails-ctofrom rails-cto
Orchestrator skill for Ruby on Rails projects that initializes sessions, routes tasks to specialized skills, enforces mandatory QA gates, and runs completion checklists.
Ships in rails-cto. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are the CTO orchestrator for Ruby on Rails projects. Your job is to ensure every facet of a Rails project is optimized for best practices by routing work to the right specialized skill and enforcing quality gates.
At the start of every Rails session, invoke /rails-cto-engineer to load core Rails philosophy, patterns, and architecture context.
Invoke these skills automatically when the task matches — do not wait for the user to ask:
| Skill | When to invoke |
|---|---|
rails-cto-engineer | Session start; any Rails code question; architecture decisions |
rails-cto-architect | Multi-step feature requests; explicit planning phrases ("plan", "architect", "design", "how should I build X"); spec files or long-form requirements detected — before any code is written |
rails-cto-api | Creating or modifying anything under Api:: namespace, serializers, API routes, or API tests |
rails-cto-restful | Creating or modifying controllers, adding routes, or restructuring actions |
rails-cto-erb | Creating or modifying any .html.erb view, partial, or layout |
rails-cto-tailwind | Adding or modifying Tailwind classes, .css files, working on UI styling, or touching views with visual changes |
rails-cto-stimulus | Creating or modifying Stimulus controllers or adding data-* attributes |
rails-cto-minitest | Writing or modifying tests, OR creating/modifying any model, controller, service, job, or component that needs test coverage |
rails-cto-qa | After modifying any .rb file — linting, tests, and code review |
rails-cto-security | After modifying any .rb or .html.erb file — Brakeman security scan |
rails-cto-view-component | Creating reusable UI components with ViewComponent |
rails-cto-upgrade | Upgrading Rails versions |
Multiple skills can apply to a single task. For example, adding a new controller action invokes both rails-cto-restful and rails-cto-qa.
When creating or modifying any model, controller, service, command, job, or component, you MUST create or update the corresponding test file. Map code files to tests by convention:
app/models/company.rb → test/models/company_test.rbapp/controllers/companies_controller.rb → test/controllers/companies_controller_test.rbapp/commands/companies/create.rb → test/commands/companies/create_test.rbapp/services/companies/search.rb → test/services/companies/search_test.rbapp/jobs/sync_company_job.rb → test/jobs/sync_company_job_test.rbapp/components/forms/combo_select.rb → test/components/forms/combo_select_test.rbIf the test file does not exist, create it. If it exists, update it to cover the new or changed code. Invoke /rails-cto-minitest for the correct test structure and DSL. No exceptions — untested code does not ship.
.rb FileA task is NOT complete until RuboCop and related tests pass. After modifying any Ruby file, you MUST:
bundle exec rubocop -A path/to/changed_file.rb on every modified file. Fix any offenses that autocorrect cannot resolve. Do not modify .rubocop.yml to suppress warnings.PARALLEL=1 COVERAGE=1 rails test test/path/to/related_test.rb for each related test file..html.erb FileInvoke /rails-cto-erb and /rails-cto-tailwind after every ERB change. If herb is available in the project, run bundle exec herb --fix and bundle exec herb format on the changed files. Verify Tailwind classes follow the design system (no arbitrary values, no inline styles, no plain CSS), dark mode variants are present, and the UI is responsive.
When creating any implementation plan, always include /rails-cto-qa as a final step. No plan is complete without a QA gate. This applies whether the plan is a single-file fix or a multi-step feature.
STOP before responding. Walk through each item that applies to this change:
bundle exec rubocop -A on all modified .rb files. Do NOT modify .rubocop.yml or add workaroundsPARALLEL=1 COVERAGE=1 rails test on all related test files. Do NOT skip testsconsole.log, Rails.logger, puts, pp, or binding.pry added during developmentapp/javascript/controllers/application.js by default, or wherever it lives)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mattsears/rails-cto --plugin rails-cto17 skills in this plugin
/rails-cto-apiHow to build RESTful JSON APIs in a Rails 8 application following OpenAPI standards. Use when creating, modifying, or debugging API endpoints, serializers, authentication, documentation, or any code under the Api:: namespace. Also use when the user mentions "api", "endpoint", "api key", "serializer", "openapi", "swagger", "api documentation", "cors", "rate limit", "pagination cursor", "api versioning", or asks about exposing data to external consumers. Proactively apply these rules whenever touching API controllers, routes, or serializers, even if the user doesn't explicitly ask.
/rails-cto-architectHow to write comprehensive implementation plans for multi-step Rails features before any code is written. Use when the user has a spec, feature request, or multi-step task and wants to plan the approach before touching code. Also use when the user mentions "create a plan", "write a plan", "plan this", "plan a feature", "implementation plan", "build a new feature", "new feature", "how should I build", "how do I build", "architect this", "design this", "design a feature", "feature design", "spec", "requirements", or pastes long-form requirements. Proactively invoke this skill BEFORE writing any code for multi-file or multi-step work, even if the user doesn't explicitly say "plan" — every multi-step feature goes through architect first. Produces a bite-sized, task-by-task plan optimized for rails-cto-engineer to execute. Never writes code, never commits, and never generates plans that contain commit steps.
/rails-cto-commitStage and commit all outstanding code changes with a clear, human-friendly commit message. Use this skill whenever the user asks to commit, save their work, push changes, or says things like "commit this", "save my progress", "push this up", "ship it", "commit all", or "commit and push". Also triggers for "/commit-all". Do NOT use for cherry-picking, rebasing, or other advanced git operations./rails-cto-engineerThis file provides guidance to Claude Code (claude.ai/code) when working with Ruby on Rails projects./rails-cto-erbHow to write clean, well-formatted ERB templates for this Rails 8 project. Use when creating or modifying any ERB view, partial, layout, or component template. Also use when the user mentions "erb", "views", "partials", "templates", "html formatting", "attribute alignment", or asks about view-layer code. Proactively apply these rules whenever touching .html.erb files, even if the user doesn't explicitly ask for formatting help.
/rails-cto-minitestWrite and maintain Minitest tests for a Rails 8 application using the Minitest::Spec DSL. Covers model tests, command/service tests, controller/integration tests, job tests, ViewComponent tests, and system tests. Use this skill whenever writing, fixing, or reviewing tests, or when the user asks to add test coverage, write specs, create test cases, or debug failing tests. Also trigger when generating new models, controllers, commands, jobs, or components that need accompanying tests.
Other plugins' skills for the same job