ruby-rails

ruby-rails is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 94 tokens per session (3,875 once invoked), scanned A, original, MIT.

A coding guide for Ruby on Rails, a web development framework written in Ruby. It covers the usual parts of a Rails app, including controllers, database models, background jobs, APIs, and tests.

In plain words
What is it for?
Use it when building or changing Rails applications, including models, controllers, service objects, database migrations, API endpoints, background jobs, and RSpec tests.
Why use it?
It gives Rails code a consistent structure and keeps business rules out of controllers. It also guides database queries, background work, and automated tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it when building or changing Rails applications, including models, controllers, service objects, database migrations, API endpoints, background jobs, and RSpec tests.

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

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-rails

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/rails/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/rails)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/rails"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/rails/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-rails

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/rails"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/rails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,875 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 82
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00094 $0.03875
Opus 5 $0.00047 $0.01937
Sonnet 5 $0.00019 $0.00775
Haiku 4.5 $0.00009 $0.00387

Measured 9d ago against content hash 400f569e1d9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ruby-rails 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 9d 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/backend/ruby/rails/SKILL.md · 544 lines

How it starts

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

Ruby on Rails

Purpose

Build Rails applications with clean MVC separation, service objects, ActiveRecord optimization, API mode conventions, Sidekiq background jobs, and RSpec testing patterns.

Agent Protocol

Trigger

User request includes: Rails, Ruby on Rails, Rails API, ActiveRecord, Rails controller, Rails model, Rails service, Rails job, Rails spec, Rails migration.

Input Context

  • Rails version (7.0+, 7.1+)
  • Ruby version (3.1+, 3.2+, 3.3+)
  • Database (PostgreSQL, MySQL, SQLite)
  • Mode (API-only, full MVC)
  • Auth (Devise, JWT, OAuth)
  • Background jobs (Sidekiq, GoodJob, Solid Queue)

Output Artifact

Controller, model, service object, job class, migration, RSpec test.

Response Format

Produce artifact directly. No preamble, no postamble, no explanations.

Completion Criteria

  • Controller delegates to service objects
  • ActiveRecord model with scopes, validations, associations
  • Service object encapsulates business logic
  • Background job with retry configuration
  • Request spec covers CRUD with JSON
  • Migration with proper indexes

Max Response Length

4096 tokens

Architecture Decision Trees

Service Objects vs PORO Models vs Concerns

Criterion Service Object Fat Model Concern
Business logic location app/services/ app/models/ app/concerns/
Testability Easy (isolated) Moderate (needs DB) Moderate
Reusability High (injectable) Low (AR callbacks) Medium (mixed into models)
Complexity per unit Low High (grows unbound) Medium
Rails conventions No (manual) Yes (default) Yes (Rails 4+)

Decision: Complex business rules → Service Object. Simple validations/scopes → Model. Cross-model behavior → Concern.

ActiveRecord vs ActiveRecord::Base vs Sequel

Criterion ActiveRecord Sequel ROM.rb
Rails integration Native Adapter Adapter
Performance Moderate High High
Query interface Rich DSL Sequel DSL Relation-based
Associations Declarative Declarative Explicit
Migration system Built-in Built-in Standalone

Read the full file on GitHub · 544 lines

Files

What ships with it

8 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. 9d ago First seen · 544 lines · 94 tokens per session scan A 400f569e1d9a

Subscribe to this mod's changes

ruby-rails is a skill published in the GitHub repository j4flmao/agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 94 tokens to every session and 3,875 once invoked, about $0.0005 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-08-30.

Related

Other skills, from other repositories

Ruby Patterns

Use this skill when working in Ruby projects (Rails or otherwise) and you want clean object boundaries, predictable dependency management, and maintainable code organization.

AmariahAK/atlarix-skills · 2 tokens

ruby

Ruby programming language — syntax, core types, OOP, blocks/procs/lambdas, exceptions, I/O, concurrency, metaprogramming, gems, testing, style guide, C extensions, and tooling.

pledgeandgrow/pledge-skills · 45 tokens

ruby-expert

Expert-level Ruby development with Rails, modern features, testing, and best practices. Use when the user mentions Ruby on Rails, RSpec, gem, Sinatra, or metaprogramming, or when the task involves Ruby 3+ Features, Object-Oriented, Functional Features, or Pattern Matching.

personamanagmentlayer/pcl · 64 tokens

rails-load-defaults

Incrementally upgrade Rails config.loaddefaults by walking through each newframeworkdefaults config one at a time. Use this skill whenever the user mentions loaddefaults upgrade, newframeworkdefaults, framework defaults, or wants to bring their Rails app's default configuration up to match their Rails version. Also…

ombulabs/claude-code_rails-load-defaults-skill · 120 tokens

layered-rails

Write, refactor, and review Rails code using layered architecture principles from "Layered Design for Ruby on Rails Applications". Use when writing or refactoring Rails code — models, controllers, services, jobs, mailers, policies, forms, query objects, presenters, view components, state machines, serializers, or…

palkan/layered-rails-skills · 225 tokens

rails-api-controllers

RESTful API controller patterns for Ruby on Rails. Use when: (1) Building JSON APIs, (2) API versioning, (3) Error handling and status codes, (4) Authentication with tokens/JWT, (5) Rate limiting, (6) CORS configuration, (7) Pagination and filtering, (8) API documentation, (9) Testing API endpoints.

Shoebtamboli/rails_claude_skills · 82 tokens