بنقرة واحدة
entity-models
Implement OOP API entities in api/model/ using the shared Model base class and relation helper.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Implement OOP API entities in api/model/ using the shared Model base class and relation helper.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Build or change API behavior in api/ using Express routers, middleware, CustomError, model instances, and camelCase JSON responses.
Review backend and frontend template code for real defects, boundary violations, security gaps, and missing tests. Auto-invoke for code reviews or bug investigations. Triggers: "bug review", "review code", "find bugs", "security audit", "check defects".
Maintain the api/helpers/postgres.js SQL boundary, CRUD helper surface, and safe filter conventions.
Update project-local agent guidance when architecture, workflows, commands, or conventions change. Auto-invoke when user or agent output indicates a reusable workflow or durable rule. Triggers: "update docs", "update skill", "create new skill", "update agent instructions", "document recurring pattern", "capture reusable workflow".
Add accurate JSDoc and focused comments when changing template code. Auto-invoke during code writing or refactoring. Triggers: "document code", "jsdoc", "code comments", "add comments", "explain logic".
Keep human docs, agent guidance, and touched code comments aligned with the real web/api implementation, compose workflow, and validation commands. Auto-invoke when auditing docs or after major architectural changes. Triggers: "audit docs", "check context", "documentation maintenance", "audit documentation", "verify docs".
| name | entity-models |
| description | Implement OOP API entities in api/model/ using the shared Model base class and relation helper. |
Use this skill when changing entity classes or persistence-facing business behavior.
api/model/.api/model/model.js for standard CRUD behavior.id (internal BIGINT identity for database FKs) and public_id (VARCHAR(14) NOT NULL UNIQUE generated via nanoid customAlphabet Base62 in Model.insert() and exposed in public toJSON() / route selectors).api/helpers/postgres.js.api/model/relation.js for relation tables instead of duplicating relation checks in routes.Use model unit tests for isolated behavior and integration tests when joins, auth, or real database behavior is involved.