store-model-coder
Installation
SKILL.md
StoreModel: JSON-Backed ActiveRecord Attributes
Wrap JSON-backed database columns with ActiveModel-like classes for type safety, validations, and clean separation of concerns.
When to Use This Skill
- Configuration objects with validated fields
- Nested attributes stored in JSON columns
- JSON data requiring type safety and ActiveModel behavior
- Separating JSON logic from parent ActiveRecord model
When NOT to Use StoreModel
| Scenario | Better Alternative |
|---|---|
| Simple key-value settings | ActiveRecord::Store or store_accessor |
| Need database-level queries on JSON | Raw jsonb with PostgreSQL operators |
| Data needs relationships/joins | Normalize into separate tables |
| Truly simple JSON without validation | Plain JSON column access |