rubycritic

Analyze Ruby code with RubyCritic to detect smells and complexity.

12|2|Updated Mar 11, 2025
One-click install
npx skills add https://github.com/el-feo/ai-context --skill rubycritic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rubycritic
Source: https://github.com/el-feo/ai-context/tree/main/skills/rubycritic
Command: npx skills add https://github.com/el-feo/ai-context --skill rubycritic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires rubycritic, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Ruby projects can accumulate technical debt, code smells, and complexity, leading to slower development and higher maintenance costs. This skill automates the detection of these issues, ensuring your Ruby codebase remains clean and maintainable without manual, time-consuming reviews.

Core Features & Use Cases

  • Automated Code Analysis: Integrates RubyCritic to scan Ruby code for smells, complexity, and duplication, providing a comprehensive quality overview.
  • Actionable Feedback: Delivers overall quality scores, file ratings (A-F), and specific issue types with clear guidance for improvement, helping you prioritize refactoring efforts.
  • CI/CD & Git Hooks: Seamlessly integrates into your development workflow, running quality checks automatically on commits or pull requests to prevent new technical debt from being introduced.

Quick Start

Run a quality check on all Ruby files in the current directory to get an immediate assessment of your codebase.

Frequently Asked Questions about rubycritic

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

FAQPage Schema
How do I detect code quality issues in my Ruby project?

Detect code quality issues by running RubyCritic to analyze Ruby files for smells, complexity, and duplication. RubyCritic scans your codebase and delivers an overall quality score, file-level ratings (A–F), and specific issue types with improvement guidance to help you prioritize refactoring.

Can I integrate code quality checks into my CI/CD pipeline?

Yes. RubyCritic integrates seamlessly into CI/CD workflows and Git hooks, running automated quality checks on commits or pull requests. This prevents new technical debt from being introduced and keeps your Ruby codebase maintainable without manual reviews.

What does RubyCritic actually analyze in Ruby code?

RubyCritic analyzes Ruby code for code smells, cyclomatic complexity, and duplication. It provides actionable feedback including overall quality scores and file ratings, helping you identify areas where refactoring reduces technical debt and improves maintainability.

How do I use RubyCritic to refactor Ruby files systematically?

Run a quality check on your Ruby files to receive an immediate assessment with file-level ratings and specific issue types. Use the detailed feedback to prioritize refactoring efforts, addressing high-impact smells and complexity first to reduce technical debt.

Can I run code quality analysis on demand for Ruby projects?

Yes. RubyCritic supports on-demand CLI analysis of Ruby projects during development tasks such as creating, editing, or reviewing Ruby files. Run it anytime to get a comprehensive quality overview and detect issues before they accumulate into technical debt.

What's the difference between preventing code smells and refactoring existing code?

RubyCritic prevents technical debt by detecting smells early through automated analysis on commits or pull requests, stopping issues before merge. For existing code, it identifies refactoring priorities, helping you systematically reduce complexity and duplication in your Ruby codebase.