From rails-plugin
Build well-organized Rails models that encapsulate domain logic effectively. Use when implementing domain logic for the application.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rails-plugin:modelsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides the implementation of domain logic in the model layer of a Rails application using best practices.
This skill guides the implementation of domain logic in the model layer of a Rails application using best practices.
Use when creating a new Rails model or extending an existing Rails model.
Always start with the workflow checklist. Copy the appropriate checklist and track progress through each phase:
| Task | Workflow |
|---|---|
| Create new model | New Model Workflow |
| Extending an existing model | Model Extension Workflow |
The workflow includes validation loops at each phase. Do not skip validation steps.
Consult these when implementing phases of the workflow:
| Document | Use When |
|---|---|
| Writing effective migrations | Explains how to write safe and performant migrations. Reference this document when writing a database schema migration. |
| Organizing domain logic | Explains how to effectively organize domain logic in the model layer. Reference this document when analyzing or planning the implementation. |
| Tying models together via associations | Explains how to use associations to effectively relate models to one another. Reference this document when implementing model associations. |
| Ensuring data quality | Explains best practices for model validations. Reference this document when implementing model layer data validations. |
| Using callbacks | Explains the proper use of callbacks. Reference this document when implementing business logic that should be performed as part of the model lifecycle. |
| Writing model specs | Explains best practices for writing model specs. Reference this document when implementing specs to cover model behavior. |
npx claudepluginhub dickdavis/personal-marketplace --plugin rails-pluginProvides Ruby on Rails conventions, patterns, and best practices for ActiveRecord models, controllers, migrations, configuration, background jobs, logging, and request specs.
Provides Rails Active Record patterns for models, associations, queries, validations, callbacks, and scopes. Useful for robust model implementation and optimization.
Designs Rails apps using layered architecture (Presentation→Application→Domain→Infrastructure). Analyzes violations, plans features, places code, extracts from fat models/controllers.