rubocop-and-code-quality

Configure RuboCop, SimpleCov, and erb_lint for Rails code quality.

21|2|Updated May 24, 2026
One-click install
npx skills add https://github.com/sandeepmvl/rails-skills --skill rubocop-and-code-quality
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rubocop-and-code-quality
Source: https://github.com/sandeepmvl/rails-skills/tree/main/skills/58-rubocop-and-code-quality
Command: npx skills add https://github.com/sandeepmvl/rails-skills --skill rubocop-and-code-quality

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI coding agents generate Ruby and ERB code that violates Rails style conventions, disable lint cops instead of fixing issues, and miss XSS vulnerabilities in templates, leaving teams with inconsistent code quality and avoidable bugs. This Skill eliminates that friction by providing the exact setup and workflows the Rails core team uses for code quality.

Core Features & Use Cases

  • Standardized RuboCop setup: Uses the rubocop-rails-omakase preset (Rails 8 default) with optional extensions for Rails-specific, performance, RSpec, and thread-safety cops, plus clear rules for when and how to disable cops without hiding real issues.
  • CI and coverage gates: Wires RuboCop into CI with parallel runs and GitHub PR annotations, and sets up SimpleCov with branch coverage and 80% line / 70% branch thresholds to enforce meaningful test coverage.
  • Template and static analysis: Includes erb_lint configuration to catch XSS risks in ERB templates, plus optional guidance for Reek/RubyCritic code smell checks and RBS type checking for stable domain code.
  • Use Case: A Rails team that wants to stop arguing about code style, catch XSS bugs before they reach production, and ensure their AI coding agents write code that passes all quality checks out of the box.

Quick Start

Use the rubocop-and-code-quality skill to configure RuboCop with the Rails 8 omakase preset, SimpleCov coverage thresholds, and erb_lint for your Rails application.

Frequently Asked Questions about rubocop-and-code-quality

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure RuboCop for a Rails 8 application to enforce code quality?

Configure RuboCop for Rails 8 by applying the rubocop-rails-omakase preset, which provides standardized linting aligned with Rails core team conventions to eliminate inconsistent code style.

How do I catch XSS vulnerabilities in ERB templates during static analysis?

Catch XSS vulnerabilities in ERB templates by integrating erb_lint into your static analysis workflow, which identifies security risks before code reaches production.

How do I enforce SimpleCov test coverage thresholds in CI for Ruby on Rails?

Enforce test coverage in CI by setting up SimpleCov with branch coverage tracking and strict 80% line and 70% branch thresholds to ensure meaningful test coverage.

Does this code quality setup work with GitHub CI and PR annotations?

Yes, the setup wires RuboCop into CI with parallel runs and generates GitHub PR annotations to provide direct feedback on linting violations within pull requests.

What is the best way to stop AI coding agents from disabling RuboCop cops in Ruby code?

Stop AI agents from disabling cops by implementing a standardized RuboCop setup with clear rules for when and how to disable cops, preventing hidden issues in generated Ruby code.

Can I use RBS type checking alongside RuboCop for stable domain code?

Yes, you can add optional RBS type checking guidance alongside RuboCop and Reek or RubyCritic static analysis to enforce type safety for stable domain code.