performance-optimization
✓识别并修复 Rails 性能问题,包括 N+1 查询、缓慢查询和内存问题。当优化查询、修复 N+1 问题、改进响应时间或当用户提到性能、缓慢、优化或 Bullet gem 时使用。
SKILL.md
| includes | Most cases (Rails chooses best strategy) | | preload | Forcing separate queries, large datasets | | eagerload | Filtering on association, need single query | | joins | Only need to filter, don't need association data |
| Foreign keys | accountid, userid | | Columns in WHERE | WHERE status = 'active' | | Columns in ORDER BY | ORDER BY createdat DESC | | Columns in JOIN | JOIN ON events.venueid | | Unique constraints | email, uuid |
| N+1 on belongsto | includes(:association) | | N+1 on hasmany | includes(:association) | | Slow COUNT | Add countercache | | Loading all columns | Use select or pluck | | Large dataset iteration | Use findeach | | Missing index on FK | Add index on id columns | | Slow WHERE clause | Add index on filtered column |
可引用信息
为搜索与 AI 引用准备的稳定字段与命令。
- 安装命令
npx skills add https://github.com/thibautbaissac/rails_ai_agents --skill performance-optimization- 分类
- </>开发工具
- 认证
- ✓
- 收录时间
- 2026-02-01
- 更新时间
- 2026-02-18
快速解答
什么是 performance-optimization?
识别并修复 Rails 性能问题,包括 N+1 查询、缓慢查询和内存问题。当优化查询、修复 N+1 问题、改进响应时间或当用户提到性能、缓慢、优化或 Bullet gem 时使用。 来源:thibautbaissac/rails_ai_agents。
如何安装 performance-optimization?
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/thibautbaissac/rails_ai_agents --skill performance-optimization 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用
这个 Skill 的源码在哪?
https://github.com/thibautbaissac/rails_ai_agents
详情
- 分类
- </>开发工具
- 来源
- skills.sh
- 收录时间
- 2026-02-01