active-record-querying

Official

Write 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, and joins correctly to prevent N+1 problems.
  • Data Retrieval: Efficiently fetch single records, collections, or specific attributes using methods like find, find_by, pluck, and pick.
  • Use Case: You have a Post model with many Comment associations. To display posts along with their comments without N+1 queries, you'll use Post.includes(:comments).

Quick Start

Use the active-record-querying skill to find all posts that have comments.

Dependency Matrix

Required Modules

None required

Components

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.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.