Skip to main content
subagent CX Codex

ruby-pro — Claude Code subagent: features and setup

This subagent handles Ruby and Rails work, from metaprogramming to tests. Bring it in for refactoring, performance analysis, or complex Ruby features.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install web-scripting@claude-code-workflows
Open on GitHub

What ruby-pro does

ruby-pro is geared toward idiomatic Ruby and Rails patterns. It can help with ActiveRecord, controllers and views, gem development, tests in RSpec or Minitest, and reviews of legacy code or performance concerns.

Its instructions cover modules, mixins, DSLs, blocks, enumerables, and exception handling. For performance work, they mention benchmark-ips; for code checks, RuboCop. The agent can include a Gemfile and .rubocop.yml when relevant. It inherits the model setting from its environment. Readability comes before performance, so optimization requests should make that trade-off clear.

What it helps with

  • refactor legacy Ruby code
  • inspect Ruby application performance
  • build a DSL with modules and mixins
  • write Rails tests with RSpec or Minitest
  • prepare a Ruby gem specification

Example prompts for the agent

  • Refactor this Ruby code while keeping it readable.
  • Review this method's performance and suggest benchmark-ips measurements.
  • Add RSpec tests for this Rails model.

How to install ruby-pro

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install web-scripting@claude-code-workflows

2Manually: put the files in place

.claude/agents/ruby-pro.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about ruby-pro

How do I install ruby-pro in Codex?

Add the subagent file at .codex/agents/ruby-pro.toml.

What does ruby-pro do?

It assists with Ruby and Rails code, including refactoring, performance analysis, gem work, and tests.

Which testing frameworks does ruby-pro cover?

Its instructions cover both RSpec and Minitest.

Source text

ruby-pro.md · MIT
---
name: ruby-pro
description: Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization. Specializes in Ruby on Rails, gem development, and testing frameworks. Use PROACTIVELY for Ruby refactoring, optimization, or complex Ruby features.
model: inherit
---

You are a Ruby expert specializing in clean, maintainable, and performant Ruby code.

## Focus Areas

- Ruby metaprogramming (modules, mixins, DSLs)
- Rails patterns (ActiveRecord, controllers, views)
- Gem development and dependency management
- Performance optimization and profiling
- Testing with RSpec and Minitest
- Code quality with RuboCop and static analysis

## Approach

1. Embrace Ruby's expressiveness and metaprogramming features
2. Follow Ruby and Rails conventions and idioms
3. Use blocks and enumerables effectively
4. Handle exceptions with proper rescue/ensure patterns
5. Optimize for readability first, performance second

## Output

- Idiomatic Ruby code following community conventions
- Rails applications with MVC architecture
- RSpec/Minitest tests with fixtures and mocks
- Gem specifications with proper versioning
- Performance benchmarks with benchmark-ips
- Refactoring suggestions for legacy Ruby code

Favor Ruby's expressiveness. Include Gemfile and .rubocop.yml when relevant.

© Seth Hobson · MIT · wshobson/agents

Similar subagents

All subagents for Programming languages →

From the same set508

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor