一键导入
code-review
Perform deep critical analysis of changes with focus on performance vs sustainability trade-offs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Perform deep critical analysis of changes with focus on performance vs sustainability trade-offs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create and manage Solid Queue background jobs with perform_now vs perform_later patterns
Add controllers and routes following project patterns for organizer namespaces, strong params, and Turbo
Build Rails forms with Tailwind CSS, Turbo integration, and strong params validation
Write database migrations for PostgreSQL with PostGIS, UUID primary keys, enums, and counter caches
Create and modify Rails models following project conventions for STI, enums, validations, counter caches, and scopes
Create service objects in app/services/ using module namespaces for encapsulation
| name | code-review |
| description | Perform deep critical analysis of changes with focus on performance vs sustainability trade-offs |
| license | MIT |
preload/includes in controller actions
.each loops over collections without association loading.count in hot pathsperform_later, not perform_now| Pattern | Performance | Sustainability | Verdict |
|---|---|---|---|
| Raw SQL for complex queries | High | Low — hard to maintain, loses AR benefits | Avoid unless necessary |
| N+1 bypass with eager loading | Medium | High — standard AR pattern | Preferred |
| Counter cache | High | High — standard Rails pattern | Preferred |
| Instance variable caching (@var) | Medium | Low — fragile, hard to test | Use sparingly |
| Service object extraction | Medium | High — clear separation of concerns | Preferred |
| Callback-heavy models | Low | Low — hidden execution order, hard to debug | Extract to services |
preload/includes).count was usedparams.expect (Rails 8)change or define up/down)app/controllers/application_controller.rb — Prosopite N+1 detectiontest/test_helper.rb — SimpleCov parallel worker setup.rubocop.yml — Style rules that enforce consistency