rails-domain-architecture
Guides the design of model-centric Rails backends.
Install
mkdir -p .claude/skills/rails-domain-architecture && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13124" && unzip -o skill.zip -d .claude/skills/rails-domain-architecture && rm skill.zipInstalls to .claude/skills/rails-domain-architecture
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Design or refactor the backend side of Ruby on Rails codebases toward a model-centric architecture that keeps domain logic, associations, scopes, callbacks, state transitions, and test ownership close to the owning models. Use when planning backend file layout, deciding between models, concerns, and query objects, organizing scopes, extracting capabilities into app/models/<model>/, designing request boundaries, or building reusable backend testing strategies for rich Rails domains. Do not use this skill for React or other frontend UI work; use `frontend-architecture` instead.Key capabilities
- →Choose the request boundary and access-scoped entry relation
- →Keep the base model file short as the composition root
- →Put associations, scopes, callbacks, predicates, and commands in app/models/<model>/<capability>.rb
- →Use app/models/concerns only for behavior reused across multiple models
- →Keep controllers thin by loading starting relation and composing named scopes
- →Keep tests aligned with ownership at the domain or request seam
How it works
The skill applies a set of architectural rules to organize Rails domain logic, keeping models rich and controllers thin, and aligning tests with ownership.
Inputs & outputs
When to use rails-domain-architecture
- →Refactoring Rails models
- →Organizing business logic
- →Planning backend architecture
About rails-domain-architecture
Helps organize Rails domain logic into model-specific files, keeping controllers thin. It enforces patterns for associations, scopes, and commands while strictly separating UI concerns.
Design or refactor the backend side of Ruby on Rails codebases toward a model-centric architecture that keeps domain logic, associations, scopes, callbacks, state transitions, and test ownership close to the owning models. Use when planning backend file layout, deciding between models, concerns, and
When not to use it
- →When working on React or other frontend UI
- →When the change is frontend UI work
- →When the project conventions are weak or mixed legacy placement
Limitations
- →The skill is not for React or other frontend UI work
- →The skill recommends using app/models/concerns only for behavior reused across multiple models
- →The skill introduces query objects only when the query becomes a first-class subsystem
How it compares
This skill provides a model-centric approach to Rails architecture, explicitly separating domain logic from UI concerns and promoting clear ownership, unlike a generic Rails development approach.
Compared to similar skills
rails-domain-architecture side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| rails-domain-architecture (this skill) | 0 | 5mo | No flags | Advanced |
| skill-rails-upgrade | 1 | 6mo | Review | Intermediate |
| rails-expert | 0 | 7mo | No flags | Advanced |
| rails-testing | 1 | 11mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
skill-rails-upgrade
sickn33
Analyze Rails apps and provide upgrade assessments
rails-expert
Sneha-1608
Use when building or modernizing Rails applications requiring API development, Hotwire reactivity, real-time features, background job processing, deployment automation, or Rails-idiomatic patterns for maximum productivity. Version-aware: adapts to Rails 7.x and 8.x projects.
rails-testing
etewiah
Help with Rails testing including unit tests, integration tests, fixtures, and debugging test failures. Use when working on tests or debugging test issues.
ruby-pro
sickn33
Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization. Specializes in Ruby on Rails, gem development, and testing frameworks. Use PROACTIVELY for Ruby refactoring, optimization, or complex Ruby features.
upgrade-dependencies
codenamev
Upgrade all Ruby gem dependencies to their latest versions with release note review and codebase alignment checks. Use this skill whenever the user asks to update, upgrade, or bump dependencies, gems, or packages — even casually like 'update my gems' or 'are my deps up to date?'
theme-creation
etewiah
Create new themes for PropertyWebBuilder. Use when creating custom themes, styling websites, or modifying theme templates. Handles theme registration, view templates, CSS, and asset configuration.