com um clique
new-repository
Scaffold a Prisma-backed repository for a given Prisma model
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Scaffold a Prisma-backed repository for a given Prisma model
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional 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