Databaseadvanced
Analyze and optimize slow database queries
Query Optimizer
Description
Analyze and optimize slow database queries. This skill is part of the Database category and is designed for advanced-level users. It automates common tasks and follows industry best practices to save you time and reduce errors.
Usage
Ask Claude: "Help me analyze and optimize slow database queries"
Or use: /skill query-optimizer
What It Does
- Analyzes the current database schema and requirements
- Generates migration files or schema changes
- Creates model definitions with proper types
- Adds indexes and constraints for performance
- Includes seed data or sample queries
Example Prompt
Analyze and optimize this slow SQL query that takes 5 seconds
Example Output
Claude will generate database schemas, migration files, or query optimizations. Output includes SQL/ORM code with explanations of the design decisions.
Configuration
This skill works out of the box with sensible defaults. You can customize its behavior by:
- Specifying your preferred coding style or framework version
- Providing additional context about your project structure
- Requesting specific output formats or patterns
- Setting constraints (e.g., "no external dependencies", "TypeScript only")