Rails
ericrisco/rsc-harness
A skill your agent uses when building or maintaining a Ruby on Rails app — models, controllers, views, routes and migrations; ActiveRecord associations, scopes and query performance; Hotwire (Turbo…
Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami.
$ npx skills add softspark/ai-toolkit --skill ruby-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install softspark/ai-toolkit ruby-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/ruby-patterns .claude/skills/ruby-patterns && rm -rf skills-srcUse ~/.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/
Install the "ruby-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/ruby-patterns into .claude/skills/ruby-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ruby-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/softspark/ai-toolkit/tree/main/app/skills/ruby-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add softspark/ai-toolkit --skill ruby-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install softspark/ai-toolkit ruby-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/app/skills/ruby-patterns .agents/skills/ruby-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ruby-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/ruby-patterns into .agents/skills/ruby-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ruby-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill ruby-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install softspark/ai-toolkit ruby-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/app/skills/ruby-patterns .cursor/skills/ruby-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ruby-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/ruby-patterns into .cursor/skills/ruby-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ruby-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/softspark/ai-toolkit.git --path app/skills/ruby-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add softspark/ai-toolkit --skill ruby-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install softspark/ai-toolkit ruby-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/app/skills/ruby-patterns .gemini/skills/ruby-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ruby-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/ruby-patterns into .gemini/skills/ruby-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ruby-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install softspark/ai-toolkit ruby-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add softspark/ai-toolkit --skill ruby-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .github/skills && cp -r skills-src/app/skills/ruby-patterns .github/skills/ruby-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ruby-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/ruby-patterns into .github/skills/ruby-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ruby-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill ruby-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install softspark/ai-toolkit ruby-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/app/skills/ruby-patterns .opencode/skills/ruby-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ruby-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/ruby-patterns into .opencode/skills/ruby-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ruby-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ruby-patternsRuby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami.
Ruby Patterns is an agent skill from softspark/ai-toolkit. Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami. Triggers: Ruby, Rails, ActiveRecord, Sidekiq, RSpec, Gemfile, bundler, Hanami, Sorbet.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Backend development and ORMs and data access. It works with Ruby and Ruby on Rails. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.
Read from SKILL.md and the folder at commit d64db2b. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadFrom allowed-tools in the SKILL.md frontmatter.
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.
Hosts in commands or code, which the agent is likely to contact:
rubygems.orgFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ruby Patterns loads about 2.3k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 51 words of instructions outside code blocks.
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.
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.
The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 51 words, ~2,305 tokens.
.claude/skills/ruby-patterns/SKILL.md (or your agent's skills folder).my_gem/
├── lib/
│ ├── my_gem.rb # Entry point, require sub-files
│ └── my_gem/
│ ├── version.rb
│ ├── configuration.rb
│ ├── client.rb
│ └── errors.rb
├── spec/
│ ├── spec_helper.rb
│ ├── my_gem/
│ │ └── client_spec.rb
│ └── fixtures/
├── bin/
│ └── console # IRB with gem loaded
├── sig/ # RBS type signatures
├── Gemfile
├── Rakefile
├── my_gem.gemspec
├── .rubocop.yml
└── .ruby-versionapp/
├── controllers/
│ ├── application_controller.rb
│ └── api/v1/
│ └── users_controller.rb
├── models/
│ ├── application_record.rb
│ ├── user.rb
│ └── concerns/
│ └── searchable.rb
├── services/
│ └── users/
│ ├── create_service.rb
│ └── import_service.rb
├── jobs/
│ └── user_sync_job.rb
├── mailers/
├── serializers/
│ └── user_serializer.rb
└── views/
config/
├── routes.rb
├── database.yml
├── initializers/
│ ├── sidekiq.rb
│ └── cors.rb
└── environments/
db/
├── migrate/
├── schema.rb
└── seeds.rb
spec/
├── rails_helper.rb
├── spec_helper.rb
├── models/
├── requests/
├── services/
├── factories/
│ └── users.rb
└── support/
└── shared_examples/source "https://rubygems.org"
ruby "~> 3.3"
gem "rails", "~> 7.2"
gem "pg"
gem "puma", ">= 6.0"
gem "sidekiq", "~> 7.0"
gem "redis", ">= 5.0"
group :development, :test do
gem "rspec-rails"
gem "factory_bot_rails"
gem "faker"
gem "debug"
gem "rubocop-rails", require: false
gem "rubocop-rspec", require: false
end
group :test do
gem "shoulda-matchers"
gem "webmock"
gem "vcr"
gem "simplecov", require: false
end# Block -- yielded to, not stored
def with_retry(attempts: 3)
attempts.times do |i|
return yield
rescue StandardError => e
raise if i == attempts - 1
sleep(2**i)
end
end
with_retry { http_client.get("/data") }
# Proc -- flexible arity, returns from enclosing method
validator = Proc.new { |val| val.to_s.strip.length > 0 }
# Lambda -- strict arity, returns from itself
transform = ->(x) { x.to_s.downcase.strip }
words = ["Hello ", " WORLD"].map(&transform)
# Method reference
names = users.map(&:name)
valid = values.select(&method(:valid?))# Concern pattern (Rails)
module Searchable
extend ActiveSupport::Concern
included do
scope :search, ->(query) {
where("name ILIKE ?", "%#{sanitize_sql_like(query)}%")
}
end
class_methods do
def searchable_columns
%i[name email]
end
end
end
# Pure Ruby mixin
module Loggable
def logger
@logger ||= Logger.new($stdout, progname: self.class.name)
end
def log_info(msg) = logger.info(msg)
def log_error(msg) = logger.error(msg)
endclass Config
def initialize(data = {})
@data = data
end
def method_missing(name, *args)
key = name.to_s.chomp("=").to_sym
if name.to_s.end_with?("=")
@data[key] = args.first
elsif @data.key?(key)
@data[key]
else
super
end
end
def respond_to_missing?(name, include_private = false)
@data.key?(name.to_s.chomp("=").to_sym) || super
end
end# frozen_string_literal: true
# Add to every file. Prevents accidental mutation, improves memory.
# Enforce via RuboCop: Style/FrozenStringLiteralCommentcase response
in { status: 200, body: { data: Array => items } }
process_items(items)
in { status: 200, body: { data: Hash => item } }
process_item(item)
in { status: 404 }
raise NotFoundError
in { status: (500..) }
raise ServerError, response[:body]
end
# Find pattern
case users
in [*, { role: "admin", name: String => admin_name }, *]
puts "Found admin: #{admin_name}"
end
# Pin operator
expected_status = 200
case response
in { status: ^expected_status }
handle_success(response)
end# Chaining
active_emails = users
.select(&:active?)
.reject { |u| u.email.nil? }
.map(&:email)
.uniq
.sort
# Grouping and tallying
users.group_by(&:role) # => { "admin" => [...], "user" => [...] }
users.tally_by(&:role) # => { "admin" => 3, "user" => 15 }
orders.sum(&:total)
scores.filter_map { |s| s.value if s.valid? }
# each_with_object over inject for building hashes
users.each_with_object({}) do |user, memo|
memo[user.id] = user.name
enddef fetch_user(id)
user = api_client.get("/users/#{id}")
User.new(user)
rescue Faraday::TimeoutError => e
logger.warn("Timeout fetching user #{id}: #{e.message}")
nil
rescue Faraday::ClientError => e
raise if e.response_status != 404
nil
rescue StandardError => e
logger.error("Unexpected error: #{e.class} - #{e.message}")
raise
ensure
api_client.close if api_client
endmodule MyApp
class Error < StandardError; end
class NotFoundError < Error
attr_reader :resource, :id
def initialize(resource:, id:)
@resource = resource
@id = id
super("#{resource} not found: #{id}")
end
end
class ValidationError < Error
attr_reader :errors
def initialize(errors)
@errors = errors
super(errors.join(", "))
end
end
class RateLimitError < Error
attr_reader :retry_after
def initialize(retry_after:)
@retry_after = retry_after
super("Rate limited. Retry after #{retry_after}s")
end
end
enddef with_retries(max: 3, base_delay: 0.5, errors: [StandardError])
attempts = 0
begin
attempts += 1
yield
rescue *errors => e
raise if attempts >= max
delay = base_delay * (2**(attempts - 1)) + rand(0.0..0.5)
sleep(delay)
retry
end
end
with_retries(max: 5, errors: [Net::OpenTimeout, Faraday::TimeoutError]) do
api_client.post("/webhook", payload)
endrequire "dry/monads"
class CreateUser
include Dry::Monads[:result, :do]
def call(params)
values = yield validate(params)
user = yield persist(values)
yield send_welcome_email(user)
Success(user)
end
private
def validate(params)
result = UserContract.new.call(params)
result.success? ? Success(result.to_h) : Failure(result.errors.to_h)
end
def persist(values)
user = User.create(values)
user.persisted? ? Success(user) : Failure(user.errors.full_messages)
end
def send_welcome_email(user)
UserMailer.welcome(user).deliver_later
Success(user)
rescue StandardError => e
# Non-critical -- log and continue
Rails.logger.error("Welcome email failed: #{e.message}")
Success(user)
end
endRSpec.describe UserService, "#create" do
subject(:result) { described_class.new(repo: repo).create(params) }
let(:repo) { instance_double(UserRepository) }
let(:params) { { name: "Ada", email: "ada@example.com" } }
context "when params are valid" do
before do
allow(repo).to receive(:save).and_return(build(:user, **params))
end
it "returns the created user" do
expect(result).to be_a(User)
expect(result.name).to eq("Ada")
end
it "persists via repository" do
result
expect(repo).to have_received(:save).with(hash_including(name: "Ada"))
end
end
context "when email is taken" do
before do
allow(repo).to receive(:save).and_raise(ActiveRecord::RecordNotUnique)
end
it "raises a duplicate error" do
expect { result }.to raise_error(UserService::DuplicateEmail)
end
end
endFactoryBot.define do
factory :user do
name { Faker::Name.name }
email { Faker::Internet.unique.email }
role { :user }
trait :admin do
role { :admin }
end
trait :with_orders do
transient do
order_count { 3 }
end
after(:create) do |user, ctx|
create_list(:order, ctx.order_count, user: user)
end
end
end
end
# Usage
create(:user, :admin)
create(:user, :with_orders, order_count: 5)
build_stubbed(:user) # No DB hit# spec/support/vcr.rb
VCR.configure do |c|
c.cassette_library_dir = "spec/fixtures/cassettes"
c.hook_into :webmock
c.filter_sensitive_data("<API_KEY>") { ENV.fetch("API_KEY") }
c.default_cassette_options = { record: :once, decode_compressed_response: true }
end
RSpec.describe GitHubClient do
it "fetches repositories", vcr: { cassette_name: "github/repos" } do
repos = described_class.new.repos("rails")
expect(repos).not_to be_empty
expect(repos.first).to respond_to(:name)
end
end© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in app/skills/ruby-patterns of softspark/ai-toolkit.
Open the folder on GitHubat commit d64db2b
Ruby Patterns 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ruby Patterns this skillsoftspark/ai-toolkit | 179 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Railsericrisco/rsc-harness | 156 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Rails ExpertJeffallan/claude-skills | 12k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Rails Patternsaffaan-m/ECC | 274k | — | ~4.1k | Automated safety check: Pass | MIT | |
| Rubyericrisco/rsc-harness | 156 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Rails Idiomsirahardianto/awesome-agv | 157 | — | ~1.8k | Automated safety check: Pass | MIT |
ericrisco/rsc-harness
A skill your agent uses when building or maintaining a Ruby on Rails app — models, controllers, views, routes and migrations; ActiveRecord associations, scopes and query performance; Hotwire (Turbo…
Jeffallan/claude-skills
Builds Rails 7+ apps with Hotwire Turbo Frames and Streams, Active Record tuning, Action Cable, Sidekiq jobs and RSpec specs, with migration and N+1 checks.
affaan-m/ECC
Ruby on Rails framework patterns for Rails 7.1+ and 8.x apps.
ericrisco/rsc-harness
A skill your agent uses when writing or refactoring plain Ruby outside Rails — scripts, CLIs, gems, libraries: Enumerable chains and blocks, module mixins and value objects, Bundler/gemspec…
irahardianto/awesome-agv
Ruby on Rails framework patterns: ActiveRecord scopes, N+1 query prevention, model validations, RESTful routing, and RSpec/Minitest testing.
doorkeeper-gem/doorkeeper
Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.
softspark/ai-toolkit
Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.
softspark/ai-toolkit
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Analyzes code quality, complexity, patterns across codebase.
softspark/ai-toolkit
Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.
softspark/ai-toolkit
Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).
Works with
Categories
Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami. Ruby Patterns is an agent skill from softspark/ai-toolkit. Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami.
Ruby Patterns fits situations like: tasks that involve Backend development; tasks that involve ORMs and data access.
Run `npx skills add softspark/ai-toolkit --skill ruby-patterns -a claude-code`. Or copy the skill folder (app/skills/ruby-patterns in softspark/ai-toolkit) into .claude/skills/ruby-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add softspark/ai-toolkit --skill ruby-patterns -a codex`. Or copy the skill folder (app/skills/ruby-patterns in softspark/ai-toolkit) into .agents/skills/ruby-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill ruby-patterns -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-patterns, .gemini/skills/ruby-patterns, .github/skills/ruby-patterns and .opencode/skills/ruby-patterns in your project.
Going by SKILL.md and its folder, Ruby Patterns needs credentials named API_KEY. Our summary lists: A credential in API_KEY. Its frontmatter pre-approves these tools: Read.
SKILL.md names 1 domain. In commands or code: rubygems.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
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.
Ruby Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Ruby Patterns: Rails (ericrisco/rsc-harness, 156 stars), Rails Expert (Jeffallan/claude-skills, 12k stars), Rails Patterns (affaan-m/ECC, 274k stars) and Ruby (ericrisco/rsc-harness, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.
Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.