backend-models
Define and structure database models and entities with proper naming conventions, timestamps, data integrity constraints, relationships, and validation layers. Use this skill when creating or modifying ORM model definitions, database entity classes, schema definitions, or data access layer objects. Use when working with TypeORM entities, Sequelize models, SQLAlchemy models, Mongoose schemas, Django models, Prisma schema files, or any framework-specific model files (models.ts, entities.py, schema.prisma, models.py). Use when defining table structures, foreign key relationships, database constraints (NOT NULL, UNIQUE), indexes, or multi-layer validation rules. Use when implementing repository patterns or designing data models that balance normalization with query performance.
When & Why to Use This Skill
This Claude skill streamlines backend development by automating the definition and structuring of database models and entities. It ensures high-quality code through standardized naming conventions, robust data integrity constraints, and efficient relationship mapping across popular ORMs and frameworks like TypeORM, Prisma, and SQLAlchemy. By balancing normalization with query performance, it helps developers build scalable and maintainable data access layers.
Use Cases
- Designing complex relational database schemas with intricate one-to-many or many-to-many relationships and foreign key constraints.
- Implementing multi-layer data validation and integrity rules (such as NOT NULL, UNIQUE, and custom indexes) within ORM model definitions.
- Refactoring existing database entities to improve performance, add timestamps (createdAt/updatedAt), or align with modern coding standards.
- Generating boilerplate code for repository patterns and data access objects (DAOs) across various frameworks like Django, Mongoose, or Sequelize.
- Optimizing database architecture by choosing appropriate data types and implementing indexing strategies for frequently queried columns.
| name | Backend Models |
|---|---|
| description | Define and structure database models and entities with proper naming conventions, timestamps, data integrity constraints, relationships, and validation layers. Use this skill when creating or modifying ORM model definitions, database entity classes, schema definitions, or data access layer objects. Use when working with TypeORM entities, Sequelize models, SQLAlchemy models, Mongoose schemas, Django models, Prisma schema files, or any framework-specific model files (models.ts, entities.py, schema.prisma, models.py). Use when defining table structures, foreign key relationships, database constraints (NOT NULL, UNIQUE), indexes, or multi-layer validation rules. Use when implementing repository patterns or designing data models that balance normalization with query performance. |
Backend Models
This Skill provides Claude Code with specific guidance on how to adhere to coding standards for database models and entity design.
When to use this skill
- When creating or modifying ORM model/entity definition files
- When working with model files (models.ts, entities.py, schema.prisma, models.py, models.rb, etc.)
- When defining database table structures and column properties
- When setting up relationships between models (one-to-many, many-to-many, etc.)
- When implementing database constraints (NOT NULL, UNIQUE, foreign keys)
- When adding timestamps (createdAt, updatedAt) to models
- When choosing appropriate data types for model fields
- When creating indexes on frequently queried columns
- When implementing validation at the model layer
- When designing repository patterns for data access
- When balancing database normalization with query performance needs
- When defining cascade behaviors for related entities
Instructions
For details, refer to the information provided in this file: backend models