Skip to content

opensite-ai/opensite-skills / rails-query-optimization

rails-query-optimization

Verified

Advanced Rails query optimization: diagnosing N+1 beyond simple includes, the cartesian product trap with multiple has_many eager loads, CTEs and lateral joins via Arel and raw SQL, reading EXPLAIN ANALYZE output, and counter cache patterns. Use when investigating slow Rails endpoints, optimizing ActiveRecord queries, or designing queries for high-traffic production endpoints.

FileKindSize
SKILL.mdskill md11.1 KB
agents/openai.yamlconfig345 B
references/activation.mdmarkdown878 B

references/activation.md

View on GitHub
# Activation Guide

## Best-Fit Tasks
- Advanced Rails query optimization: diagnosing N+1 beyond simple includes, the cartesian product trap with multiple has_many eager loads, CTEs and lateral joins via Arel and raw SQL, reading EXPLAIN ANALYZE output, and counter cache patterns.
- Best trigger phrase: investigating slow Rails endpoints, optimizing ActiveRecord queries, or designing queries for high-traffic production endpoints.

## Explicit Invocation
- `Use $rails-query-optimization when investigating slow Rails endpoints, optimizing ActiveRecord queries, or designing queries for high-traffic production endpoints.`

## Cross-Agent Notes
- Start with `SKILL.md`, then load only the linked files you need.
- The standard metadata and this guide are portable across skills-compatible agents; Claude-specific frontmatter is optional and should degrade cleanly elsewhere.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall