Rails Patterns
affaan-m/ECC
Ruby on Rails framework patterns for Rails 7.1+ and 8.x apps.
Builds Rails 7+ apps with Hotwire Turbo Frames and Streams, Active Record tuning, Action Cable, Sidekiq jobs and RSpec specs, with migration and N+1 checks.
$ npx skills add Jeffallan/claude-skills --skill rails-expert -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Jeffallan/claude-skills rails-expert --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rails-expert .claude/skills/rails-expert && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rails-expert" agent skill from https://github.com/Jeffallan/claude-skills/tree/main/skills/rails-expert into .claude/skills/rails-expert/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rails-expert", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Jeffallan/claude-skills/tree/main/skills/rails-expertType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Jeffallan/claude-skills --skill rails-expert -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Jeffallan/claude-skills rails-expert --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/rails-expert .agents/skills/rails-expert && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rails-expert" agent skill from https://github.com/Jeffallan/claude-skills/tree/main/skills/rails-expert into .agents/skills/rails-expert/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rails-expert", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Jeffallan/claude-skills --skill rails-expert -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Jeffallan/claude-skills rails-expert --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/rails-expert .cursor/skills/rails-expert && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rails-expert" agent skill from https://github.com/Jeffallan/claude-skills/tree/main/skills/rails-expert into .cursor/skills/rails-expert/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rails-expert", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Jeffallan/claude-skills.git --path skills/rails-expert--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Jeffallan/claude-skills --skill rails-expert -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Jeffallan/claude-skills rails-expert --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/rails-expert .gemini/skills/rails-expert && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rails-expert" agent skill from https://github.com/Jeffallan/claude-skills/tree/main/skills/rails-expert into .gemini/skills/rails-expert/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rails-expert", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Jeffallan/claude-skills rails-expertInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Jeffallan/claude-skills --skill rails-expert -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/rails-expert .github/skills/rails-expert && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rails-expert" agent skill from https://github.com/Jeffallan/claude-skills/tree/main/skills/rails-expert into .github/skills/rails-expert/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rails-expert", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Jeffallan/claude-skills --skill rails-expert -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Jeffallan/claude-skills rails-expert --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/rails-expert .opencode/skills/rails-expert && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rails-expert" agent skill from https://github.com/Jeffallan/claude-skills/tree/main/skills/rails-expert into .opencode/skills/rails-expert/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rails-expert", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rails-expertBuilds Rails 7+ apps with Hotwire Turbo Frames and Streams, Active Record tuning, Action Cable, Sidekiq jobs and RSpec specs, with migration and N+1 checks.
The agent identifies models, routes, real-time needs and background jobs, scaffolds with rails generate, runs rails db:migrate and verifies the schema, then writes controllers and models and adds Hotwire. Validation needs bundle exec rspec to pass and bundle exec rubocop for style. Failure paths are spelled out: inspect db/schema.rb and roll back a failed migration, rerun specs in documentation format, and add includes or eager_load when N+1 queries appear. A final pass audits N+1 queries, missing indexes and caching.
Reference files cover Hotwire with Turbo Frames, Streams and Stimulus, Active Record associations and performance, Sidekiq job design, RSpec model, request and system specs with factories, and API-only mode with serialization and authentication. The patterns shown are N+1 prevention, a Turbo Frame partial update, a welcome email job and strong parameters in a controller.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 1be15d8. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
railsbundleFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comsynergetic.solutionsjeffallan.github.ioFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Rails Expert loads about 1.4k tokens when it runs, and up to ~9.8k if it reads all its reference files. Until then it costs about 130 tokens; SKILL.md has 319 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Jeffallan/claude-skills at commit 1be15d8, republished under its MIT licence (© Jeffallan). 319 words, ~1,416 tokens.
.claude/skills/rails-expert/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.rails generate model User name:string email:string, rails generate controller Usersrails db:migrate and verify schema with rails db:schema:dumpdb/schema.rb for conflicts, rollback with rails db:rollback, fix and retrybundle exec rspec must pass; bundle exec rubocop for style--format documentation for detailincludes/eager_load (see Common Patterns) and re-run specsLoad detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Hotwire/Turbo | references/hotwire-turbo.md | Turbo Frames, Streams, Stimulus controllers |
| Active Record | references/active-record.md | Models, associations, queries, performance |
| Background Jobs | references/background-jobs.md | Sidekiq, job design, queues, error handling |
| Testing | references/rspec-testing.md | Model/request/system specs, factories |
| API Development | references/api-development.md | API-only mode, serialization, authentication |
# BAD — triggers N+1
posts = Post.all
posts.each { |post| puts post.author.name }
# GOOD — eager load association
posts = Post.includes(:author).all
posts.each { |post| puts post.author.name }
# GOOD — eager_load forces a JOIN (useful when filtering on association)
posts = Post.eager_load(:author).where(authors: { verified: true })<%# app/views/posts/index.html.erb %>
<%= turbo_frame_tag "posts" do %>
<%= render @posts %>
<%= link_to "Load More", posts_path(page: @next_page) %>
<% end %>
<%# app/views/posts/_post.html.erb %>
<%= turbo_frame_tag dom_id(post) do %>
<h2><%= post.title %></h2>
<%= link_to "Edit", edit_post_path(post) %>
<% end %># app/controllers/posts_controller.rb
def index
@posts = Post.includes(:author).page(params[:page])
@next_page = @posts.next_page
end# app/jobs/send_welcome_email_job.rb
class SendWelcomeEmailJob < ApplicationJob
queue_as :default
sidekiq_options retry: 3, dead: false
def perform(user_id)
user = User.find(user_id)
UserMailer.welcome(user).deliver_now
rescue ActiveRecord::RecordNotFound => e
Rails.logger.warn("SendWelcomeEmailJob: user #{user_id} not found — #{e.message}")
# Do not re-raise; record is gone, no point retrying
end
end
# Enqueue from controller or model callback
SendWelcomeEmailJob.perform_later(user.id)# app/controllers/posts_controller.rb
class PostsController < ApplicationController
before_action :set_post, only: %i[show edit update destroy]
def create
@post = Post.new(post_params)
if @post.save
redirect_to @post, notice: "Post created."
else
render :new, status: :unprocessable_entity
end
end
private
def set_post
@post = Post.find(params[:id])
end
def post_params
params.require(:post).permit(:title, :body, :published_at)
end
endincludes/eager_load on every collection query involving associationsWHERE, ORDER BY, or JOINsanitize_sql or parameterized queries only)When implementing Rails features, provide:
Maintained by @jeffallan, Principal Consultant at Synergetic Solutions
© Jeffallan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in skills/rails-expert of Jeffallan/claude-skills.
Open the folder on GitHubat commit 1be15d8
Rails Expert next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rails Expert this skillJeffallan/claude-skills | 12k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Rails Patternsaffaan-m/ECC | 276k | — | ~4.1k | Automated safety check: Pass | MIT | |
| Ruby Patternssoftspark/ai-toolkit | 179 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Railsericrisco/rsc-harness | 174 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Ruby Rulessoftspark/ai-toolkit | 179 | — | ~3.4k | Automated safety check: Pass | Apache-2.0 | |
| Rails Idiomsirahardianto/awesome-agv | 157 | — | ~1.8k | Automated safety check: Pass | MIT |
affaan-m/ECC
Ruby on Rails framework patterns for Rails 7.1+ and 8.x apps.
softspark/ai-toolkit
Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami.
ericrisco/rsc-harness
A skill your agent uses when building or maintaining a Ruby on Rails app — models, controllers, views, routes and migrations; ActiveRecord associations, scopes and query performance; Hotwire (Turbo…
softspark/ai-toolkit
Ruby coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.
irahardianto/awesome-agv
Ruby on Rails framework patterns: ActiveRecord scopes, N+1 query prevention, model validations, RESTful routing, and RSpec/Minitest testing.
ericrisco/rsc-harness
A skill your agent uses when writing or refactoring plain Ruby outside Rails — scripts, CLIs, gems, libraries: Enumerable chains and blocks, module mixins and value objects, Bundler/gemspec…
Jeffallan/claude-skills
Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.
Jeffallan/claude-skills
Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.
Jeffallan/claude-skills
Creates and checks Kubernetes manifests, Helm charts, RBAC and network policies, and helps debug pod problems, with kubectl checks and rollback steps.
Jeffallan/claude-skills
Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.
Jeffallan/claude-skills
Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.
Jeffallan/claude-skills
Guides writing and tuning Apache Spark jobs: DataFrame and RDD code, Spark SQL, partitioning, caching, shuffle tuning and structured streaming.
Works with
Categories
Builds Rails 7+ apps with Hotwire Turbo Frames and Streams, Active Record tuning, Action Cable, Sidekiq jobs and RSpec specs, with migration and N+1 checks. The agent identifies models, routes, real-time needs and background jobs, scaffolds with rails generate, runs rails db:migrate and verifies the schema, then writes controllers and models and adds Hotwire. Validation needs bundle exec rspec to pass and bundle exec rubocop for style.
Rails Expert fits situations like: building a Rails 7 app with Turbo Frames and Turbo Streams; fixing N+1 queries with includes or eager_load; adding Sidekiq background jobs for email or other slow work; setting up Action Cable for real-time updates.
Run `npx skills add Jeffallan/claude-skills --skill rails-expert -a claude-code`. Or copy the skill folder (skills/rails-expert in Jeffallan/claude-skills) into .claude/skills/rails-expert in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Jeffallan/claude-skills --skill rails-expert -a codex`. Or copy the skill folder (skills/rails-expert in Jeffallan/claude-skills) into .agents/skills/rails-expert in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jeffallan/claude-skills --skill rails-expert -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rails-expert, .gemini/skills/rails-expert, .github/skills/rails-expert and .opencode/skills/rails-expert in your project.
Going by SKILL.md and its folder, Rails Expert needs the command-line tools its instructions call (rails and bundle). Our summary lists: A Rails 7+ project with RSpec and RuboCop.
SKILL.md names 3 domains. As links in the text: github.com, synergetic.solutions and jeffallan.github.io. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Rails Expert is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Rails Expert: Rails Patterns (affaan-m/ECC, 276k stars), Ruby Patterns (softspark/ai-toolkit, 179 stars), Rails (ericrisco/rsc-harness, 174 stars) and Ruby Rules (softspark/ai-toolkit, 179 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Jeffallan (a GitHub user) maintains it in Jeffallan/claude-skills, which has 11,788 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 3, 2026.
Source: Jeffallan/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.