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