claude/marketplace/plugins/sorah-guides/skills/rails/SKILL.md
This skill should be used when writing or reviewing Ruby on Rails code, or when the project uses "Rails", "ActiveRecord", "ActiveJob", "concerns", "migrations", "Rails.configuration", "request specs", or "controller". Provides Rails coding conventions, patterns, and best practices. Project-specific conventions always take priority.
npx skillsauth add sorah/config railsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Coding conventions and best practices for Ruby on Rails projects. Project-specific conventions (CLAUDE.md, style guides) always take priority over this guidance.
has_many, belongs_to, has_one — specify dependent behavior and foreign key constraintsRails.configuration.x.namespace.key with second-level namespacing; avoid single-level Rails.configuration.x.fooconfig/environments/*.rb using ENV.fetch; avoid direct ENV access in application codeRails.env checks: Do not use Rails.env.production? or similar in application code; express environment differences through configuration values instead# Good — config/environments/production.rb
Rails.configuration.x.oauth.client_id = ENV.fetch("OAUTH_CLIENT_ID")
Rails.configuration.x.session.idle_timeout = 30.minutes
# Good — application code
client_id = Rails.configuration.x.oauth.client_id
# Bad — direct ENV access in application code
client_id = ENV.fetch("OAUTH_CLIENT_ID")
# Bad — Rails.env check in application code
if Rails.env.production?
Prefer test-driven development: write a failing test first (Red), implement minimum code to pass (Green), then refactor while keeping tests green. Tests should cover both happy paths and error conditions.
let_it_be for read-only fixtures shared across examples.invalid TLD for fake hostnames and URLs in test data (RFC 2606 reserved, guaranteed to never resolve)travel_to depending on project conventionhas_secure_password or dedicated servicefilter_parameters configuration for sensitive request paramsbin/setup: Seed data, fixture files for developmentdevelopment
This skill should be used when writing or reviewing TypeScript or TSX code, or when the project uses "TypeScript", "React", "tsx", "SWR", "Vite", "Next.js", or TypeScript type patterns. Provides TypeScript coding conventions, React patterns, and best practices. Project-specific conventions always take priority.
development
This skill should be used when the user asks about "spec file format", "spec conventions", "spec vs docs", "current status section", "specification structure", "how to write a spec", "spec deliverables", or "self-contained spec". Provides conventions for writing implementation-ready specification documents.
testing
This skill should be used when conducting spec interviews or implementing specs for Ruby projects, or when the spec mentions "Ruby", "RSpec", "service objects", "Struct", or Ruby class/module patterns. Provides Ruby-specific interview and implementation checklist items.
testing
This skill should be used when conducting spec interviews or implementing specs for Ruby on Rails projects, or when the spec mentions "Rails", "ActiveRecord", "ActiveJob", "concerns", "migrations", "Rails.configuration", or "request specs". Provides Rails-specific interview and implementation checklist items.