---
name: generating-orm-code-5c5982cde668
description: |
  This skill enables Claude to generate ORM models and database schemas. It is triggered when the user requests the creation of ORM models, database schemas, or wishes to generate code for interacting with databases. The skill supports various ORMs including TypeORM, Prisma, Sequelize, SQLAlchemy, Django ORM, Entity Framework, and Hibernate. Use this skill when the user mentions terms like "ORM model", "database schema", "generate entities", "create migrations", or specifies a particular ORM framework like "TypeORM entities" or "SQLAlchemy models". It facilitates both database-to-code and code-to-database schema generation.
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---

## Overview

This skill empowers Claude to automate the creation of Object-Relational Mapping (ORM) models and database schemas, significantly accelerating backend development. It handles generating code for various ORM frameworks, simplifying database interactions.

## How It Works

1. **Identify ORM and Language**: The skill parses the user's request to determine the target ORM framework (e.g., TypeORM, SQLAlchemy) and programming language (e.g., TypeScript, Python).
2. **Schema/Model Definition**: Based on the request, the skill either interprets an existing database schema or defines a new schema based on provided model specifications.
3. **Code Generation**: The skill generates the corresponding ORM model code, including entities, relationships, and any necessary configuration files, tailored to the chosen ORM framework.

## When to Use This Skill

This skill activates when you need to:
- Create ORM models from a database schema.
- Generate a database schema from existing ORM models.
- Generate model code for a specific ORM framework (e.g., TypeORM, Prisma).

## Examples

### Example 1: Generating TypeORM entities

User request: "Generate TypeORM entities for a blog with users, posts, and comments, including relationships and validation rules."

The skill will:
1. Generate TypeScript code defining TypeORM entities for `User`, `Post`, and `Comment`, including properties, relationships (e.g., one-to-many), and validation decorators.
2. Output the generated code, ready to be integrated into a TypeORM project.

### Example 2: Creating a SQLAlchemy schema

User request: "Create a SQLAlchemy schema for an e-commerce application with products, categories, and orders."

The skill will:
1. Generate Python code defining SQLAlchemy models for `Product`, `Category`, and `Order`, including relationships (e.g., many-to-one), data types, and primary/foreign key constraints.
2. Output the generated code, ready to be used with SQLAlchemy.

## Best Practices

- **Specificity**: Be as specific as possible about the desired ORM framework and data model.
- **Relationships**: Clearly define relationships between entities (e.g., one-to-many, many-to-many).
- **Validation**: Specify validation rules to ensure data integrity.

## Integration

This skill integrates with other code generation tools and plugins within Claude Code, allowing for seamless integration into existing projects and workflows. It can be used in conjunction with database migration tools to create and manage database schemas.

---
Source attribution: BbgnsurfTech
Original project: https://github.com/BbgnsurfTech/claude-skills-collection/blob/01d3fafeca1133f841956b8b90b939fee92d71e7/plugins/claude-code-plugins-plus/backups/skill-structure-cleanup-20251108-073936/plugins/database/orm-code-generator/skills/orm-code-generator/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2025 Jeremy Longshore

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: BbgnsurfTech
Original project: https://github.com/BbgnsurfTech/claude-skills-collection/blob/01d3fafeca1133f841956b8b90b939fee92d71e7/plugins/claude-code-plugins-plus/backups/skill-structure-cleanup-20251108-073936/plugins/database/orm-code-generator/skills/orm-code-generator/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Backend Developer, Data Engineer, Product Manager
Specialties: API, Backend, Database
Tools: Hibernate, Prisma, Sqlalchemy, Sequelize, Typeorm, Entity Framework, Django Orm
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 13f63fad66f567ffb149da1755f58b438b9cff0230ebc4d136f71a5118609df8
