Agent Skills: Community Ruby Best Practices

Ruby performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring Ruby code to ensure optimal performance patterns. Triggers on tasks involving object allocation, collection processing, ActiveRecord queries, string handling, concurrency, or Ruby runtime configuration.

UncategorizedID: pproenca/dot-skills/ruby-optimise

Install this agent skill to your local

pnpm dlx add-skill https://github.com/pproenca/dot-skills/tree/HEAD/skills/.curated/ruby-optimise

Skill Files

Browse the full folder contents for ruby-optimise.

Download Skill

Loading file tree…

skills/.curated/ruby-optimise/SKILL.md

Skill Metadata

Name
ruby-optimise
Description
Ruby performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring Ruby code to ensure optimal performance patterns. Triggers on tasks involving object allocation, collection processing, ActiveRecord queries, string handling, concurrency, or Ruby runtime configuration.

Community Ruby Best Practices

Comprehensive performance optimization guide for Ruby applications, maintained by the community. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new Ruby code or gems
  • Optimizing ActiveRecord queries and database access patterns
  • Processing large collections or building data pipelines
  • Reviewing code for memory bloat and GC pressure
  • Configuring Ruby runtime settings for production

Rule Categories by Priority

| Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Object Allocation | CRITICAL | alloc- | | 2 | Collection & Enumeration | CRITICAL | enum- | | 3 | I/O & Database | HIGH | io- | | 4 | String Handling | HIGH | str- | | 5 | Method & Dispatch | MEDIUM-HIGH | meth- | | 6 | Data Structures | MEDIUM | ds- | | 7 | Concurrency | MEDIUM | conc- | | 8 | Runtime & Configuration | LOW-MEDIUM | runtime- |

Quick Reference

1. Object Allocation (CRITICAL)

2. Collection & Enumeration (CRITICAL)

3. I/O & Database (HIGH)

4. String Handling (HIGH)

5. Method & Dispatch (MEDIUM-HIGH)

6. Data Structures (MEDIUM)

7. Concurrency (MEDIUM)

8. Runtime & Configuration (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

| File | Description | |------|-------------| | references/_sections.md | Category definitions and ordering | | assets/templates/_template.md | Template for new rules | | metadata.json | Version and reference information |