review-orm-usage
技能(Skill):审查 ORM 用法
目的 (Purpose)
仅在库级别查看ORM 使用模式。不要定义范围(差异与代码库)或执行安全/架构分析;这些是通过范围和cognitive技能来处理的。以标准格式发出结果列表以进行聚合。专注于跨 ORM 库(Prisma、Entity Framework、SQLAlchemy、Sequelize、TypeORM、Hibernate、Django ORM、ActiveRecord 等)的 N+1 查询检测、连接管理、迁移安全、事务处理、查询效率和模型设计。
核心目标(Core Objective)
首要目标:生成一个 ORM 使用结果列表,涵盖给定代码范围的 N+1 查询、连接管理、迁移安全、事务处理、查询效率和模型设计。
成功标准(必须满足所有要求):
- ✅ ORM库专用范围:仅审查ORM使用模式;未执行范围选择、安全性或架构分析
- ✅ 涵盖所有六个 ORM 维度:N+1、连接、迁移、事务、查询效率和模型设计(如果相关)进行评估
- ✅ 结果格式兼容:每个结果包括位置、类别(
library-orm)、严重性、标题、描述和可选建议 - ✅ 文件/模型引用:所有发现都引用特定文件:行或模型/实体名称
- ✅ ORM 不可知:研究结果适用于整个 ORM 库;特定库仅在上下文中引用
More from nesnilnehc/ai-cortex
review-codebase
Review given file/dir/repo for current-state code organization: module boundaries, design patterns, cross-module dependencies, tech debt, and interface stability. Scope-only atomic skill; output is a findings list.
106review-vue
Review Vue 3 code for Composition API, reactivity, components, state (Pinia), routing, and performance. Framework-only atomic skill; output is a findings list.
94review-diff
Review only git diff for impact, regression, correctness, compatibility, and side effects. Scope-only atomic skill; output is a findings list for aggregation.
91review-java
Review Java code for language and runtime conventions: concurrency, exceptions, try-with-resources, API versioning, collections and Streams, NIO, and testability. Language-only atomic skill; output is a findings list.
84review-architecture
Review code for architecture: module and layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling. Cognitive-only atomic skill; output is a findings list.
83review-security
Review code for security: injection, sensitive data, auth, dependencies, config, and crypto. Atomic skill; output is a findings list.
74