language-ruby

language-ruby is a skill for Claude Code from lugassawan/swe-workbench. It costs 65 tokens per session (1,051 once invoked), scanned A, original, MIT.

A Ruby coding guide covering Ruby 3.x syntax, pattern matching, blocks, procs, lambdas, and error handling. It loads when you work on Ruby files or projects.

In plain words
What is it for?
Use it when writing or reviewing Ruby methods, pattern-matching code, callbacks, locks, or project configuration.
Why use it?
It helps keep Ruby code idiomatic and avoids confusing choices around callbacks, control flow, and resource cleanup.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the swe-workbench plugin — 60 skills, 25 commands, 22 agents, 4 hooks shipped together

Good fit Use it when writing or reviewing Ruby methods, pattern-matching code, callbacks, locks, or project configuration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lugassawan/swe-workbench/language-ruby
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add lugassawan/swe-workbench --skill language-ruby
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

Made for: Claude Code.

Or install swe-workbench, the plugin that ships this one along with the rest of its 60 skills, 25 commands, 22 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for language-ruby

README.md
[![agentmods](https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-ruby.svg)](https://agentmods.dev/skills/lugassawan/swe-workbench/language-ruby)
Your own site
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/language-ruby"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-ruby.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,051 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.01051
Opus 5 $0.00032 $0.00526
Sonnet 5 $0.00013 $0.00210
Haiku 4.5 $0.00006 $0.00105

Measured 3d ago against content hash 636d97c7d3b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

language-ruby scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/language-ruby/SKILL.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ruby

Ruby 3.x syntax

  • Use pattern matching for structural dispatch on hashes, arrays, and domain data; avoid using it as a verbose if/elsif.
  • Prefer endless methods only for tiny, obvious expressions. Multi-step behavior deserves a normal def.
  • Hash shorthand ({name:, email:}) is clear when local names match keys; use explicit pairs when transformation happens.
  • Use Ractor for isolated parallelism only when its object-sharing constraints fit better than threads or processes.
case payload
in {type: "user_created", id:, email:}
  create_user(id:, email:)
in {type: "user_deleted", id:}
  delete_user(id)
else
  raise ArgumentError, "unknown payload"
end

def active? = status == "active"

Blocks, procs, and lambdas

  • Blocks are the default for one-off callbacks and iteration; yield when the method owns the flow.
  • Proc is lenient about arity and return; use it for flexible callbacks only when that behavior is intentional.
  • Lambdas behave like methods for arity and return locally. Prefer them for stored callable behavior.
def with_lock(lock)
  lock.acquire
  yield
ensure
  lock.release
end

normalize = ->(value) { value.to_s.strip.downcase }

Frozen string literals

  • Add # frozen_string_literal: true to new files unless the project has a different convention.
  • Treat strings as immutable values; use String.new, unary +, or dup when mutation is required.
  • Avoid hidden mutation of arguments. Return a new string unless the method name clearly signals mutation with !.

Enumerable and Comparable

  • Include Enumerable when the type can define a meaningful each.
  • Include Comparable when <=> has a total ordering that callers will agree with.
  • Prefer map, filter, each_with_object, tally, and sum over manual accumulator loops.
class Money
  include Comparable
  attr_reader :cents

  def initialize(cents) = @cents = cents
  def <=>(other) = cents <=> other.cents
end

Error handling

  • Rescue the narrowest exception class you can actually handle.
  • Keep begin/rescue scopes small so unrelated failures are not swallowed.
  • Avoid bare rescue (no class specified); the implicit StandardError scope hides intent and can silently swallow subclasses you did not anticipate. Always name the class explicitly.
  • Re-raise with context when crossing a boundary; preserve the original exception when useful.

Read the full file on GitHub · 109 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 109 lines · 65 tokens per session scan A 636d97c7d3b9

Subscribe to this mod's changes

language-ruby is a skill published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 1,051 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

language-idioms-refiner

Facilitate a structured conversation to define language-specific idioms and patterns for a repository. Produces a language-idioms.md document consumed by multiple atoms to adapt pseudocode defaults to the project's language. Use when setting up a new project, switching languages, or when the user says 'setup…

techygarg/lattice · 92 tokens

wasm

WebAssembly (WASM) integration, WASI, component model, Rust/Go to WASM compilation. Use when implementing WASM modules, browser/edge compute, or polyglot runtime.

TheBeardedBearSAS/claude-craft · 43 tokens

functions-development

Build serverless Go or Python functions for Falcon Foundry apps. TRIGGER when user asks to "create a function", "write a serverless function", "build backend logic", runs foundry functions create, or needs help with FDK handler patterns, function testing, or collection integration from functions. Also TRIGGER when…

CrowdStrike/foundry-skills · 195 tokens

go-core-idioms

Use when writing or reviewing idiomatic sequential Go — error handling, slog logging, generics, interfaces, style. Not for concurrency (go-concurrency).

fusengine/agents · 37 tokens

gemtracker

Analyze Ruby gem dependencies, vulnerabilities, outdated packages, maintenance health, and insecure gem sources with the gemtracker CLI. Use when asked to audit Ruby gems, check Gemfile.lock security, review dependency health, or run gemtracker.

spaquet/gemtracker · 49 tokens

ruzzy

Use when asked to set up and run coverage-guided fuzzing of Ruby code or C extensions with Ruzzy, producing crash reports or clean campaign summaries. Not for C/C++ fuzzing: use libfuzzer or libfuzzer.

OutlineDriven/odin-claude-plugin · 51 tokens