performance-optimization

Analyze ORM usage and database queries to identify performance bottlenecks.

10|5|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/ils15/mythic-agents --skill performance-optimization-ils15
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/ils15/mythic-agents/tree/main/skills/performance-optimization
Command: npx skills add https://github.com/ils15/mythic-agents --skill performance-optimization-ils15

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers optimize data access patterns, reduce N+1 queries, implement effective caching, and design indexing strategies to improve application performance and scalability.

Core Features & Use Cases

  • N+1 Detection: Identify and remediate inefficient ORM queries with eager loading and join strategies.
  • Indexing & Caching: Propose and implement indexing schemes and caching layers to speed up hot paths.
  • Query Analysis & Use Cases: Analyze slow queries and propose plan optimizations and pagination.
  • Use Case: A web service with large user-generated data can auto-detect N+1 queries and auto-suggest indexing changes to reduce latency.

Quick Start

Use the performance-optimization skill to analyze a slow endpoint by running a query audit on the User data model and propose 2-3 optimizations.

Frequently Asked Questions about performance-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix N+1 query problems in SQLAlchemy?

To fix N+1 queries in SQLAlchemy, you can apply eager loading and join strategies to consolidate data access patterns. This reduces redundant database calls by fetching related data in a single query to improve application latency.

What is the best way to optimize slow ORM queries in web applications?

The best way to optimize slow ORM queries is by analyzing data access patterns to identify bottlenecks and then applying query optimization, indexing schemes, and pagination. This generates concrete remediation steps to improve latency in web applications.

How do I implement caching strategies for web application hot paths?

You can implement caching strategies for hot paths by adding caching layers alongside optimized indexing schemes. This combination speeds up frequent data retrieval requests and reduces database load for web applications with large user-generated data.

Can I use this query optimization approach with ORMs other than SQLAlchemy?

Yes, this query optimization approach works with SQLAlchemy-like ORMs. It requires minimal setup to analyze typical data-access patterns and propose indexing changes or caching strategies across supported ORM implementations.

When should I add database indexing to reduce endpoint latency?

You should add database indexing to reduce endpoint latency when query analysis identifies slow queries on large user-generated data. Auto-suggesting indexing changes speeds up data retrieval and improves overall web application scalability.