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 sergiodxa/agent-skills --skill ruby-on-rails-best-practicesgit clone --depth 1 https://github.com/sergiodxa/agent-skillsWrote 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/sergiodxa/agent-skills/ruby-on-rails-best-practices)<a href="https://agentmods.dev/skills/sergiodxa/agent-skills/ruby-on-rails-best-practices"><img src="https://agentmods.dev/badge/skills/sergiodxa/agent-skills/ruby-on-rails-best-practices/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/sergiodxa/agent-skills/ruby-on-rails-best-practices"><img src="https://agentmods.dev/badge/skills/sergiodxa/agent-skills/ruby-on-rails-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00066 | $0.02056 |
| Opus 5 | $0.00033 | $0.01028 |
| Sonnet 5 | $0.00013 | $0.00411 |
| Haiku 4.5 | $0.00007 | $0.00206 |
Grade A, and why
ruby-on-rails-best-practices 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 10d 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 — 363 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ruby on Rails Best Practices
Architecture patterns and coding conventions extracted from Basecamp's production Rails applications (Fizzy and Campfire). Contains 16 rules across 6 categories focused on code organization, maintainability, and following "The Rails Way" with Basecamp's refinements.
When to Apply
Reference these guidelines when:
- Organizing models, concerns, and controllers
- Writing background jobs
- Implementing real-time features with Turbo Streams
- Deciding where code should live
- Writing tests for Rails applications
- Reviewing Rails code for architectural consistency
Rules Summary
Model Organization (HIGH)
model-scoped-concerns - @rules/model-scoped-concerns.md
Place model-specific concerns in app/models/model_name/ not app/models/concerns/.
# Directory structure
app/models/
├── card.rb
├── card/
│ ├── closeable.rb # Card::Closeable
│ ├── searchable.rb # Card::Searchable
│ └── assignable.rb # Card::Assignable
# app/models/card.rb
class Card < ApplicationRecord
include Closeable, Searchable, Assignable
# Ruby resolves from Card:: namespace first
end
concern-naming - @rules/concern-naming.md
Use -able suffix for behavior concerns, nouns for feature concerns.
# Behaviors: -able suffix
module Card::Closeable # Can be closed
module Card::Searchable # Can be searched
module User::Mentionable # Can be mentioned
# Features: nouns
module User::Avatar # Has avatar
module User::Role # Has role
module Card::Mentions # Has @mentions
template-method-concerns - @rules/template-method-concerns.md
Use template methods in shared concerns for customizable behavior.
# app/models/concerns/searchable.rb (shared)
module Searchable
def search_title
raise NotImplementedError
end
end
# app/models/card/searchable.rb (model-specific)
module Card::Searchable
include ::Searchable
def search_title
title # Implement the hook
end
end
What ships with it
16 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.
- rules/association-extensions.md 5.6 KB
- rules/callbacks-patterns.md 6.1 KB
- rules/code-style.md 7.0 KB
- rules/concern-naming.md 3.2 KB
- rules/current-attributes.md 4.6 KB
- rules/current-in-other-contexts.md 6.9 KB
- rules/fixtures-testing.md 5.8 KB
- rules/model-scoped-concerns.md 3.7 KB
- rules/nested-service-objects.md 6.0 KB
- rules/paired-async-methods.md 5.2 KB
- rules/resource-controllers.md 5.2 KB
- rules/scoping-concerns.md 6.0 KB
- rules/template-method-concerns.md 5.4 KB
- rules/thin-controllers.md 5.2 KB
- rules/thin-jobs.md 4.4 KB
- rules/turbo-broadcasts.md 6.2 KB
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.
- 10d ago First seen · 363 lines · 66 tokens per session scan A 19c15ffa43e6
ruby-on-rails-best-practices is a skill published in the GitHub repository sergiodxa/agent-skills (90 stars, last pushed 7mo ago), licensed MIT. It adds 66 tokens to every session and 2,056 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-08-30.
Other skills, from other repositories
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.
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.
ruby-rails
Conventions and best practices for building web applications with Ruby on Rails. Use when scaffolding Rails apps or generators, designing ActiveRecord models and migrations, wiring up Hotwire/Turbo/Stimulus interactivity, setting up background jobs or caching, or writing RSpec/Minitest coverage for Rails code.
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.
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…