active-record-querying
OfficialWrite efficient Rails database queries.
AuthorThinkOodle
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you write efficient, correct, and maintainable Active Record queries in Rails, preventing common performance pitfalls like N+1 queries and unnecessary memory usage.
Core Features & Use Cases
- Query Optimization: Learn to use
includes,preload,eager_load, andjoinscorrectly to prevent N+1 problems. - Data Retrieval: Efficiently fetch single records, collections, or specific attributes using methods like
find,find_by,pluck, andpick. - Use Case: You have a
Postmodel with manyCommentassociations. To display posts along with their comments without N+1 queries, you'll usePost.includes(:comments).
Quick Start
Use the active-record-querying skill to find all posts that have comments.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: active-record-querying Download link: https://github.com/ThinkOodle/rails-skills/archive/main.zip#active-record-querying Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.