RubyCritic Code Quality Analysis — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited RubyCritic Code Quality Analysis (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Claude Code skill for analyzing Ruby and Rails code quality using RubyCritic.
This skill integrates RubyCritic to provide comprehensive code quality analysis for Ruby and Rails projects. It helps identify code smells, complexity issues, and areas for refactoring with detailed metrics and actionable insights.
/rubycritic [path]Analyze code quality for the specified path or entire project.
Options:
path (optional): Specific file or directory to analyze. Defaults to current directory.Examples:
/rubycritic
/rubycritic app/models
/rubycritic app/controllers/users_controller.rb/rubycritic-summaryGet a quick summary of code quality metrics without detailed file breakdowns.
/rubycritic-worstShow only the worst-rated files that need immediate attention.
Options:
--limit N: Number of worst files to show (default: 10)Examples:
/rubycritic-worst
/rubycritic-worst --limit 5/rubycritic-compare [branch]Compare code quality between current branch and specified branch.
Options:
branch: Branch to compare against (default: main/master)Examples:
/rubycritic-compare main
/rubycritic-compare developScore Ranges:
Key Metrics:
The skill automatically checks for RubyCritic and installs it if needed:
gem install rubycriticCreate a .rubycritic.yml in your project root for custom settings:
# Minimum score for a file to be considered acceptable
minimum_score: 80.0
# Paths to exclude from analysis
paths:
- 'db/schema.rb'
- 'db/migrate/**/*'
- 'config/**/*'
- 'bin/**/*'
- 'spec/factories/**/*'
# Enable/disable specific analyzers
analyzers:
- flay # Structural duplication
- flog # ABC complexity
- reek # Code smells
- rubocop # Style issues (if available)
# Format for output
formats:
- console
- html
# Branch for comparison mode
branch: mainThe skill provides:
Pre-Commit Analysis:
/rubycritic $(git diff --name-only --cached | grep '\.rb$')CI/CD Integration:
Performance Considerations:
Solution: Narrow the scope
/rubycritic app/models/user.rb
/rubycritic app/controllersSolution: Configure .rubycritic.yml to exclude problematic analyzers or paths
Solution: RubyCritic uses multiple analyzers; check individual metric breakdowns
Set quality gates for your team:
# In your CI/CD pipeline
if average_score < 75
puts "Code quality below threshold!"
exit 1
endTarget specific code smells:
/rubycritic app/models --smells "LongMethod,FeatureEnvy"Compare against previous commits:
/rubycritic-compare HEAD~5RubyCritic Analysis Results
===========================
Project Score: B (82.5)
Top Issues:
1. app/models/user.rb (Score: 65.2, Grade: D)
- Long Method: #calculate_permissions (complexity: 18)
- Feature Envy: accessing order.items repeatedly
- Duplication: 3 similar conditional blocks
2. app/controllers/orders_controller.rb (Score: 71.3, Grade: C)
- Long Method: #create (complexity: 15)
- Too Many Instance Variables: 6 ivars in #index
Recommendations:
- Extract #calculate_permissions into a service object
- Use Law of Demeter for order.items access
- Refactor conditional logic in User model
- Slim down OrdersController#create methodWhen using this skill, Claude should:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.