programming-ruby — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited programming-ruby (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Write idiomatic Ruby with explicit data contracts and predictable persistence. As of 2026-10: Ruby 4.0 is the current stable line and Rails 8.1 (8.1.4) the latest Rails; Rails 7.2 has shipped its final release, so treat 7.2 apps as upgrade candidates. Rails guidance below targets Rails 8.x APIs. Check .ruby-version, the Gemfile/lockfile, Ruby implementation, and Rails version before using newer features. Preserve existing application conventions and dependencies; a small change does not need a new service layer or gem extraction.
Ruby's flexibility makes names and failure contracts important. Keep domain behavior near the object that owns it; extract orchestration only when it has independent responsibilities. Rails conventions reduce boilerplate, but callbacks, transactions, and asynchronous jobs have distinct timing and failure semantics.
Data.define describes fixed value records; members cannot be reassigned, but referenced strings/arrays/hashes are not deeply frozen. Struct is mutable unless frozen. Copy/freeze nested values only when the contract needs it.it suits a short, obvious block; use named parameters for nested or nontrivial logic. New syntax should improve readability rather than demonstrate novelty.Set a core class and adds Array#rfind for reverse search. Keep older-version require "set" compatibility when the repository supports older Rubies.# frozen_string_literal: true freezes literals, not all strings; use +"" or an owned duplicate when mutation is intended.fetch for required hash/configuration keys; use [], dig, and &. only where absence is valid. A chain of nil-tolerant operations must not conceal a missing invariant.nil and false as falsey. ||= does not cache a valid false/nil result; use an explicit initialization check when those results matter.Integer(text, 10) for validated integer input; to_i can silently accept malformed data. Keep absence distinct from invalid syntax.map for transformation, each for effects, and filter_map only when discarding both nil and false is intended. Keep long chains readable with named intermediate values.return inside a normal block exits its enclosing method; an escaped proc can raise LocalJumpError when that method has returned. A lambda's return exits the lambda. Use next for the current block invocation.?; ! identifies a more dangerous counterpart, not a universal promise to mutate or raise. Follow the specific method contract.StandardError; do not broadly rescue Exception, which includes shutdown and interrupt conditions.ensure when cleanup must span custom control flow. Do not return from ensure, which can replace results or suppress errors.params.expect can require and permit an expected parameter shape together. Strong Parameters filter assignment; they do not authorize access or validate all domain constraints.save returning false does not trigger rollback automatically.ActiveRecord::Rollback rolls back but is swallowed by the transaction boundary. Do not rescue database statement errors inside a transaction and continue using a potentially aborted transaction.ActiveJob::Continuable and split work into steps with a cursor so a deploy or restart resumes from the last completed step. Each step must still be idempotent, because a step interrupted mid-way reruns.has_many :x, deprecated: true reports remaining uses of an association before removal; prefer it over deleting an association blind.Preserve a legitimate false value and reject a malformed required value:
# frozen_string_literal: true
def read_settings(input)
enabled = input.fetch("enabled")
unless enabled == true || enabled == false
raise ArgumentError, "enabled must be boolean"
end
attempts = Integer(input.fetch("attempts"), 10)
raise ArgumentError, "attempts must be positive" unless attempts.positive?
{ enabled: enabled, attempts: attempts }
endThis boundary expects string input for attempts, such as form/config text. Missing keys and malformed values remain explicit failures.
bundle exec, binstubs, or a Rails 8.1 bin/ci when present and authorized; test observable behavior with the existing Minitest/RSpec setup. Do not replace fixtures or test libraries by preference.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.