Automated summary
This skill walks through optimizing ORM-generated SQL, from spotting slow queries through to generating index migrations.
Strengths
- Follows a clear seven-step procedure from EXPLAIN analysis to index migration
- Explicitly targets N+1 patterns and recommends eager loading where it fits
- Combines query rewriting, indexing and caching strategy in one pass
- Delivers concrete artifacts: suggested indexes and a generated migration
Limitations
- Assumes you can reach production query logs or EXPLAIN output
- Offers no before/after benchmarking or load testing to confirm the gain
- Index advice stays generic and needs review against write load and the specific database engine
Reach for it when an application shows slow queries or known N+1 issues and you want a structured optimization plan.
Skip it when you have no logs, execution plan or schema access, since the analysis would be guesswork.
Security analysis
SafeThe skill only provides guidance for optimizing ORM queries, identifying N+1 patterns, adding indexes, and caching. It does not instruct destructive actions, data exfiltration, or unsafe command execution. No tools are declared, and the content is purely advisory.
No concerns found
How this analysis is madeExamples
Here's the Rails log for our /orders endpoint and the ActiveRecord models involved. Find the N+1 queries, show me where to add includes/eager loading, and rewrite the worst query.This is the EXPLAIN ANALYZE output for our five slowest Django queries. Suggest the indexes that would help and write the Alembic migration for them.Review this Prisma service that loads a user dashboard. Identify redundant queries, propose a caching strategy, and tell me which relations should be fetched in a single query.ORM Query Optimizer
Optimize database queries generated by ORMs.
When to Use
- Slow database queries in production
- N+1 query problems
- Need to add proper database indexes
Instructions
- Identify slow queries via logs or EXPLAIN
- Detect N+1 query patterns
- Add eager loading where appropriate
- Suggest proper indexes for common queries
- Rewrite complex queries for performance
- Add query caching strategies
- Generate migration for new indexes
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
No external provenance is recorded: only the copy on this page is available.
This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/orm-query-optimizer-bc1f69/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/orm-query-optimizer-bc1f69' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/orm-query-optimizer-bc1f69/download' --output '.skill-downloads/orm-query-optimizer-bc1f69/SKILL.md.part' && mv '.skill-downloads/orm-query-optimizer-bc1f69/SKILL.md.part' '.skill-downloads/orm-query-optimizer-bc1f69/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.
Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/orm-query-optimizer-bc1f69/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.