From majestic-rails
Debugs Rails errors, test failures, build issues, or unexpected behavior. Analyzes stack traces, reproduces in console, checks logs/migrations/git changes, detects N+1 queries, and suggests fixes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/majestic-rails:rails-debuggerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
```bash
tail -100 log/development.log
bundle exec rspec --format documentation
bin/rails db:migrate:status
Identify the origin:
app/ directoryCommon patterns:
| Error | Likely Cause |
|---|---|
NoMethodError: undefined method for nil:NilClass | Missing association, nil return |
ActiveRecord::RecordNotFound | ID doesn't exist, scoping issue |
ActiveRecord::RecordInvalid | Validation failed |
ActionController::ParameterMissing | Required param not sent |
NameError: uninitialized constant | Missing require, typo |
LoadError | File not found, autoload path issue |
Database:
bin/rails db:migrate:status
bin/rails db:schema:dump
Dependencies:
bundle check
bundle install
Reproduce in console:
user = User.find(123)
user.some_method # Does it fail here?
Binary search:
git log --oneline -20
git log -p --follow app/models/user.rb
git diff HEAD~5 app/models/user.rb
Rails.logger.debug { "DEBUG: user=#{user.inspect}" }
binding.irb # Pause here (Rails 7+)
grep "SELECT" log/development.log | sort | uniq -c | sort -rn
Fix: User.includes(:posts)
bin/rails routes | grep users
bin/rails routes -c users
User._create_callbacks.map(&:filter)
User._save_callbacks.map(&:filter)
| Status | Meaning |
|---|---|
| Confirmed Bug | Reproduced with clear deviation |
| Cannot Reproduce | Unable to reproduce |
| Not a Bug | Behavior is correct per spec |
| Data Issue | Problem with specific data |
npx claudepluginhub majesticlabs-dev/majestic-marketplace --plugin majestic-railsProvides Rails debugging tools like logs, console, byebug, SQL logging, routes within 4-phase systematic process for root cause analysis and fixes.
Applies systematic root-cause analysis to debug errors, test failures, and unexpected behavior across frontend, backend, database, network, and performance.
Investigates Rails production errors via the Faultline MCP server. Fetches error groups, full occurrences with backtraces and locals, and APM traces to diagnose exceptions and slow endpoints.