| name | Backend Models |
| description | Define database models and ORM classes with proper data types, relationships, constraints, and validation logic following framework conventions. Use this skill when working with model definitions, schema classes, entity files, or database table representations in files like models.py, entities.ts, schema.prisma, or models/. Applies when defining table structures, relationships (one-to-many, many-to-many), validation rules, timestamps, indexes, foreign keys, and data integrity constraints at the database level. |
Backend Models
When to use this skill
- When creating or modifying model files like
models.py,models.ts,entities.ts,models/User.js, orschema.prisma - When working in model directories such as
models/,entities/,orm/, ordatabase/ - When defining database table structures with columns, data types, and constraints
- When establishing relationships between models (one-to-many, many-to-many, belongs-to, has-many)
- When adding timestamps (
created_at,updated_at) to models for auditing purposes - When implementing model-level validation rules before database operations
- When creating or modifying foreign key relationships and cascade behaviors
- When defining database constraints like NOT NULL, UNIQUE, CHECK constraints, or default values
- When choosing appropriate data types (INTEGER, VARCHAR, TEXT, TIMESTAMP, ENUM, etc.) for columns
- When adding indexes to foreign keys or frequently queried fields for performance optimization
- When working with ORM classes in Django, SQLAlchemy, TypeORM, Prisma, Sequelize, or similar frameworks
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.
Instructions
For details, refer to the information provided in this file: backend models