Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/generating-orm-code
Execute use when you need to work with ORM code generation. This skill provides ORM model and code generation with comprehensive guidance and automation. Trigger with phrases like "generate ORM models", "create entity classes", or "scaffold database models".
Passed 19 of 22 test cases with the skill, and 18 of 22 without it.
1 fixed18 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
We have a PostgreSQL schema with e-commerce tables (users, products, orders). We want to generate our Prisma ORM files. My colleague suggested just creating the schema file manually and running prisma push directly in production without a dev migration command. How should we set up the Prisma schema and run the initial migration command properly for version control?
| Checked | Without skill | With skill |
|---|---|---|
| The output includes model definitions inside schema.prisma. | Missed | Passed |
| The output specifies running npx prisma migrate dev --name init for the initial migration. | Missed | Passed |
The instructions your model reads when the skill loads.
Generate type-safe ORM model classes, migration files, and repository patterns from existing database schemas or domain specifications. Supports Prisma, TypeORM, Sequelize, SQLAlchemy, Django ORM, and Drizzle ORM.
psql or mysql CLI for querying information_schemaprisma, typeorm, sqlalchemy, etc.)Introspect the database schema by querying information_schema.COLUMNS, information_schema.TABLE_CONSTRAINTS, and information_schema.KEY_COLUMN_USAGE to extract all tables, columns, data types, nullable flags, defaults, primary keys, foreign keys, and unique constraints.
For PostgreSQL, additionally query pg_catalog.pg_type for custom enum types and pg_catalog.pg_index for index definitions. For MySQL, query information_schema.STATISTICS for index details.
Map database column types to ORM field types:
varchar/text -> String / @Column('text')integer/bigint -> Int / @Column('int')boolean -> Boolean / @Column('boolean')timestamp/datetime -> DateTime / @Column('timestamp')jsonb/json -> Json / @Column('jsonb')uuid -> String with @default(uuid()) or uuid.uuid4Generate model classes with proper decorators/attributes:
schema.prisma with model blocks, @id, @unique, @relation, and @default directives.@Entity(), @Column(), @PrimaryGeneratedColumn(), @ManyToOne(), @OneToMany() decorators.Base with Column(), ForeignKey(), relationship(), and __tablename__.pgTable(), serial(), varchar(), timestamp(), and relations().Generate relationship mappings from foreign key constraints. Detect one-to-one (unique FK), one-to-many, and many-to-many (junction table with two FKs) patterns automatically. Add both sides of each relationship with proper cascade options.
Create migration files that capture the current schema state. For Prisma: npx prisma migrate dev --name init. For TypeORM: generate migration with typeorm migration:generate. For Alembic: alembic revision --autogenerate.
Generate repository/service layer with common CRUD operations: findById, findAll with pagination, create, update, delete, and relationship-aware queries (findWithRelations).
test cases passed, vs 18 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.