/sota-skills:sota-rubyfrom SOTA Engineering Skills
State-of-the-art Ruby engineering rules for building and auditing Ruby services, gems, and CLIs. Covers modern idioms, security hardening, supply-chain tooling, and concurrency/performance patterns.
Ships in SOTA Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert-level rules for producing and auditing production Ruby. Baseline language
line: Ruby 3.4+; Ruby 4.0 was released 2025-12-25 and is in normal
maintenance (latest stable — verify at the branches page). Per the official branches page:
4.0 and 3.4 are in normal maintenance; 3.3 is security-maintenance only
(expected EOL 2027-03); 3.2 and older are EOL (3.2 since 2026-04-01) — running
them is itself a finding. Feature notes: Data.define and Regexp.timeout
from 3.2, it block parameter and chilled-string warnings from 3.4,
Ractor::Port and experimental ZJIT from 4.0 — noted where relevant. Every
rules file ends with an audit checklist of grep/lint patterns.
Two consumers, one source of truth:
02, 03, 05..ruby-version, Gemfile/Gemfile.lock, RuboCop
or StandardRB config, framework and test runner in use. Match the project's
floor (no it block param on a 3.3 project)..ruby-version), commit
Gemfile.lock, add RuboCop or StandardRB, bundler-audit, and the
test suite to CI from day one (see rules/04). Rails apps add Brakeman.YAML.safe_load semantics, SecureRandom,
escaped output (see rules/02, rules/03).# NOTE(sota): comment explaining the trade-off so auditors don't flag it.Coverage: every rules/ file's Audit checklist applies in AUDIT mode. Mark one not applicable only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.
Work through each relevant rules file's audit checklist against the target
repo. Run the listed grep/lint commands; confirm each hit manually before
reporting (greps are recall-oriented, expect false positives). Useful
mechanical sweeps: bundle exec rubocop, bundler-audit check --update,
brakeman -q (Rails), plus the per-file greps.
| Severity | Meaning | Examples |
|---|---|---|
| CRITICAL | Exploitable now, or data loss | SQL built with #{} interpolation, Marshal.load/YAML.unsafe_load on external data, command injection via backticks with user input, html_safe on user input |
| HIGH | Exploitable with preconditions, or production-breaking | Missing CSRF protection on state-changing routes, permit!, ^/$ anchors in validation regexes, rand for tokens, Timeout.timeout around DB work, EOL Ruby in production |
| MEDIUM | Correctness/maintenance hazard, latent bug | N+1 on a hot path, non-idempotent retried jobs, no Gemfile.lock in an app, mutable shared state across threads without a lock, rescue Exception |
| LOW | Deviation from SOTA, friction | Missing frozen-string-literal comments, Struct where Data fits, stringly-typed booleans, unpinned dev tooling |
| INFO | Worth knowing, no action forced | YJIT not enabled, typing (RBS/Sorbet) absent, newer-Ruby features available after a floor bump |
file:line | rule violated (rules/NN §section) | severity | effort | fix
This is the router's canonical row; each finding carries the sota rules/03
§2 evidence block, and the report follows its §5 order.
Severity: Critical / High / Medium / Low / Info. Effort: trivial / small / medium / large. Borderline severities state the deciding assumption; unconfirmed findings are marked "needs verification", never asserted. Group findings by severity, CRITICAL first; end with counts per severity, the three highest-leverage fixes, and which checklists were run.
| File | Read this when... |
|---|---|
rules/01-language-idioms.md | Choosing/verifying the Ruby version baseline; frozen string literals; pattern matching; Data vs Struct; exception design, what rescue => e misses (SystemStackError, NoMemoryError) and JSON depth limits; nil over a sentinel, and to_i silently returning 0 for garbage; money as Integer/BigDecimal, NaN/Infinity, Array#pack width, valid_encoding? on untrusted bytes; typing with RBS/Sorbet/Steep; general idioms and pitfalls |
rules/02-security.md | Any input crossing a trust boundary: SQL injection (ActiveRecord/Sequel), command injection (system/backticks/Open3), deserialization (Marshal, YAML/Psych), XML parser options (XXE/entity expansion in Nokogiri, REXML), ReDoS and regex anchors, eval/send/constantize, secrets and randomness, password hashing (bcrypt/argon2, never a fast digest), the encrypted-credentials key (config/master.key, RAILS_MASTER_KEY) kept out of git, path traversal; escape hatches into raw memory: Fiddle, the ffi gem and C extensions |
rules/03-web-hardening.md | Building or auditing anything web-facing: XSS/ERB escaping, mass assignment and strong params, CSRF (incl. HEAD→GET verb confusion and routes that widen verbs or actions), sessions and app-set cookie flags, security headers, debug mode left on in production, outbound TLS verification, open redirects, SSRF, file uploads and render file:, mounted admin apps (Sidekiq::Web) without authentication — framework-neutral |
rules/04-supply-chain-tooling.md | Bundler and Gemfile.lock discipline, lockfile checksums, choosing an alternative index or mirror (gem.coop, mirror.<url>, disable_checksum_validation), bundler-audit, RuboCop/StandardRB, Brakeman, RSpec/Minitest mechanics, rubocop:disable with a reason and the stale-directive cop, spec exclusions by path, gem install outside the frozen lock, memory-checking C extensions, CI gates, gem authoring/publishing |
rules/05-concurrency-performance.md | Threads, fibers, Ractors, and the GVL; resetting request-scoped thread-local state; background-job idempotency; YJIT/ZJIT; GC and memory (allocator, RSS); N+1 detection; profiling workflow |
.ruby-version and CI.
(rules/01)?/named
placeholders in ActiveRecord/Sequel; string-interpolated SQL is CRITICAL,
no exceptions for "internal" values. (rules/02)Marshal.load, YAML.unsafe_load, or eval-family on data you
don't fully control; YAML.load is safe-by-default only on Psych 4+
(Ruby 3.1+) — verify the runtime. (rules/02)system("cmd", arg),
Open3.capture2), never a shell string containing external input; no
Kernel#open/URI.open on user-supplied names (a |cmd name is RCE on
≤ 3.4; on 4.0 it is still an arbitrary file read). (rules/02)raw/html_safe is
reviewed; non-Rails ERB configured to auto-escape. (rules/03)params.expect; explicit attribute lists elsewhere); permit! is HIGH.
(rules/03)\A/\z (never ^/$) to anchor validation regexes. (rules/02, rules/03)Gemfile.lock committed and CI installs frozen (BUNDLE_FROZEN=true);
bundler-audit gates CI; git-sourced gems pinned to a SHA. (rules/04)SecureRandom (never rand/Random) for anything security-relevant;
constant-time comparison for secrets. (rules/02)rules/05)What SKILL.md sets; muted values are Claude Code's defaults
43 skills in this plugin
/sotaMaster router for the SOTA engineering skills library. Use this skill whenever the user asks to build, design, implement, refactor, harden, optimize, review, or audit an application, service, or codebase and the request spans more than one domain — or when you are unsure which specific sota-* skill applies. Also use when working on a codebase you do not own: reviewing a pull request or diff, responding to code review, evaluating someone else's patch, or preparing an upstream contribution — including mid-session, once you are already reading source, a diff, or CI config. It maps the task (build or audit mode) to the right domain and language skills (Rust, Go, C/C++, JVM, Python, JS/TS, .NET/C#, PHP, Ruby, Swift). Trigger keywords: SOTA, best practices, audit my code, security review, compliance, hardening, prod readiness, code quality, pull request, PR review, review comment, maintainer feedback, patch, diff, upstream, contribute, merge request./sota-api-designState-of-the-art API design and audit guidance (2026) covering REST/HTTP, GraphQL, gRPC, WebSockets/SSE/realtime, webhooks, versioning/evolution, and API security/operations. Use when designing or building any API surface (endpoints, schemas, protos, realtime channels, webhook senders/receivers) AND when auditing/reviewing existing APIs for correctness, evolvability, security, and operational robustness. Not for browser UI, rendering, or client-framework concerns — use sota-web-frameworks or sota-frontend-design. Trigger keywords: API, REST, GraphQL, gRPC, endpoint, websocket, SSE, realtime, WebRTC, webhook, versioning, OpenAPI, pagination, idempotency, rate limit, problem+json, protobuf, deprecation./sota-architectureState-of-the-art software and system architecture rules (2026) for both building and auditing. Use when designing, building, refactoring, or extending system architecture — boundaries, DDD, hexagonal/clean architecture, event-driven design, CQRS, sagas, messaging, caching, sharding, multi-tenancy, resilience, scalability, 12-factor/cloud-native — AND when auditing existing architecture for quality (design review, anti-patterns like distributed monolith or shared database, reliability/scalability assessment). Trigger keywords: architecture, system design, microservices, monolith, serverless, bounded context, DDD, aggregate, hexagonal, clean architecture, event-driven, Kafka, NATS, JetStream, messaging, pub/sub, stream, consumer, queue, saga, outbox, idempotency, CQRS, resilience, circuit breaker, retry, timeout, backpressure, caching, sharding, partitioning, multi-tenant, 12-factor, cloud-native, feature flag, ADR, scalability, anti-pattern, design review, architecture audit./sota-async-concurrencyState-of-the-art rules for writing and auditing asynchronous and concurrent code across runtimes (Python asyncio, JS/Node, Go, Rust, JVM). Use when building anything with async/await, threads, processes, event loops, task groups, channels, or queues — and when auditing existing code for race conditions, deadlocks, leaked tasks, blocked event loops, missing cancellation, or backpressure failures. Not for latency/throughput profiling and optimization — use sota-performance. Trigger keywords: async, await, concurrency, parallelism, threads, race condition, deadlock, event loop, channels, queues, semaphore, mutex, cancellation, timeout, backpressure, task group, goroutine, tokio, asyncio./sota-c-cppState-of-the-art C and C++ engineering rules that Claude applies when writing or auditing C/C++. Covers modern idioms (RAII, value semantics, smart pointers, C++23), memory safety (lifetimes, bounds, sanitizers, hardening flags), undefined behavior, security (SEI CERT C/C++, MISRA, integer/buffer/format-string, injection), concurrency (C/C++ memory model, atomics, data races), build/tooling/CI (CMake, clang-tidy, cppcheck, ASan/UBSan/TSan, vcpkg/Conan, supply chain), and performance. Trigger keywords - C, C++, RAII, smart pointer, unique_ptr, shared_ptr, undefined behavior, UB, buffer overflow, use-after-free, sanitizer, ASan, UBSan, TSan, valgrind, CMake, clang-tidy, cppcheck, MISRA, CERT C, memory safety, std::thread, atomics, std::move. Use for BOTH building C/C++ libraries/systems and reviewing or auditing them. Owns firmware's LANGUAGE layer; does NOT own its SYSTEMS layer — ISRs, DMA coherency, MMIO, RTOS scheduling, priority inversion, WCET, linker scripts — unowned library-wide./sota-cli-uxState-of-the-art CLI and developer-tool UX guidance (2026) covering command and flag design, output and interaction (stdout/stderr, --json, TTY detection, exit codes, prompts), runtime behavior and lifecycle (signals, dry-run, idempotency, XDG paths, completions, telemetry), and distribution (packaging, checksums, docs). Use when designing or building any command line tool, subcommand, TUI, or developer tool — in any framework (argparse, click, typer, clap, cobra, oclif, commander) — AND when auditing an existing CLI for usability, scriptability, and compatibility. Not for shell-script correctness or security — use sota-shell-scripting. Trigger keywords: CLI, command line tool, flags, subcommands, terminal output, TUI, developer tool, argparse, clap, cobra, exit code, shell completion, man page, stdin, stdout.npx claudepluginhub martinholovsky/sota-skills --plugin sota-skills2 plugins ship this exact skill · first indexed Oct 28, 2026
Other plugins' skills for the same job