ruby

ruby is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 87 tokens per session (3,371 once invoked), scanned A, original, MIT.

A guide to writing and refactoring plain Ruby code outside the Rails web framework. It covers Ruby language style, packages called gems, and common Ruby testing tools.

In plain words
What is it for?
Use it for Ruby scripts, command-line tools, gems, libraries, modules, blocks, and value objects. It also covers Minitest or RSpec tests and gem packaging.
Why use it?
It helps avoid applying Rails conventions to ordinary Ruby programs and keeps language, packaging, and test choices consistent. It also identifies which Ruby work should use a different guide.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for Ruby scripts, command-line tools, gems, libraries, modules, blocks, and value objects. It also covers Minitest or RSpec tests and gem packaging.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ericrisco/rsc-harness/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 ericrisco/rsc-harness --skill ruby
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

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 ruby

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/ruby/github.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/ruby)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/ruby"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/ruby/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ruby

Your own site · 80×15
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/ruby"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/ruby.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,371 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.00087 $0.03371
Opus 5.5 $0.00035 $0.01348
Sonnet 5.5 $0.00017 $0.00674
Haiku 4.5 $0.00009 $0.00337

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

Security

Grade A, and why

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/ruby/SKILL.md · 296 lines

How it starts

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

Idiomatic Ruby, the language

Write Ruby a senior Rubyist would sign off on: expression-oriented, block-driven, leaning on Enumerable and Comparable instead of hand-rolled loops, with frozen_string_literal hygiene and a real Gemfile/.gemspec when you package.

This is Ruby the language and its non-Rails ecosystem — blocks, modules, gems, metaprogramming, Minitest/RSpec. Delegate: Rails apps, ActiveRecord models, controllers, migrations, views, Hotwire — anything that loads Rails or uses ActiveSupport/ActiveRecord idioms — to rails; the same task in another language to python, go, rust, elixir, php or typescript; the CI pipeline that runs your Ruby tests to github-actions — this skill writes the tests, not the workflow.

Targets Ruby 4.0 (released 2025-12-25) on 3.4 semantics: Prism is the default parser, string literals warn on mutation without a magic comment, it is an implicit block param, and Set is now a core class.

Mental model

Internalize these before writing a line:

  1. Everything is an expression and returns a value. if, case, blocks, method bodies all yield a value — name and return it instead of threading a flag.
  2. Everything is an object receiving messages. 5.times, nil.to_a, "x".freeze. There are no primitives to special-case.
  3. Reach for Enumerable before you write a loop. A manual index loop in Ruby is almost always a map/select/reduce you have not spotted yet.
  4. Prefer returning new values to mutating in place. Mutation is allowed but it is the exception you justify, not the default.
  5. Freeze your string literals. New files start with # frozen_string_literal: true.
  6. Dynamism is the trap, not the feature. Metaprogramming is a scalpel; if a plain method, a Struct, or a Data does the job, use that.

Read the full file on GitHub · 296 lines

Files

What ships with it

5 files 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 · 296 lines · 87 tokens per session scan A 97ffa368b6a6

Subscribe to this mod's changes

ruby is a skill published in the GitHub repository ericrisco/rsc-harness (314 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 3,371 once invoked, about $0.0003 per session on Opus 5.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-10-24.