sql-analyst

Optimize SQL queries and design schemas across PostgreSQL, MySQL, and SQLite.

4|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/aegntic/clawreform --skill sql-analyst-aegntic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-analyst
Source: https://github.com/aegntic/clawreform/tree/main/crates/clawreform-skills/bundled/sql-analyst
Command: npx skills add https://github.com/aegntic/clawreform --skill sql-analyst-aegntic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users write, optimize, and debug SQL queries, design efficient database schemas, and perform complex data analysis across various SQL dialects.

Core Features & Use Cases

  • Query Optimization: Improve the performance of existing SQL queries by identifying bottlenecks and suggesting index strategies.
  • Schema Design: Guide users in creating normalized or denormalized database schemas suitable for different workloads.
  • Data Analysis: Assist in writing complex analytical queries using window functions and aggregations.
  • Use Case: A user provides a slow-running PostgreSQL query and asks for optimization suggestions. The Skill analyzes the query, suggests adding specific indexes, and rewrites the query using a more efficient pattern.

Quick Start

Optimize the following PostgreSQL query for performance.

Frequently Asked Questions about sql-analyst

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

FAQPage Schema
How do I optimize slow PostgreSQL queries and improve database performance?

To optimize slow PostgreSQL queries, you analyze the query to identify bottlenecks, suggest specific indexes, and rewrite inefficient patterns. This improves query performance and ensures adherence to best practices for readability and data integrity.

What is the best way to design a database schema for different workloads?

Database schema design involves creating normalized or denormalized structures tailored to your specific workloads. Proper schema design includes selecting appropriate data types, applying normalization principles, and ensuring data integrity for efficient data storage and retrieval.

How do I write complex data analysis queries using SQL window functions?

Writing complex data analysis queries with SQL window functions involves using advanced analytical patterns and aggregations. This allows you to perform calculations across sets of rows related to the current query, enabling sophisticated data insights directly within the database.

Can I use this SQL optimization guidance across multiple database dialects like MySQL and SQLite?

Yes, SQL optimization and schema design guidance applies across multiple SQL dialects including PostgreSQL, MySQL, and SQLite. The approach ensures best practices for query tuning, indexing strategies, and data type selection are adaptable to each specific database environment.

When should I use denormalized vs normalized database schemas?

You should choose between normalized and denormalized database schemas based on your workload requirements. Normalization ensures data integrity and reduces redundancy, while denormalization improves read performance for analytical queries by reducing join complexity.