| name | Backend Models |
| description | Define database models with clear naming, proper data types, validation, relationships, and constraints to ensure data integrity. Use this skill when creating or modifying ORM model files, database schema definitions, model class files, or entity files. Use this when defining model relationships (has-many, belongs-to, many-to-many), setting up database constraints (NOT NULL, UNIQUE, foreign keys), adding timestamps and indexes, implementing model-level validations, or choosing appropriate data types for fields. Use this when working on files in directories like models/, entities/, app/models/, or any file that defines database table structures and relationships. |
Backend Models
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend models.
When to use this skill:
- When creating or editing model files in directories like models/, entities/, app/models/, or src/models/
- When defining ORM model classes or database entity definitions
- When setting up model relationships (has-many, belongs-to, many-to-many, polymorphic associations)
- When adding database constraints like NOT NULL, UNIQUE, foreign keys, or check constraints
- When implementing model-level validation rules and data integrity checks
- When choosing and defining appropriate data types for model fields
- When adding created_at and updated_at timestamps to models
- When creating indexes on foreign keys or frequently queried fields
- When defining cascade behaviors for delete and update operations
- When implementing model methods, scopes, or computed properties
Instructions
For details, refer to the information provided in this file: backend models