Back to list
acaloiaro

ruby-code-style

by acaloiaro

My NixOS system configuration

2🍴 0📅 Jan 23, 2026

SKILL.md


name: ruby-code-style description: Ruby coding conventions and style preferences for the Greenhouse codebase. Use when writing or reviewing Ruby code, writing RSpec tests, refactoring Ruby code, or setting up new Ruby files.

Ruby Code Style

Hash Syntax

Use Ruby 3 style hashes with implicit values when a variable in scope matches the key name:

  • Preferred: { organization_id: }
  • Avoid: { organization_id: organization_id }

Apply this to method arguments:

  • Preferred: create(:person, organization:)
  • Avoid: create(:person, organization: organization)

Method Definitions

For one-line methods, use shorthand syntax:

def method_name = some-operation

For simple blocks, use the implicit it variable:

models.map { do_this_with(it) }

RSpec Conventions

Prefer subject(:variable_name) { ... } over let(:variable_name) { ... } when the variable represents the primary subject being tested (typically described_class.new).

Magic Comments

Order magic comments correctly:

# frozen_string_literal: true
# typed: true

The # typed: true comment must always come AFTER # frozen_string_literal: true.

Naming Conventions

Use the suffix _RE for regular expression constants:

  • Preferred: MAILTO_RE
  • Avoid: MAILTO_REGEX

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon