本文へ移動
cccskills
無料GitHub で公開

drizzle-schema-architect

Generates strictly typed Drizzle ORM schemas for PostgreSQL with indexes, foreign keys, and Zod schema deduction.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Drizzle Schema Architect

Core Principles

  1. Strict Typing: All table columns must be explicitly typed. Do not rely on loose implicit types.
  2. PostgreSQL Focus: Use pg-specific column types (e.g. pgTable, uuid, timestamp, varchar, integer).
  3. Zod Validation Integration: Always output Zod schemas inferred from Drizzle schemas using drizzle-zod's createInsertSchema and createSelectSchema.

Schema Guidelines

  • Primary Keys: Prefer UUIDs generated by gen_random_uuid() or autoincrementing integers depending on the table volume.
  • Indices: Declare explicit indexes on foreign key columns and query filters.
  • Dates: Always store timestamps using timestamp('created_at', { withTimezone: true, mode: 'date' }).defaultNow().notNull().

Example Schema Pattern

import { pgTable, uuid, varchar, timestamp, index } from 'drizzle-orm/pg-core';
import { createInsertSchema, createSelectSchema } from 'drizzle-zod';

export const users = pgTable('users', {
  id: uuid('id').defaultRandom().primaryKey(),
  email: varchar('email', { length: 255 }).notNull().unique(),
  name: varchar('name', { length: 255 }),
  createdAt: timestamp('created_at', { withTimezone: true, mode: 'date' }).defaultNow().notNull(),
}, (table) => [
  index('email_idx').on(table.email)
]);

export const insertUserSchema = createInsertSchema(users);
export const selectUserSchema = createSelectSchema(users);

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when adding monitoring, metrics, logging, or tracing to Spring AI or LLM integration code. Covers token tracking, latency measurement, cost estimation, and prompt/response logging. Use when user mentions AI monitoring, token costs, or LLM observability.

日本語の概要は準備中です。原文の説明を表示しています。

lgzarturo/springboot-course32026年10月12日 更新

android

無料

Provides expert knowledge for building modern native Android apps using Kotlin, Jetpack Compose, Material Design 3, MVI architecture, Hilt dependency injection, and Media3/ExoPlayer.

日本語の概要は準備中です。原文の説明を表示しています。

lgzarturo/springboot-course32026年10月12日 更新

Design, implement, review, and audit Android Jetpack Compose UI/UX for phone interfaces. Use when a request concerns concrete Compose layout, components, interaction, accessibility, or visual behavior. Do not activate for framework or dependency presence alone; non-UI Android work is excluded.

日本語の概要は準備中です。原文の説明を表示しています。

lgzarturo/springboot-course32026年10月12日 更新

Provides expert knowledge for designing, implementing, and managing REST API versioning strategies with deprecation workflows.

日本語の概要は準備中です。原文の説明を表示しています。

lgzarturo/springboot-course32026年10月12日 更新

astro

無料

Provides expert knowledge for building Astro 5+ sites with Islands Architecture, Content Collections, TypeScript, and performance-first rendering strategies.

日本語の概要は準備中です。原文の説明を表示しています。

lgzarturo/springboot-course32026年10月12日 更新

Audits token storage mechanisms to prevent XSS-based JWT theft.

日本語の概要は準備中です。原文の説明を表示しています。

lgzarturo/springboot-course32026年10月12日 更新

lgzarturo のスキルをすべて見る

このスキルの問題を報告する