Skip to main content 홈 크리에이터 ilude claude-code-config rails-workflow
rails-workflow Ruby on Rails framework workflow guidelines. Activate when working with Rails projects, Gemfile with rails, rake tasks, or Rails-specific patterns.
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ilude/claude-code-config --skill rails-workflow명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... 이 저장소의 다른 Skills Activate when user needs multi-URL scraping, browser automation pipelines, or efficient tool orchestration to reduce API round-trips and context usage.
Language-agnostic API design patterns covering REST and GraphQL, including resource naming, HTTP methods, status codes, versioning, pagination, filtering, authentication, error handling, and schema design. Activate when working with APIs, REST endpoints, GraphQL schemas, API documentation, OpenAPI/Swagger, JWT, OAuth2, endpoint design, API versioning, rate limiting, or GraphQL resolvers.
Git workflow and commit guidelines. Trigger keywords: git, commit, push, .git, version control. MUST be activated before ANY git commit, push, or version control operation. Includes security scanning for secrets (API keys, tokens, .env files), commit message formatting with HEREDOC, logical commit grouping (docs, test, feat, fix, refactor, chore, build, deps), push behavior rules, safety rules for hooks and force pushes, and CRITICAL safeguards for destructive operations (filter-branch, gc --prune, reset --hard). Activate when user requests committing changes, pushing code, creating commits, rewriting history, or performing any git operations including analyzing uncommitted changes.
name rails-workflow description Ruby on Rails framework workflow guidelines. Activate when working with Rails projects, Gemfile with rails, rake tasks, or Rails-specific patterns. location user
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Rails Workflow
Tool Grid
Task Tool Command Lint StandardRB + standard-rails bundle exec standardrbSecurity Brakeman bundle exec brakemanTest RSpec Rails bundle exec rspecConsole Rails bundle exec rails consoleServer Rails bundle exec rails serverRoutes Rails bundle exec rails routes
Rails 8.x Features
Built-in Authentication
bundle exec rails generate authentication
Creates User with password_digest, Session controller, and authentication concern. You SHOULD use built-in auth for new projects.
Solid Queue (Background Jobs)
Database-backed, no Redis required. Rails 8 default.
config.active_job.queue_adapter = :solid_queue
Solid Cache & Solid Cable Database-backed caching and Action Cable adapter:
config.cache_store = :solid_cache_store
adapter: solid_cable
Controller Patterns Controllers MUST delegate business logic to service objects:
def create
result = Orders : :CreateService .call(order_params, current_user)
result.success? ? redirect_to(result.order) : render(:new , status: :unprocessable_entity )
end
Strong Parameters You MUST use strong parameters. NEVER use params.permit! in production:
def user_params
params.require (:user ).permit(:name , :email , address_attributes: [:street , :city ])
end
Service Objects Services MUST follow a consistent pattern:
module Orders
class CreateService
Result = Struct .new(:success? , :order , :errors , keyword_init: true )
def self .call(...) = new(...).call
def initialize (params, user )
@params , @user = params, user
end
def call
order = Order .new(@params .merge(user: @user , status: :pending ))
order.save ? Result .new(success?: true , order: ) : Result .new(success?: false , order: , errors: order.errors)
end
end
end
Naming: CreateService, UpdateService, ProcessService, SyncService
Model Organization Models SHOULD follow this order:
class User < ApplicationRecord
ROLES = %w[admin member guest] .freeze
belongs_to :organization
has_many :posts , dependent: :destroy
validates :email , presence: true , uniqueness: true
validates :role , inclusion: { in: ROLES }
after_create :send_welcome_email
scope :active , -> { where(active: true ) }
scope :admins , -> { where(role: "admin" ) }
end
For complex queries, extract to query objects in app/queries/.
Security
Brakeman You MUST run Brakeman before deployment. All warnings MUST be resolved:
bundle exec brakeman --no-pager
Common Patterns
User .where("email = ?" , params[:email ])
User .where("email = '#{params[:email ]} '" )
<%= sanitize @user .bio %>
Background Jobs class ProcessOrderJob < ApplicationJob
queue_as :default
retry_on StandardError , wait: :polynomially_longer , attempts: 5
discard_on ActiveRecord : :RecordNotFound
def perform (order_id )
Orders : :ProcessService .call(Order .find(order_id))
end
end
Action Cable class NotificationsChannel < ApplicationCable::Channel
def subscribed
stream_for current_user
end
end
NotificationsChannel .broadcast_to(user, { type: "new_message" , content: message.body })
View Components class ButtonComponent < ViewComponent::Base
def initialize (text: , variant: :primary )
@text , @variant = text, variant
end
def call
tag.button(@text , class: "btn btn-#{@variant } " )
end
end
Hotwire / Stimulus
Turbo Frames <%= turbo_frame_tag "user_stats", src: user_stats_path, loading: :lazy %>
Turbo Streams respond_to do |format |
format.turbo_stream
format.html { redirect_to @post }
end
<%= turbo_stream.prepend "comments", @comment %>
Stimulus Controllers import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["input" , "output" ]
validate ( ) {
this .outputTarget .textContent = this .inputTarget .value .length > 0 ? "Valid" : "Required"
}
}
<div data-controller="form">
<input data-form-target="input" data-action="input->form#validate">
<span data-form-target="output"></span>
</div>
Testing
Model Specs RSpec .describe User , type: :model do
it { is_expected.to validate_presence_of(:email ) }
it { is_expected.to have_many(:posts ).dependent(:destroy ) }
end
Request Specs RSpec .describe "Posts" , type: :request do
it "creates a post" do
sign_in(user)
expect { post posts_path, params: { post: valid_attributes } }.to change(Post , :count ).by(1 )
end
end
Database You MUST use reversible migrations:
class AddStatusToOrders < ActiveRecord::Migration [8.0 ]
def change
add_column :orders , :status , :string , default: "pending" , null: false
add_index :orders , :status
end
end
File Structure app/
channels/
components/
controllers/
jobs/
models/
queries/
services/
views/
config/
solid_queue.yml
cable.yml
spec/
factories/
models/
requests/
services/