schema-generator

Generate Drizzle ORM PostgreSQL table schemas in TypeScript matching project conventions.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/QING-YU123/hono-drizzle-template --skill schema-generator-qing-yu123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schema-generator
Source: https://github.com/QING-YU123/hono-drizzle-template/tree/main/.claude/skills/schema-generator
Command: npx skills add https://github.com/QING-YU123/hono-drizzle-template --skill schema-generator-qing-yu123

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of designing and implementing database schemas for your Drizzle ORM projects, ensuring consistency with your existing codebase and best practices.

Core Features & Use Cases

  • Schema Design Assistance: Guides users through defining new database tables, including fields, types, constraints, and relationships.
  • Code Style Adherence: Analyzes existing project schemas to ensure new designs match the established coding style and patterns.
  • Relationship Management: Helps in designing one-to-many, many-to-many, and self-referencing relationships.
  • Use Case: A developer needs to add a new products table to their PostgreSQL database using Drizzle ORM. They use this Skill to define the table structure, including fields like name, price, stock, and establish a foreign key relationship with a categories table, all while adhering to the project's existing schema conventions.

Quick Start

Use the schema-generator skill to design a new 'users' table with 'name' and 'email' fields.

Frequently Asked Questions about schema-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Drizzle ORM schemas for PostgreSQL in TypeScript?

To generate Drizzle ORM schemas for PostgreSQL, define your table structures including fields, primary keys, foreign keys, and timestamps in TypeScript, and the tool will output schema files adhering to project conventions.

Can I automatically match new database tables to my existing Drizzle ORM code style?

Yes, you can match new database tables to existing Drizzle ORM code style by analyzing your existing project schemas for coding patterns, field types, and relationship definitions before generating new schema files.

How do I define foreign keys with cascade options in a Drizzle ORM schema?

To define foreign keys with cascade options in a Drizzle ORM schema, specify the relationship constraints during table design, allowing you to establish one-to-many and many-to-many connections with cascade behaviors.

What is the best way to add unique constraints and timestamps to a PostgreSQL schema using Drizzle ORM?

The best way to add unique constraints and timestamps to a PostgreSQL schema using Drizzle ORM is to define these constraints directly within your TypeScript table structure during the schema design process.

Does this schema generator support self-referencing relationships for PostgreSQL tables?

Yes, the schema generator supports self-referencing relationships for PostgreSQL tables, allowing you to design complex relational structures alongside standard primary keys and foreign key constraints.

How do I manage many-to-many relationships when designing Drizzle ORM database schemas?

To manage many-to-many relationships when designing Drizzle ORM database schemas, use the relationship management features to configure intermediate tables and foreign keys that adhere to your project's established conventions.