agentleFS
MindrallyMindrally/skills/ruby/SKILL.md

ruby

Skill266 starsChanged 10 months agoApache-2.0View on GitHub

Ruby development guidelines covering idiomatic code style, Ruby 3.x features, testing with RSpec, and best practices for building maintainable Ruby applications.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 16 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write concise, idiomatic Ruby code with accurate examples

    line 12
  2. Distinctive:

    Use snake_case for files, methods, and variables

    line 14
  3. Distinctive:

    Use CamelCase for classes and modules

    line 15
  4. Distinctive:

    Use blocks, procs, and lambdas effectively

    line 25
  5. Distinctive:

    Follow the Ruby Style Guide

    line 30
  6. Distinctive:

    Prefer single quotes except when string interpolation is needed

    line 32
  7. Distinctive:

    Use meaningful method and variable names

    line 33
  8. Distinctive:

    Keep methods small and focused (Single Responsibility Principle)

    line 34
  9. Distinctive:

    Use custom exception classes for domain-specific errors

    line 40
  10. Distinctive:

    Use modules for shared behavior (mixins)

    line 47
  11. Distinctive:

    Keep classes focused and cohesive

    line 48
  12. Distinctive:

    Write comprehensive coverage of typical cases, edge cases, and error conditions

    line 54
  13. Distinctive:

    Use clear, descriptive naming conventions for test blocks

    line 55
  14. Very specific:

    Use let and factories (FactoryBot) instead of fixtures

    line 57
  15. Distinctive:

    Ensure test independence with minimal shared state

    line 58
  16. Distinctive:

    Use appropriate data structures

    line 78
  17. Distinctive:

    Follow security best practices for handling sensitive data

    line 87

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ruby Development

You are an expert in Ruby development, including Ruby 3.x features, testing frameworks, and modern Ruby best practices.

Code Style and Structure

  • Write concise, idiomatic Ruby code with accurate examples
  • Adhere to Ruby community conventions and style guides
  • Use snake_case for files, methods, and variables
  • Use CamelCase for classes and modules
  • Favor descriptive names like user_signed_in? and calculate_total

Ruby Language Features

  • Leverage Ruby 3.x capabilities including:
    • Pattern matching with case/in
    • Endless methods for simple one-liners
    • Keyword arguments for clarity
    • Safe navigation operator (&.)
  • Use blocks, procs, and lambdas effectively
  • Apply metaprogramming judiciously

Syntax and Formatting

  • Follow the Ruby Style Guide
  • Employ expressive syntax features
  • Prefer single quotes except when string interpolation is needed
  • Use meaningful method and variable names
  • Keep methods small and focused (Single Responsibility Principle)

Error Handling

  • Apply exceptions for genuine edge cases only
  • Implement proper logging with user-friendly messages
  • Use custom exception classes for domain-specific errors
  • Handle errors gracefully with appropriate rescue blocks

Object-Oriented Design

  • Follow SOLID principles
  • Favor composition over inheritance
  • Use modules for shared behavior (mixins)
  • Keep classes focused and cohesive

Testing Best Practices

RSpec Guidelines

  • Write comprehensive coverage of typical cases, edge cases, and error conditions
  • Use clear, descriptive naming conventions for test blocks
  • Organize logically with describe for classes/methods and context for scenarios
  • Use let and factories (FactoryBot) instead of fixtures
  • Ensure test independence with minimal shared state
  • Mock external services strategically while testing real behavior when possible

Test Structure

describe ClassName do
  describe '#method_name' do
    context 'when condition exists' do
      it 'does expected behavior' do
        expect(result).to eq(expected)
      end
    end
  end
end

Performance Optimization

  • Profile code before optimizing
  • Use appropriate data structures
  • Leverage lazy enumerators for large collections
  • Cache expensive computations

Security

  • Sanitize user input
  • Use parameterized queries
  • Keep dependencies updated
  • Follow security best practices for handling sensitive data

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.