Automatically enforces Rails naming conventions, MVC separation, and RESTful patterns
View on GitHubFebruary 2, 2026
Select agents to install to:
npx add-skill https://github.com/nbarthel/claudy/blob/5d4dc823a5e5605f0d8d004b6c8c97778d6b1b16/plugins/rails-workflow/skills/rails-conventions/skill.md -a claude-code --skill rails-conventionsInstallation paths:
.claude/skills/rails-conventions/# Rails Conventions Skill Auto-validates and enforces Rails conventions across all code changes. ## What This Skill Does **Automatic Enforcement:** - Model naming: PascalCase, singular (User, not Users) - Controller naming: PascalCase, plural, ends with Controller (UsersController) - File paths: snake_case matching class names (users_controller.rb) - RESTful routes: Standard 7 actions (index, show, new, create, edit, update, destroy) - MVC separation: No business logic in views, no SQL in controllers **When It Activates:** - Every time a .rb file is created or modified - When routes.rb is changed - When view files are created **What It Checks:** 1. **Naming Conventions** - Class names follow Rails conventions - File names match class names (snake_case ↔ PascalCase) - Variable names descriptive and snake_case - Constants in SCREAMING_SNAKE_CASE 2. **MVC Separation** - Controllers: Thin, delegate to models/services - Models: Business logic, no rendering - Views: Presentation only, minimal logic 3. **RESTful Patterns** - Routes follow REST conventions - Custom actions documented and justified - Nested routes limited to 2 levels 4. **Rails Idioms** - Use scopes over class methods for queries - Use concerns for shared behavior - Use before_action for controller filters ## Validation Examples ### Example 1: Model Naming **Input:** ```ruby # app/models/users.rb class Users < ApplicationRecord end ``` **Skill Output:** ``` ❌ Convention Violation: Model class name should be singular Expected: User Found: Users Fix: - Rename class to "User" - Rename file to "user.rb" ``` ### Example 2: Controller Naming **Input:** ```ruby # app/controllers/user.rb class User < ApplicationController end ``` **Skill Output:** ``` ❌ Convention Violation: Controller class name should be plural and end with 'Controller' Expected: UsersController Found: User ❌ File Naming: Controller file should match class name Expected: users_controller.rb