rails-stack-conventions

Aligns Rails MVC components to PostgreSQL, Hotwire, Tailwind conventions.

22|6|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/igmarin/rails-agent-skills --skill rails-stack-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-stack-conventions
Source: https://github.com/igmarin/rails-agent-skills/tree/main/rails-stack-conventions
Command: npx skills add https://github.com/igmarin/rails-agent-skills --skill rails-stack-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a unified set of conventions for Rails projects to reduce drift and accelerate onboarding, especially in teams using PostgreSQL, Hotwire, and Tailwind CSS.

Core Features & Use Cases

  • Naming conventions: snake_case for files and methods; CamelCase for classes.
  • MVC structure and ActiveRecord patterns: encourages concerns for complex logic, eager loading, and clear responsibilities.
  • Frontend integration: Hotwire (Turbo + Stimulus) and Tailwind CSS guidelines for components and styling.
  • Security defaults and performance practices: defense-in-depth, proper params, and indexing guidance.
  • Use Case: when starting new controllers, views, or models in a Rails project; this skill should be consulted for consistency, while rails-code-conventions handles per-path architecture rules.

Quick Start

Follow these conventions when creating new controllers, models, or views in a Rails project using PostgreSQL, Hotwire, and Tailwind CSS.

Frequently Asked Questions about rails-stack-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the standard Rails naming conventions for files, methods, and classes?

Standard Rails naming conventions use snake_case for files and methods, and CamelCase for classes. Adopting these naming conventions ensures your Rails project maintains consistent architecture and reduces code drift across the development team.

How do I structure new Rails controllers and models with PostgreSQL and Hotwire?

Structure new Rails controllers and models by following MVC patterns, using concerns for complex logic, and applying eager loading for PostgreSQL. This ensures clear responsibilities and consistent frontend integration with Hotwire and Tailwind CSS.

Does this Rails convention set work with a Tailwind CSS and Hotwire stack?

Yes, these Rails conventions are specifically designed for a PostgreSQL, Hotwire, and Tailwind CSS stack. They provide targeted guidelines for frontend integration, component styling, and structured design guidance to accelerate team onboarding.

What is the best way to manage complex logic in Rails ActiveRecord models?

The best way to manage complex logic in Rails ActiveRecord models is by using concerns. This approach enforces clear responsibilities and maintains MVC structure, preventing logic drift and ensuring scalable, consistent code architecture.

How do I enforce testing rules and security defaults in a Rails project?

Enforce testing rules and security defaults by applying hard-gate testing and defense-in-depth practices. This includes proper parameter handling and database indexing guidance to maintain robust security and performance standards across your Rails application.