ruby-conventions

Solid

Ruby code conventions covering Ruby 3.2+, RuboCop, RBS type checking, RSpec/Minitest, security scanning, exception handling, composition, Bundler, and gem packaging. Load when writing or reviewing Ruby code.

Data & Documents 137 stars 13 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
53
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

- Ruby 3.2+, `frozen_string_literal: true`, `.ruby-version` file. - Linting: a linter/formatter (e.g., RuboCop) with auto-fix (120 char max), plus its RSpec/performance plugins. - Type checking: RBS with a type checker (e.g., steep). Use `rbs prototype` for scaffolding type signatures. - Testing: RSpec (or Minitest) with `describe`/`context`/`it`, factories over fixtures, a coverage tool (e.g., SimpleCov) at 80%+. - Security: a SAST tool (e.g., Brakeman for Rails), `bundler-audit` for dependency CVE scanning. - Error handling: specific exceptions inheriting `StandardError`, no bare `rescue`. - Composition over inheritance, `Comparable`/`Enumerable` mixins, `case/in` pattern matching. - Dependencies: `bundler`, commit `Gemfile.lock`, pessimistic `~>` constraints. - Gem packaging: use `gemspec` with `bundler` gem template, `rake release` for distribution. - `&:method_name` block shorthand, `=>` pattern matching destructuring (3.2+). - Anti-patterns: monkey patching, `method_missing` without `respond_to_missing?`, `eval` with user input.

Details

Author
Goldziher
Repository
Goldziher/ai-rulez
Created
1 years ago
Last Updated
today
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Listed

language-ruby

Ruby idioms — Ruby 3.x pattern matching, blocks, procs, lambdas, Enumerable, Comparable, frozen string literals, error handling, and testing. Auto-load when working with .rb files, Gemfile, Rakefile, gemspecs, or when the user mentions Ruby, Bundler, RSpec, minitest, blocks, procs, lambdas, or pattern matching.

2 Updated today
lugassawan
Testing & QA Listed

ruby

Core Ruby language best-practices skill (Ruby 3.3/4.0) covering syntax and types, collections/Enumerable, blocks/procs/lambdas, OOP and modules, metaprogramming, Bundler/gems, testing (RSpec/Minitest), style/typing tooling (RuboCop, RBS, Steep, ruby-lsp), and performance/debugging. Use when the user mentions Ruby, gem, Bundler, Gemfile, RSpec, Minitest, RuboCop, irb, pry, blocks, procs, lambdas, mixins, or module/metaprogramming patterns that are not specific to a framework. For Ruby on Rails framework-specific questions (Active Record, routing, Action View, etc.), see the sibling `ruby-on-rails` skill instead.

2 Updated 2 weeks ago
display-design-studio
AI & Automation Listed

sota-ruby

State-of-the-art Ruby engineering rules (2026 baseline, Ruby 3.4+ / 4.0) that Claude applies when writing or auditing Ruby. Covers modern idioms (frozen string literals, pattern matching, Data/Struct, RBS/Sorbet/Steep typing), security (SQL injection via ActiveRecord/Sequel, ERB/XSS escaping, mass assignment, CSRF, Marshal/YAML deserialization, command injection, ReDoS), framework-neutral web hardening (Rails/Sinatra/Hanami as neutral examples), supply chain and tooling (Bundler lockfile and checksums, bundler-audit, RuboCop/StandardRB, Brakeman, RSpec/Minitest, CI gates), and concurrency/performance (GVL, threads vs fibers vs Ractors, background-job idempotency, YJIT/ZJIT, GC and memory, N+1 queries). Trigger keywords: Ruby, gem, Gemfile, bundler, Rails, Sinatra, Hanami, Rack, ERB, ActiveRecord, Sequel, RSpec, minitest, RuboCop, Sorbet, RBS, Sidekiq, YJIT, Ractor, rake, ruby-lang. Use for BOTH building Ruby services/gems/CLIs and reviewing or auditing Ruby codebases.

15 Updated today
martinholovsky