Help us improve
Share bugs, ideas, or general feedback.
From rubyku
Rails Way patterns — thin controllers, fat models with concerns, no service classes, conventions over configuration
npx claudepluginhub ghozimahdi/gm-claude-plugins --plugin rubykuHow this skill is triggered — by the user, by Claude, or both
Slash command
/rubyku:rails-wayThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- **Convention over Configuration** — follow Rails conventions
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Structures git workflow practices for committing, branching, resolving conflicts, and organizing work across parallel streams. Use when making any code change.
Share bugs, ideas, or general feedback.
# Good — thin controller
class Admin::UsersController < Admin::ApplicationController
def create
@user = current_admin.users.build(user_params)
if @user.save
redirect_to [:admin, @user], notice: t('.success')
else
render :new, status: :unprocessable_entity
end
end
private
def user_params
params.require(:user).permit(:name, :email)
end
end
class << self for class methods (NOT def self.)task.pending? (NOT task.status == "pending")Task.status_pending (NOT Task.where(status: :pending))class Task < ApplicationRecord
include Task::StatusTransitions
include AttributeLabels
acts_as_paranoid
belongs_to :user
validates :title, presence: true
enum :status, { pending: 0, in_progress: 1, completed: 2 }
scope :due_soon, -> { where(due_at: ..3.days.from_now) }
class << self
def find_by_code(code)
find_by(code: code)
end
end
end
# BAD — display logic in model
class User < ApplicationRecord
def full_name_with_role
"#{name} (#{role.humanize})"
end
def status_color
active? ? "green" : "red"
end
end
# GOOD — display logic in helper
module UsersHelper
def user_full_name_with_role(user)
"#{user.name} (#{user.role.humanize})"
end
def user_status_color(user)
user.active? ? "green" : "red"
end
end
# BAD — service class
class TaskService
def advance(task); end
end
# GOOD — model concern
module Task::StatusTransitions
extend ActiveSupport::Concern
def advance!
case status
when "pending" then update!(status: :in_progress)
when "in_progress" then update!(status: :completed)
end
end
end
<form>, <input>)form.submit for double-click prevention (NOT <button type="submit">)Rails.application.credentials.dig(:section, :key) (NOT ENV['KEY'])Model.page(params[:page]).per(25) (Kaminari)record.destroy = soft delete (Paranoia)record.really_destroy! = permanent deletebelongs_to_active_hash :country