Rails Dev logo

Rails Dev

OrganizationPopular
tech-leads-club
rails-dev

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).

Overview

Publishertech-leads-club
Repositoryagent-skills
Skill namerails-dev
Stars
6.3K
Forks
530
Bundled files
24
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 24 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by tech-leads-club on GitHub. Read the source before you install it.

Installation

Install the Rails Dev AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.

Use it in TypingMind

Enable Rails Dev in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Rails Dev on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Rails Dev is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Rails Conventions

Core Philosophy

  • Rich models - Business logic lives in models, not service objects
  • Everything is CRUD - New resource over new action (resource :closure not post :close)
  • State as records - Closure model instead of closed: boolean
  • Concerns for composition - Closeable, Watchable, Commentable
  • Explicit over clever - Inline until repetition is real; an abstraction earns its place, it isn't built on speculation
  • Small interfaces - No public method without a caller
  • Let it crash - Bang methods (create!), handle failures at the boundary, not by pre-guarding (references/error-handling.md)
  • Invariants in the schema - Hard rules (presence, uniqueness, ranges) are NOT NULL / unique / check constraints; validations are for user-facing messages, not the source of truth. References stay soft: no foreign keys, integrity at the model layer
  • Minimal dependencies - Build it yourself before reaching for gems. No Devise, Pundit, RSpec, FactoryBot, ViewComponent, service/form objects, or decorators
  • Database-backed - Solid Queue/Cache/Cable, no Redis
  • Test coverage - Maintain roughly 1:1 test ratio (1 line test per line of code)

Reference Selection

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.

TaskReference
Models, validations, associations, business logicreferences/model.md
Custom validators, validation rules reused across modelsreferences/validator.md
Error handling, rescue boundaries, reporting, retriesreferences/error-handling.md
Controllers, CRUD actionsreferences/crud.md
Routes, config/routes.rb, resource mappingreferences/routes.md
Concerns, shared behaviorreferences/concerns.md
State tracking (not booleans)references/state-records.md
Authentication, authorization, sessions, IDOR scopingreferences/auth.md
Database migrationsreferences/migration.md
Minitest, fixtures, testingreferences/test.md
Views, ERB, partials, helpers, presentation logicreferences/view.md
Turbo Frames, Turbo Streams, real-timereferences/turbo.md
Stimulus controllers, JS sprinklesreferences/stimulus.md
Background jobs, Solid Queuereferences/jobs.md
Concurrency, fibers, Async, external I/Oreferences/async.md
Mailers, email notificationsreferences/mailer.md
Fragment caching, HTTP cachingreferences/caching.md
REST API, JSON responsesreferences/api.md
Multi-tenancy, account scopingreferences/multi-tenant.md
Event tracking, activity logsreferences/events.md
Webhooks (inbound/outbound), inbox, idempotencyreferences/webhooks.md
Code review, consistency checkreferences/review.md
HTTP clients, external APIs, Faradayreferences/http-client.md
Logging, log messages, Rails.loggerreferences/logging.md

Coding style

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.

Conditionals

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.

ruby
# 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
end

Method order

Class methods, then public (with initialize first), then private. Order methods vertically by invocation: a caller sits above its callees.

ruby
# 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:)
end

Visibility

No 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.

ruby
# 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?
end

Bang methods

Use ! only when a non-bang counterpart exists (like save/save!). Never add ! just to flag a destructive or important action.

ruby
# Don't: unpaired bang used to signal "this is destructive"
def revoke! = update!(revoked_at: Time.current)

# Do: plain domain verb; the ! belongs to the paired persistence call
def revoke = update!(revoked_at: Time.current)

Method naming

Public methods are domain verbs. When a verb collides with a scope, predicate, or core method (Kernel#fail), prefix with mark_ (no bang): mark_failed. Class and concept naming live in references/model.md.

ruby
# Don't: mark_ prefix when the plain verb is free
def mark_published = update!(published_at: Time.current)

# Do: plain verb; reserve mark_ for a real collision (fail -> Kernel#fail)
def publish = update!(published_at: Time.current)
def mark_failed = update!(failed_at: Time.current)

Comments

Default to none. Most comments are noise: the code and naming should carry the meaning.

Add one only when the code can't carry it:

  • The path or code can't make the problem clear.
  • The model's language is ambiguous and a note clarifies where it sits in the domain.

Don't:

  • Restate what the code already says.
  • Section code (e.g. # ----- some_method ----- banners in tests).

When a comment earns its place:

  • Plain English, always.
  • Concise.
  • No LLM-slop vocabulary.
  • Use a list when it reads clearer than prose.
ruby
# Don't: restates what the code already says; section banner
# increment the attempts counter
attempts += 1

# ----- private helpers -----

# Do: explains the non-obvious why
# Circle returns 422 on duplicate emails, so we reconcile instead of recreating.
reconcile_member(email)

Errors

Don't swallow errors. Make the failure accessible to the caller, usually by recording it on a returned object rather than logging and returning false. Full handling conventions (record vs raise, reporting, wrapping, retries) live in references/error-handling.md.

ruby
# Don't: swallow the error; the caller can't tell it failed
def provision_circle
  circle_client.create_community_member(...)
rescue Circle::AdminClient::ApiError
  false
end

# Do: record the failure on the returned object
def provision_circle
  circle_client.create_community_member(...)
  circle_access.mark_successful(external_id: response.dig(:community_member, :id))
rescue Circle::AdminClient::ApiError => e
  circle_access.mark_failed(error: e.message)   # caller checks access.failed?
end

Sources

These conventions are adapted from, and may diverge from, these reference apps:

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Rails Dev AI skill do?

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...

Why use Rails Dev on TypingMind?

Because you install it once and use it with any model. Rails Dev is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Rails Dev in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/tech-leads-club/agent-skills/tree/main/packages/skills-catalog/skills/(development)/rails-dev. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Rails Dev?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Rails Dev?

As many as you like. As long as a model supports skills, you can use Rails Dev with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Rails Dev AI skill free?

It is published on GitHub by tech-leads-club. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇