component-common-domai…
Finds duplicate business logic spread across multiple components and suggests consolidation. Use when asking "where is this logic…
Opinionated Rails conventions: rich models, concerns, CRUD-everything, state-as-records, minimal dependencies, Minitest with fixtures. Load this skill BEFORE any code-level thinking, not only before editing a file. It is required the moment a task touches Rails code in ANY way:
Claude Code
$ npx -y skills add tech-leads-club/agent-skills --skill rails-dev --agent claude-code
Codex
$ npx skills add tech-leads-club/agent-skills --skill rails-dev -a codex -y
Cursor
$ npx skills add tech-leads-club/agent-skills --skill rails-dev -a cursor -y
Gemini CLI
$ npx skills add tech-leads-club/agent-skills --skill rails-dev -a gemini-cli -y
GitHub Copilot
$ npx skills add tech-leads-club/agent-skills --skill rails-dev -a github-copilot -y
OpenCode
$ npx skills add tech-leads-club/agent-skills --skill rails-dev -a opencode -y
Windsurf
$ npx skills add tech-leads-club/agent-skills --skill rails-dev -a windsurf -y
name: rails-dev description: "Opinionated Rails conventions: rich models, concerns, CRUD-everything, state-as-records, minimal dependencies, Minitest with fixtures. Load this skill BEFORE any code-level thinking, not only before editing a file. It is required the moment a task touches Rails code in ANY way: designing or even just discussing a data model, schema, migration, entity, association, field, validation, class, or method name; writing, planning, reviewing, analyzing, testing, debugging, or refactoring; or proposing any model, table, column, route, or code snippet inline in chat. If you are about to name a model or sketch a column you are already in scope, even in an exploratory back-and-forth where no file is written yet. Do not let a \"we're just discussing\" framing defer it. Do NOT use for non-Rails backends, NestJS, or general architecture (use nestjs-modular-monolith or coding-guidelines)." metadata: author: William Calderipe - github.com/wcalderipe version: '1.0.0'
This table is an index, not the content. The conventions live in the reference files, not in this table, the codebase, or general Rails knowledge. Match the task to the rows below and **read those files end to end before you design, write, review, or analyze the code**. Reading the row is not reading the reference; guessing from the codebase is how the wrong convention gets shipped.
| Task | Reference | |------|-----------| | Models, validations, associations, business logic | `references/model.md` | | Custom validators, validation rules reused across models | `references/validator.md` | | Error handling, rescue boundaries, reporting, retries | `references/error-handling.md` | | Controllers, CRUD actions | `references/crud.md` | | Routes, `config/routes.rb`, resource mapping | `references/routes.md` | | Concerns, shared behavior | `references/concerns.md` | | State tracking (not booleans) | `references/state-records.md` | | Authentication, authorization, sessions, IDOR scoping | `references/auth.md` | | Database migrations | `references/migration.md` | | Minitest, fixtures, testing | `references/test.md` | | Views, ERB, partials, helpers, presentation logic | `references/view.md` | | Turbo Frames, Turbo Streams, real-time | `references/turbo.md` | | Stimulus controllers, JS sprinkles | `references/stimulus.md` | | Background jobs, Solid Queue | `references/jobs.md` | | Concurrency, fibers, Async, external I/O | `references/async.md` | | Mailers, email notifications | `references/mailer.md` | | Fragment caching, HTTP caching | `references/caching.md` | | REST API, JSON responses | `references/api.md` | | Multi-tenancy, account scoping | `references/multi-tenant.md` | | Event tracking, activity logs | `references/events.md` | | Webhooks (inbound/outbound), inbox, idempotency | `references/webhooks.md` | | Code review, consistency check | `references/review.md` | | HTTP clients, external APIs, Faraday | `references/http-client.md` | | Logging, log messages, Rails.logger | `references/logging.md` |
These are cross-cutting rules: they apply to every file, regardless of area. They do **not** replace the references. For anything area-specific (models, controllers, jobs, views, tests, …) you MUST ALWAYS load the matching reference from the table above before writing or reviewing the code.
Use an expanded `if/else` over a value-returning guard clause. A guard clause at the top of a method is fine when the body is non-trivial.
# Don't: value-returning guard clause for a simple branch
def status_label
return "closed" if closed?
"open"
end
# Do: expanded if/else
def status_label
if closed?
"closed"
else
"open"
end
endClass methods, then public (with `initialize` first), then private. Order methods vertically by invocation: a caller sits above its callees.
# Don't: callee above its caller, public after private
class Signup
def create_member = Member.create!(email:)
def call = create_member
end
# Do: class method, then the caller, then its callees
class Signup
def self.call(...) = new(...).call
def call = create_member
private
def create_member = Member.create!(email:)
endNo blank line after `private`; indent the methods beneath it. A module of only private methods marks `private` at the top with a blank line after, not indented.
# Don't: blank line after private, methods not indented
class Card
private
def closure_exists? = closure.present?
end
# Do: no blank line, indented under private
class Card
private
def closure_exists? = closure.present?
endUse `!` only when a non-bang counterpart exists (like `save`
The secure, validated skill registry for professional AI coding agents. Extend Antigravity, Claude Code, Cursor, Copilot and more with absolute confidence.
Finds duplicate business logic spread across multiple components and suggests consolidation. Use when asking "where is this logic…
Detects misplaced classes and fixes component hierarchy problems — finds code that should belong inside a component but sits at…
Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking…
Analyzes coupling between modules using the three-dimensional model (strength, distance, volatility) from "Balancing Coupling in…
Creates step-by-step decomposition plans and migration roadmaps for breaking apart monolithic applications. Use when asking "what…
Maps business domains and suggests service boundaries in any codebase using DDD Strategic Design. Use when asking "what are the…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.