Language-specific super-code guidelines for ruby. An agent skill from majiayu000/claude-skill-registry.

MITAuto-check passed

Install Ruby

skills CLI
$ npx skills add majiayu000/claude-skill-registry --skill ruby -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/claude-skill-registry ruby --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/claude-skill-registry.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agent/ruby .claude/skills/ruby && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ruby
GitHub stars
666
Used in
2 other repos
Token cost
~1.5k tokens
SKILL.md length
188 words
Files
2
Skills in repo
971
Repo updated
First seen
Licence
MIT

At a glance

Language-specific super-code guidelines for ruby. An agent skill from majiayu000/claude-skill-registry.

  • Works in 7 steps: Enumerable & Collections {#enumerable} → Blocks, Procs & Lambdas {#blocks} → String Handling {#strings} → …
  • SKILL.md covers When to Use, Table of Contents, 1. Enumerable & Collections… and 2. Blocks, Procs & Lambdas…, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Ruby is an agent skill from majiayu000/claude-skill-registry. Language-specific super-code guidelines for ruby.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `metadata.json`).

It works with Ruby. The repository describes itself as: Searchable Claude Code skills catalog with source-linked guides and generated registry artifacts. The licence is MIT.

Example prompts

  • “/ruby”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Enumerable & Collections {#enumerable}
  2. Blocks, Procs & Lambdas {#blocks}
  3. String Handling {#strings}
  4. Error Handling {#errors}
  5. Classes & Modules {#classes}
  6. Ruby Idioms {#idioms}
  7. Anti-patterns specific to Ruby {#antipatterns}

What it can do on your machine

Read from SKILL.md and the folder at commit 000116a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are ruby).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ruby loads about 1.5k tokens when it runs. Until then it costs about 14 tokens; SKILL.md has 188 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~14
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/claude-skill-registry at commit 000116a, republished under its MIT licence (© majiayu000). 188 words, ~1,540 tokens.

Download SKILL.mdSave it as .claude/skills/ruby/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ruby
description
Language-specific super-code guidelines for ruby.
category
engineering-core
source_repo
sickn33/agentic-awesome-skills
source_path
skills/super-code/ruby/SKILL.md
source_url
https://github.com/sickn33/agentic-awesome-skills/blob/HEAD/skills/super-code/ruby/SKILL.md

Ruby: Idiomatic Efficiency Reference

When to Use

  • Use this skill when the task matches this description: Language-specific super-code guidelines for ruby.

Table of Contents

  1. Enumerable & Collections
  2. Blocks, Procs & Lambdas
  3. String Handling
  4. Error Handling
  5. Classes & Modules
  6. Ruby Idioms
  7. Anti-patterns specific to Ruby

1. Enumerable & Collections {#enumerable}

ruby
# ❌ Manual accumulation
result = []
items.each do |item|
  result << item.name.upcase if item.active?
end

# ✅
result = items.select(&:active?).map { |i| i.name.upcase }
ruby
# ❌ Manual grouping
grouped = {}
items.each do |item|
  grouped[item.category] ||= []
  grouped[item.category] << item
end

# ✅
grouped = items.group_by(&:category)
ruby
# ❌ Manual sum
total = 0
orders.each { |o| total += o.amount }

# ✅
total = orders.sum(&:amount)
ruby
# ❌ Checking existence then accessing
if hash.key?(key)
  value = hash[key]
end

# ✅
value = hash[key] # returns nil if missing
# or with default:
value = hash.fetch(key, default_value)
# or raising on missing:
value = hash.fetch(key) # raises KeyError

Prefer map/select/reject/sum over manual loops. Use &:method for single-method blocks.


2. Blocks, Procs & Lambdas {#blocks}

ruby
# ❌ Explicit block-to-proc conversion when unnecessary
items.map { |item| item.to_s }

# ✅
items.map(&:to_s)
ruby
# ❌ Proc.new when lambda is safer (arity check + return behavior)
handler = Proc.new { |x| x * 2 }

# ✅
handler = ->(x) { x * 2 }
ruby
# ❌ Multi-line block with { }
items.map { |item|
  result = transform(item)
  validate(result)
  result
}

# ✅ — do/end for multi-line, { } for single-line
items.map do |item|
  result = transform(item)
  validate(result)
  result
end

3. String Handling {#strings}

ruby
# ❌ String concatenation in loop
result = ""
items.each { |i| result += i.name + ", " }

# ✅
result = items.map(&:name).join(", ")
ruby
# ❌ String concatenation for assembly
greeting = "Hello, " + name + "! You have " + count.to_s + " messages."

# ✅
greeting = "Hello, #{name}! You have #{count} messages."
ruby
# ❌ Mutable string where frozen is fine (Ruby 3+ encourages frozen)
SEPARATOR = ", "

# ✅
SEPARATOR = ", ".freeze
# or add `# frozen_string_literal: true` at file top

Use heredocs (<<~HEREDOC) for multi-line strings. <<~ strips indentation.


4. Error Handling {#errors}

ruby
# ❌ Rescuing Exception (catches EVERYTHING including SignalException, SystemExit)
begin
  risky
rescue Exception => e
  log(e)
end

# ✅ — rescue StandardError (the default)
begin
  risky
rescue StandardError => e
  log(e)
  raise
end
# or just: rescue => e (same as StandardError)
ruby
# ❌ Using rescue as flow control
begin
  value = hash.fetch(key)
rescue KeyError
  value = default
end

# ✅
value = hash.fetch(key, default)
ruby
# ❌ Inline rescue hiding errors
result = dangerous_operation rescue nil

# ✅ — inline rescue only for truly trivial fallbacks
result = Integer(input) rescue nil  # acceptable for parsing

5. Classes & Modules {#classes}

ruby
# ❌ Manual accessors
class User
  def name
    @name
  end
  def name=(value)
    @name = value
  end
end

# ✅
class User
  attr_accessor :name
end
ruby
# ❌ Deep inheritance for shared behavior
class Animal; end
class Pet < Animal; end
class Dog < Pet; end

# ✅ — mixins for shared behavior, inheritance for "is-a"
module Trainable
  def train = puts("Training #{name}")
end

class Dog
  include Trainable
  attr_reader :name
  def initialize(name) = @name = name
end
ruby
# ❌ Class with only class methods (namespace via class)
class MathUtils
  def self.square(x) = x * x
  def self.cube(x) = x ** 3
end

# ✅
module MathUtils
  module_function
  def square(x) = x * x
  def cube(x) = x ** 3
end

6. Ruby Idioms {#idioms}

ruby
# ❌ Explicit boolean return
def active?
  if status == :active
    true
  else
    false
  end
end

# ✅
def active? = status == :active
ruby
# ❌ nil check before method call
if user && user.name
  puts user.name
end

# ✅ (Ruby 2.3+)
puts user&.name if user&.name
# or with safe navigation:
user&.name&.then { |n| puts n }
ruby
# ❌ Conditional assignment verbosely
if @cache.nil?
  @cache = expensive_compute
end

# ✅
@cache ||= expensive_compute
ruby
# ❌ Multiple assignment from array manually
first = arr[0]
second = arr[1]

# ✅
first, second = arr

7. Anti-patterns specific to Ruby {#antipatterns}

Anti-patternPreferred
rescue Exceptionrescue StandardError
for x in collectioncollection.each
Manual attr_reader/writerattr_accessor / attr_reader
class for pure namespacemodule
String concatenation with +string interpolation #{}
if !conditionunless condition
== true / == falsetruthy/falsy check directly
and/or for control flow&&/`
return at end of methodimplicit return (last expression)
Monkey-patching core classes in productionrefinements or wrapper
eval / send for known methodsdirect method call

Limitations

  • These are language-specific guidelines and do not cover overall architectural decisions.
  • Over-compression might reduce readability; apply judgement.

Source: sickn33/agentic-awesome-skills → skills/super-code/ruby/SKILL.md

Also appears in: sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/super-code/ruby/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/super-code/ruby/SKILL.md

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/agent/ruby of majiayu000/claude-skill-registry.

  • SKILL.md
  • metadata.json

Open the folder on GitHubat commit 000116a

Used in 2 other repositories

We found 6 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in majiayu000/claude-skill-registry, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Ruby next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ruby compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ruby this skillmajiayu000/claude-skill-registry6662 repos~1.5kAutomated safety check: PassMIT
Gumroad Prod Consoleantiwork/gumroad9.8k—~2.9kAutomated safety check: NotesMIT
Fastlane Pull Request Reviewfastlane/fastlane42k—~550Automated safety check: PassMIT
Antipattern Preventiondoorkeeper-gem/doorkeeper5.5k—~1.1kAutomated safety check: PassMIT
Mutantmbj/mutant2.2k—~2kAutomated safety check: PassProprietary
Evaluating Pegslineofflight/frankfurter2k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Gumroad Prod Console

    antiwork/gumroad

    Execute read-only Ruby/Rails commands against Gumroad's production database for debugging and investigation.

    9.8k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check: notes
  • Reviews a fastlane pull request against its linked issue and the project guides, separating blocking from non-blocking findings and handling vulnerabilities privately.

    42k GitHub stars~550 tokensUpdated today
    DevelopmentAuto-check passed
  • Antipattern Prevention

    doorkeeper-gem/doorkeeper

    Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.

    5.5k GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Mutant

    mbj/mutant

    Run mutant, read mutation reports, fix alive mutations, and verify coverage.

    2.2k GitHub stars~2k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Evaluating Pegs

    lineofflight/frankfurter

    A skill your agent uses when adding, evaluating, or removing an entry in db/seeds/pegs/, when the user mentions a pegged or fixed currency, or when an issue suggests we should "pin" or "lock" a…

    2k GitHub stars~1.6k tokensUpdated 5 days ago
    Auto-check passed
  • Swig CI Repro

    swig/swig

    Reproduce a GitHub Actions Linux CI failure locally when it does not happen on your machine: a podman/docker image that mirrors the ubuntu-22.04 runner by reusing the real Tools/CI-linux-.sh install…

    6.3k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check passed

More from majiayu000/claude-skill-registry

All 971 skills in this repo
  • Deep Research

    majiayu000/claude-skill-registry

    Multi-source deep research using firecrawl and exa MCPs. An agent skill from majiayu000/claude-skill-registry.

    666 GitHub starsUsed in 6 repos~1.1k tokens
    Auto-check passed
  • Exa Search

    majiayu000/claude-skill-registry

    Neural search via Exa MCP for web, code, and company research.

    666 GitHub starsUsed in 5 repos~856 tokens
    Auto-check passed
  • Fal AI Media

    majiayu000/claude-skill-registry

    Unified media generation via fal.ai MCP — image, video, and audio.

    666 GitHub starsUsed in 5 repos~1.7k tokens
    Auto-check passed
  • Bgpt Paper Search

    majiayu000/claude-skill-registry

    Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server.

    666 GitHub starsUsed in 4 repos~619 tokens
    Auto-check: notes
  • Bio Alignment Pairwise

    majiayu000/claude-skill-registry

    Perform pairwise sequence alignment using Biopython Bio.Align.PairwiseAligner.

    666 GitHub starsUsed in 4 repos~1.7k tokens
    Auto-check passed
  • Open Notebook

    majiayu000/claude-skill-registry

    Self-hosted, open-source alternative to Google NotebookLM for AI-powered research and document analysis.

    666 GitHub starsUsed in 4 repos~2.4k tokens
    Auto-check passed

Works with

Questions about Ruby

What does Ruby do?

Language-specific super-code guidelines for ruby. An agent skill from majiayu000/claude-skill-registry. Ruby is an agent skill from majiayu000/claude-skill-registry. Language-specific super-code guidelines for ruby.

How do I install Ruby in Claude Code?

Run `npx skills add majiayu000/claude-skill-registry --skill ruby -a claude-code`. Or copy the skill folder (skills/agent/ruby in majiayu000/claude-skill-registry) into .claude/skills/ruby in your project. Claude Code loads it when a task matches its description.

How do I install Ruby in Codex?

Run `npx skills add majiayu000/claude-skill-registry --skill ruby -a codex`. Or copy the skill folder (skills/agent/ruby in majiayu000/claude-skill-registry) into .agents/skills/ruby in your project. Codex loads it when a task matches its description.

Can I use Ruby in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/claude-skill-registry --skill ruby -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ruby, .gemini/skills/ruby, .github/skills/ruby and .opencode/skills/ruby in your project.

What does Ruby need to run?

SKILL.md names no scripts, command-line tools or credentials: Ruby is instructions for the agent only.

Does Ruby access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Ruby safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ruby use?

Ruby is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ruby use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ruby?

Skills that share tags, products or a category with Ruby: Gumroad Prod Console (antiwork/gumroad, 9.8k stars), Fastlane Pull Request Review (fastlane/fastlane, 42k stars), Antipattern Prevention (doorkeeper-gem/doorkeeper, 5.5k stars) and Mutant (mbj/mutant, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ruby?

majiayu000 (a GitHub user) maintains it in majiayu000/claude-skill-registry, which has 666 GitHub stars. The repository holds 971 skills in this directory. The repository was last updated on October 7, 2026.

Source: majiayu000/claude-skill-registry on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.