Claude RubyCritic Skill automates Ruby code quality analysis. It benefits developers and operations teams by integrating RubyCritic into Claude Code workflows. The skill connects to Ruby projects and CI/CD pipelines, providing static analysis and code quality metrics.
git clone https://github.com/esparkman/claude-rubycritic-skill.gitThe Claude RubyCritic Skill integrates RubyCritic directly into Claude Code workflows, enabling developers to analyze Ruby and Rails projects for code quality metrics without leaving their editor. The skill automatically detects when code quality analysis is needed and provides detailed breakdowns of complexity, duplication, and code smells across files and directories. It supports multiple analysis types including full project analysis, targeted path inspection, worst-files prioritization, and branch comparisons to track quality changes over time. Rails-aware guidance helps developers understand issues in models, controllers, services, and concerns. By grading code on a scale from A (90-100) to F (<60), the skill helps teams identify high-impact refactoring opportunities and maintain quality standards throughout development.
Install via Claude Code's plugin system with `/plugin install rubycritic-skill@rubycritic-skill` and ensure RubyCritic is installed via `gem install rubycritic`. Navigate to your Ruby project in Claude Code and ask Claude naturally—for example, 'Analyze the code quality of this project' or 'Show me the 5 worst files.' Claude automatically invokes RubyCritic and provides actionable insights based on the results.
Analyze entire Ruby projects or specific directories for code quality metrics
Identify worst-performing files that need immediate refactoring attention
Compare code quality between branches to track improvements or regressions
Run pre-commit quality checks before staging changes
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/esparkman/claude-rubycritic-skillCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Analyze the following Ruby code using RubyCritic and provide a detailed report. The code is from [COMPANY]'s [PROJECT_NAME] in the [INDUSTRY] sector. Focus on complexity, duplication, and documentation issues. Format the output with clear sections and actionable recommendations.
# RubyCritic Analysis Report ## Project Overview - **Project Name**: [PROJECT_NAME] - **Industry**: [INDUSTRY] - **Company**: [COMPANY] ## Code Quality Metrics - **Complexity**: High (Average cyclomatic complexity: 8.2) - **Duplication**: Moderate (12.3% of code is duplicated) - **Documentation**: Incomplete (Only 45% of methods are documented) ## Key Findings ### High Complexity Areas - `app/controllers/api_controller.rb` has a cyclomatic complexity of 15 - `app/services/payment_processor.rb` has multiple nested conditionals ### Duplication Issues - Similar code patterns found in `app/models/user.rb` and `app/models/admin.rb` - Repeated validation logic in multiple model files ### Documentation Gaps - Critical methods in `app/lib/encryption.rb` lack documentation - No module-level documentation for `app/lib/reporting` ## Recommendations 1. Refactor `api_controller.rb` to reduce complexity 2. Extract common validation logic into a concern or module 3. Add documentation for all public methods and modules 4. Consider using RubyCritic's autogenerated documentation for quick improvements
AI assistant built for thoughtful, nuanced conversation
Marketing automation and CRM for SMBs
No-code SaaS integration and data sync
Autonomous drone operations powered by AI
Fast and reliable CNC machining services.
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan