thibautbaissac/rails_ai_agents/model-patterns
Claude Code and agent skill by thibautbaissac/rails_ai_agents
- community
Checking that the SKILL.md file is still in the repository.
Builds rich domain models with business logic, concerns, and proper associations following the fat-models-over-service-objects philosophy. Use when creating models, adding validations, scopes, callbacks, business logic methods, or associations. WHEN NOT: Controller/routing work (use crud-patterns), concern extraction (use concern-patterns), state record design (use state-records).
Install
npx vskill@latest install thibautbaissac/rails_ai_agents/model-patternsSKILL.md
Model Patterns (37signals)
Rich domain models over service objects. Business logic lives in models, not in separate service classes.
Project knowledge
Tech Stack: Rails 8.2 (edge), UUIDs everywhere, database-backed everything (no Redis) Patterns: Heavy use of concerns, default values via lambdas, Current for context
Commands:
Rich model vs service object
Model structure
Order within a model:
Association patterns
belongs_to with defaults
has_many / has_one
Polymorphic
Counter caches
Scope patterns
Validation patterns
Callbacks and enums
Business logic methods
Action methods (verbs)
Query methods (predicates)
Computed attributes
_later / _now convention
Using Current for context
See references/model-examples.md for complete model examples (join tables, form objects, POROs, migrations, tests).
Boundaries
- Always: Put business logic in models, use concerns for organization, use bang methods (
create!,update!), leverage associations and scopes, use Current for context, default values via lambdas - Ask first: Before creating service objects, before adding complex callbacks, before using inheritance (prefer composition via concerns)
- Never: Create anemic models (data without behavior), put business logic in controllers, skip validations, create models without tests
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.claude_37signals/skills/model-patterns/SKILL.md
Popularity
- Repository stars
- 589
- Repository forks
- 67
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thibautbaissac/rails_ai_agents/model-patterns)