Apply core Ruby on Rails best practices for architecture, naming, safety, and maintainability. Use for most Rails coding, refactoring, and code review tasks so baseline standards stay consistent.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionrails-best-practices-coreExecute the skills CLI command in your project's root directory to begin installation:
Fetches rails-best-practices-core from marckohlbrugge/37signals-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate rails-best-practices-core. Access via /rails-best-practices-core in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
612
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
612
stars
| name | rails-best-practices-core |
| description | Apply core Ruby on Rails best practices for architecture, naming, safety, and maintainability. Use for most Rails coding, refactoring, and code review tasks so baseline standards stay consistent. |
Use this as the default baseline for Rails work. Distilled from 37signals codebases (Campfire, Fizzy) and DHH's review patterns.
dependent: :delete_all when no callbacks needed).params.expect(...) for strong params in modern Rails.create!), handle exceptions at boundaries. Only use ! when a non-bang counterpart exists.enqueue_after_transaction_commit over retry logic for races).closed: boolean, create a Closure record with creator and timestamps. You get who/when for free, and scoping is trivial:has_one :closure, dependent: :destroy
scope :closed, -> { joins(:closure) }
scope :open, -> { where.missing(:closure) }
Closeable, Watchable, Assignable), each self-contained (associations + scopes + methods), ~50-150 lines, cohesive. Prefer nested modules under the model's namespace (Card::Closeable in app/models/card/closeable.rb) for domain slices; reserve app/models/concerns/ for genuinely cross-model behavior. Never extract concerns containing only private methods.app/models/, not app/services/: presentation objects (Event::Description), complex operations (SystemCommenter), view-context bundles (User::Filtering). They're model-adjacent, not controller-adjacent.belongs_to :creator, class_name: "User", default: -> { Current.user }; belongs_to :account, default: -> { board.account }.Current.user, Current.account), with cascading setters (assigning session resolves identity, which resolves user for the account).normalizes (data cleanup before validation), store_accessor (JSON columns), delegated_type (heterogeneous collections), generates_token_for (expiring signed tokens), string enums via enum :status, %w[drafted published].index_by(&:itself), after_save_commit, touch: true chains for cache invalidation, delegate.grant_to/revise on the has_many proxy; use insert_all for bulk creates and dependent: :delete_all on join tables with no callbacks.to_param with a per-tenant number rather than exposing raw IDs/UUIDs.Closure beats CardClose; Mention beats UserReference.active not not_deleted, visible not not_hidden.belongs_to :creator, class_name: "User" not belongs_to :user.quota.depleted? not quota.over_limit?.:active, :unassigned, :golden — not SQL-ish :without_pop.source/resource/container for one concept.resource :closure (POST closes, DELETE reopens); publish → resource :publication. No custom member actions.resource for one-per-parent state; scope module: to group nested controllers (Cards::ClosuresController); shallow nesting for deep hierarchies.CardScoped sets @card via Current.user.accessible_cards.find_by!(...)) shared across nested controllers, including shared Turbo render helpers.resolve "Comment" for polymorphic URL generation to the parent with an anchor.respond_to — no separate API namespace.card.editable_by?(user), user.can_administer_board?(board)).head :forbidden unless ...), models define what the permission means.allow_unauthenticated_access, ensure_can_administer.Before adding a gem ask: can vanilla Rails do this? Is 50-150 lines in-repo simpler than a dependency? Commonly skipped: Devise, Pundit, ViewComponent, RSpec, FactoryBot, Redis (Solid Queue/Cache/Cable use the DB), service objects, form objects, decorators, GraphQL, SPA frameworks, Tailwind.
Comment.find(params[:id]))..map(&:name) where .pluck(:name) works).fresh_when/etag) — stale CSRF tokens cause 422s.status == "x") when predicate-style APIs are available (StringInquirer / string enums).validates :x, uniqueness: true without a backing unique index.html_safe strings — escape first: "<b>#{h(input)}</b>".html_safe.Ship it or a short prioritized fix list.Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
marckohlbrugge/37signals-skills
marckohlbrugge/37signals-skills
marckohlbrugge/37signals-skills
marckohlbrugge/37signals-skills
marckohlbrugge/37signals-skills
marckohlbrugge/37signals-skills
rails-best-practices-core reduced setup friction for our internal harness; good balance of opinion and flexibility.
rails-best-practices-core has been reliable in day-to-day use. Documentation quality is above average for community skills.
Registry listing for rails-best-practices-core matched our evaluation — installs cleanly and behaves as described in the markdown.
Solid pick for teams standardizing on skills: rails-best-practices-core is focused, and the summary matches what you get after install.
Useful defaults in rails-best-practices-core — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Solid pick for teams standardizing on skills: rails-best-practices-core is focused, and the summary matches what you get after install.
I recommend rails-best-practices-core for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
We added rails-best-practices-core from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Keeps context tight: rails-best-practices-core is the kind of skill you can hand to a new teammate without a long onboarding doc.
rails-best-practices-core reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 70