원클릭으로
new-repository
Scaffold a Prisma-backed repository for a given Prisma model
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffold a Prisma-backed repository for a given Prisma model
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Implement a numbered testing strategy phase from docs/testing_strategy_phases/phase_$ARGUMENTS_*.md step by step
Implement a numbered phase from docs/phases/phase-$ARGUMENTS.md step by step
Review changed code for correctness, security, and project conventions. Invoke this skill automatically whenever a complete unit of work is done — a full implementation phase, a complete feature (repository + service + route + component all connected), or just before creating a PR. Do NOT invoke after editing a single file or mid-way through a feature. If the user says "done", "finished", "phase complete", "ready to commit", or similar, trigger this review immediately.
Run prisma migrate dev, regenerate client to the correct output path, and verify import paths
Scaffold a service class for a given domain following project conventions
Final pre-commit check: run type-check (npx tsc --noEmit), lint (npm run lint), and tests (npm test)
| name | new-repository |
| description | Scaffold a Prisma-backed repository for a given Prisma model |
| disable-model-invocation | true |
| argument-hint | [ModelName] |
Scaffold a Prisma repository for the $ARGUMENTS model.
Check that $ARGUMENTS exists in prisma/schema.prisma. If not, stop and tell the user to define the model and run /db-migrate first.
src/repositories/${kebab-case($ARGUMENTS)}.repository.ts
(e.g., InvoiceLineItem → invoice-line-item.repository.ts)
// CORRECT
import { prisma } from '@/lib/prisma'
import { Prisma } from '@/app/generated/prisma/client'
// NEVER write this — runtime failure
// import { ... } from '@prisma/client'
import { prisma } from '@/lib/prisma'
import { Prisma } from '@/app/generated/prisma/client'
export const ${camelCase}Repository = {
async create(data: Prisma.${ModelName}CreateInput) {
return prisma.${camelCase}.create({ data })
},
async findById(id: string) {
return prisma.${camelCase}.findUnique({ where: { id } })
},
async findMany(where?: Prisma.${ModelName}WhereInput) {
return prisma.${camelCase}.findMany({ where })
},
async update(id: string, data: Prisma.${ModelName}UpdateInput) {
return prisma.${camelCase}.update({ where: { id }, data })
},
async delete(id: string) {
return prisma.${camelCase}.delete({ where: { id } })
},
}
null on not-found; do not throwPrisma.${ModelName}GetPayload<...> for complex return types with includenpx tsc --noEmit