Agent skill
ruby-patterns
Ruby development patterns including package manager detection (Bundler), project structure, and idiomatic Ruby practices. Use when writing, reviewing, or debugging Ruby code.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/ruby-patterns
SKILL.md
Ruby Development Patterns
Package Manager Detection (CRITICAL)
Before running ANY Ruby commands, detect the package manager:
| File | Package Manager | Install | Run |
|---|---|---|---|
Gemfile.lock |
Bundler | bundle install |
bundle exec |
Gemfile (no lock) |
Bundler | bundle install |
bundle exec |
| None | gem/ruby | gem install |
ruby |
NEVER use gem install directly when Gemfile exists.
Follow the existing project's Gemfile. Always use bundle exec to run commands.
Project Structure
myproject/
├── lib/ # Source code
│ ├── myproject.rb # Main entry point
│ └── myproject/ # Namespace directory
│ ├── cli.rb
│ └── core.rb
├── spec/ # RSpec tests (preferred)
│ ├── spec_helper.rb
│ └── myproject/
│ └── core_spec.rb
├── bin/ # Executables
├── Gemfile
├── Gemfile.lock
├── Rakefile
└── Makefile
CLI Structure
Three-layer separation (same principle as Python).
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?