一键导入
rename-entity
Use when adapting the template's placeholder Item entity to a hackathon problem statement's actual domain entity.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when adapting the template's placeholder Item entity to a hackathon problem statement's actual domain entity.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when adding a brand-new CRUD resource beyond the core entity (e.g. a second model the PS requires).
Use when building or restyling any page or component.
Use when constructing forms, inputs, submit behaviors, validation displays, and feedback toast alerts.
Use when creating new Next.js route handlers using the custom helper wrapper.
Use whenever the Prisma schema changes and a migration is needed.
Use when integrating third-party APIs (e.g. SMTP emails, SMS notification gateways, payment checkout gates, or OCR parsers).
| name | rename-entity |
| description | Use when adapting the template's placeholder Item entity to a hackathon problem statement's actual domain entity. |
Follow these steps to rename the placeholder Item model to your target domain model (e.g., Ticket, Device, Asset):
Update Prisma Schema:
prisma/schema.prisma.Item to NewModelName (e.g. Ticket).User, Request, and Review models pointing to Item (rename item to newModelName and type Item to NewModelName).Run DB Migration:
npx prisma migrate dev --name rename_to_new_model.npx prisma generate to rebuild client types.Rename API Route Folders:
src/app/api/items to src/app/api/new-model-plural (e.g., src/app/api/tickets).prisma.item.create -> prisma.ticket.create).Update Frontend Pages & Components:
src/app/items/page.tsx and src/app/items/[id]/ to src/app/new-model-plural/page.tsx and src/app/new-model-plural/[id]/page.tsx.src/app/dashboard/items/ to src/app/dashboard/new-model-plural/./api/items with /api/new-model-plural).Update Seed Data:
prisma/seed.ts with domain-specific seed items matching your renamed schema.npx prisma db seed to clear and repopulate the database.