new-repository
Add a new SQLKit repository to persistence-repositories.ts and a corresponding Drizzle schema table to schemas.ts
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Add a new SQLKit repository to persistence-repositories.ts and a corresponding Drizzle schema table to schemas.ts
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Generate a semver-compliant release note from git history; on user confirmation, bump version, update CHANGELOG, create git tag, and publish a GitHub Release with gh
Scaffold a new backend server action with auth check, Zod input validation, repository call, and error handling
Scaffold a typed React client component with props interface, Tailwind styling, and shadcn/ui primitives
Scaffold a React Hook Form with Zod validation, useMutation, and toast notifications
Create a Zod input schema file in src/backend/services/inputs/ for a domain entity
Scaffold a Next.js App Router page with optional server-side session check, metadata, and layout
| name | new-repository |
| description | Add a new SQLKit repository to persistence-repositories.ts and a corresponding Drizzle schema table to schemas.ts |
Add a new database entity to techdiary.dev: Drizzle schema table + SQLKit repository.
src/backend/persistence/schemas.ts (Drizzle, used for migrations only)src/backend/persistence/persistence-repositories.tssrc/backend/persistence/persistence-contracts.tssrc/backend/models/domain-models.tsbun run db:generate then bun run db:push after schema changespgTable from drizzle-orm/pg-core for the schema definitionnew Repository<DomainModel>(DatabaseTableName.<entity>, pgClient)persistenceRepository export objectschemas.tsimport { pgTable, text, timestamp, boolean } from "drizzle-orm/pg-core";
export const <entity>Table = pgTable("<table_name>", {
id: text("id").primaryKey().default(sql`gen_random_uuid()`),
// fields here
created_at: timestamp("created_at").defaultNow(),
updated_at: timestamp("updated_at").defaultNow(),
});
persistence-contracts.tsexport enum DatabaseTableName {
// existing entries...
<entity> = "<table_name>",
}
domain-models.tsexport interface <DomainModel> {
id: string;
// fields matching schema
created_at: Date;
updated_at: Date;
}
persistence-repositories.tsimport { <DomainModel> } from "../models/domain-models";
const <entity>Repository = new Repository<<DomainModel>>(
DatabaseTableName.<entity>,
pgClient,
{ logging: false },
);
export const persistenceRepository = {
// existing repositories...
<entity>: <entity>Repository,
};
bun run db:generate
bun run db:push