What problem does it solve?
This Skill helps developers identify and resolve performance issues in Ruby on Rails applications, including N+1 queries, slow requests, excessive memory usage, and missing or suboptimal indexes. It guides code inspection, log and trace analysis, and profiling to find root causes and propose actionable fixes.
Core Features & Use Cases
- N+1 detection and eager-loading fixes: Trace association access paths, find missing includes/preload/eager_load, and recommend the appropriate loading strategy.
- Memory and batch processing analysis: Detect large dataset instantiations, recommend find_each/in_batches, pluck optimizations, and streaming solutions for exports.
- Request and production profiling guidance: Suggest rack-mini-profiler, Bullet, ActiveSupport::Notifications, and APM trace checks, and outline verification steps.
- Index and query plan recommendations: Read schema files or structure SQL, identify missing or redundant indexes, and craft migration examples with verification steps.
- GraphQL-aware diagnostics: Check for DataLoader/BatchLoader patterns and recommend loader implementations to avoid resolver N+1s.
Quick Start
Ask the rails:debug skill to analyze a slow controller action or log excerpt and propose specific eager loading, indexing, and profiling steps to verify the fix.