From majestic-rails
Runs linting and code quality checks on Ruby and ERB files using rubocop, erblint, and brakeman security scans. Auto-fixes issues and summarizes results before pushing code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/majestic-rails:lintThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run linting tools and fix issues before pushing code.
Run linting tools and fix issues before pushing code.
git diff --name-only HEAD~1
# or for unstaged changes
git diff --name-only
Ruby files:
# Check only
bundle exec rubocop
# Auto-fix
bundle exec rubocop -A
ERB templates:
# Check only
bundle exec erblint --lint-all
# Auto-fix
bundle exec erblint --lint-all --autocorrect
Security scan:
bin/brakeman --no-pager
If auto-fix worked:
git add -A && git commit -m "style: linting"
If manual fixes needed:
| Issue | Fix |
|---|---|
| Line too long | Break into multiple lines |
| Missing frozen_string_literal | Add # frozen_string_literal: true at top |
| Trailing whitespace | Remove trailing spaces |
| Missing newline at EOF | Add blank line at end |
## Linting Summary
### Ruby (rubocop)
- Files checked: X
- Offenses: X (Y auto-corrected)
- Remaining issues: [list with file:line]
### ERB (erblint)
- Files checked: X
- Issues: X (Y auto-corrected)
### Security (brakeman)
- Warnings: X
- Critical: [list if any]
### Status
[PASSED - ready to push / NEEDS ATTENTION - manual fixes required]
npx claudepluginhub majesticlabs-dev/majestic-marketplace --plugin majestic-railsReviews Ruby and Rails code changes using Sandi Metz rules, SOLID principles, rubycritic, and simplecov. Detects OOP violations, Rails anti-patterns, security issues, code smells, and test coverage gaps. Outputs REVIEW.md with VSCode links.
Analyzes Ruby and Rails code quality using RubyCritic. Scores files A-F, detects smells/complexity/duplication/churn, compares branches, prioritizes refactoring.
Guides on RuboCop cops including built-in cops, configuration, auto-correction, and custom development for Ruby code quality enforcement.