| name | rbspy |
| description | Use this skill when the user wants to profile Ruby CPU usage — sample a running process, record stack traces, or generate flamegraphs without modifying the Ruby app. |
rbspy Plugin
Sampling CPU profiler for Ruby. Attaches to running Ruby processes (MRI, JRuby, TruffleRuby) and records stack samples with minimal overhead — ideal for production flamegraphs and call-graph analysis.
Installation
curl -L https://raw.githubusercontent.com/rbspy/rbspy/main/install.sh | sh
cargo install rbspy
Basic Usage
rbspy record --pid 12345 --duration 30
rbspy record -- ruby my_app.rb
rbspy top --pid 12345
rbspy record --format flamegraph --output profile.svg -- ruby server.rb
Common Patterns
rbspy record --duration 60 --file profile.gz --pid $(pgrep -f puma)
rbspy record --rate 100 -- bundle exec rails server
rbspy --version
Usage Examples
- "Profile my Rails server and find slow methods"
- "Generate a flamegraph for this Ruby worker"
- "See which methods use the most CPU in PID 9999"
SuperCLI
sc rbspy _ _ record --pid 12345 --duration 30
sc rbspy _ _ top --pid 12345
sc plugins learn rbspy