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.
npx skills add slbug/claude-ruby-grape-rails --skill rails-idiomsgit clone --depth 1 https://github.com/slbug/claude-ruby-grape-railsWrote 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.
[](https://agentmods.dev/skills/slbug/claude-ruby-grape-rails/rails-idioms)<a href="https://agentmods.dev/skills/slbug/claude-ruby-grape-rails/rails-idioms"><img src="https://agentmods.dev/badge/skills/slbug/claude-ruby-grape-rails/rails-idioms/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.
<a href="https://agentmods.dev/skills/slbug/claude-ruby-grape-rails/rails-idioms"><img src="https://agentmods.dev/badge/skills/slbug/claude-ruby-grape-rails/rails-idioms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.01131 |
| Opus 5 | $0.00026 | $0.00566 |
| Sonnet 5 | $0.00010 | $0.00226 |
| Haiku 4.5 | $0.00005 | $0.00113 |
Grade A, and why
rails-idioms 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rails Idioms
Iron Laws
- Controllers orchestrate; they do not own domain logic.
- Use explicit params shaping and authorization.
- Keep callbacks boring; push external side effects to
after_commitor application services. - Prefer built-in Rails capabilities before adding infrastructure gems.
- Use Sidekiq for high-throughput background jobs (this plugin's recommended stack).
- Consider Solid Queue for simpler ops when throughput needs are moderate (Rails 8 default).
- Choose cache/cable backends based on infrastructure — Redis for multi-server, Solid for single-server simplicity.
Overview
Rails 8 brings database-backed infrastructure (Solid Queue, Solid Cache, Solid Cable) that eliminates Redis dependency for many applications. This skill covers modern Rails patterns from Rails 7 through 8.x.
Rails 8 Solid Stack
Rails 8 introduces three database-backed alternatives to Redis infrastructure:
| Component | Replaces | Best For |
|---|---|---|
| Solid Queue | Sidekiq/Redis | Moderate throughput, simpler ops |
| Solid Cache | Redis | Single-server or replicated setups |
| Solid Cable | Redis | Most real-time features |
See Solid Trifecta Guide for setup and migration.
Quick Reference
Controllers
# Modern controller structure
class PostsController < ApplicationController
before_action :set_post, only: [:show, :edit, :update, :destroy]
before_action :authorize_post!, only: [:edit, :update, :destroy]
def index
@posts = Post.recent.includes(:author, :tags)
end
def create
@post = Post.new(post_params)
if @post.save
redirect_to @post, notice: "Post created"
else
render :new, status: :unprocessable_entity
end
end
private
def post_params
params.require(:post).permit(:title, :body, :published, tag_ids: [])
end
end
See Controllers Guide for patterns and anti-patterns.
What ships with it
13 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.
- references/active-record-patterns.md 3.5 KB
- references/anti-patterns.md 1.5 KB
- references/async-queries.md 547 B
- references/authentication.md 908 B
- references/callbacks.md 1.4 KB
- references/checklist.md 571 B
- references/controllers.md 2.2 KB
- references/kamal2.md 636 B
- references/propshaft.md 840 B
- references/rails81-features.md 2.1 KB
- references/solid-trifecta.md 4.0 KB
- references/testing.md 1.0 KB
- references/thruster.md 771 B
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.
- 7d ago First seen · 140 lines · 52 tokens per session scan A 03a93477f42c
rails-idioms is a skill published in the GitHub repository slbug/claude-ruby-grape-rails (7 stars, last pushed 5d ago), licensed MIT. It adds 52 tokens to every session and 1,131 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
draper-decorators
This skill should be used when the user asks to "create a decorator", "write a decorator", "move logic into decorator", "clean logic out of the view", "isn't it decorator logic", "test a decorator", or mentions Draper, keeping views clean, or representation logic in decorators. Should also be used when editing…
rails-expert
Rails 7+ specialist that optimizes Active Record queries with includes/eagerload, implements Turbo Frames and Turbo Streams for partial page updates, configures Action Cable for WebSocket connections, sets up Sidekiq workers for background job processing, and writes comprehensive RSpec test suites. Use when building…
new
Create a new project to start development quickly.
pinme-email
Use this skill when a PinMe project (Worker TypeScript) needs to integrate email sending (sendemail). Guides AI to generate correct Worker TS code.
rails-conventions
Rootstrap Rails conventions. Use when writing, reviewing, or editing any Rails code — controllers, models, migrations, routes, views, mailers, initializers, locale files, or Rails config. Covers routing, ActiveRecord, migrations, i18n, time zones, mailers, assets, Bundler groups, and logging.
networking-layer
Generates a protocol-based networking layer with async/await, error handling, and swappable implementations. Use when user wants to add API client, networking, or HTTP layer.