sql-pro

Write and optimize SQL queries for cloud-native OLTP and OLAP database systems.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill sql-pro-duccuong159
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-pro
Source: https://github.com/DucCuong159/Realtime-chatapp/tree/main/.agent/skills/sql-pro
Command: npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill sql-pro-duccuong159

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing efficient SQL for modern cloud databases, data warehouses, and hybrid OLTP/OLAP systems requires deep expertise in query optimization, indexing, and schema design that most developers lack time to master. ## Core Features & Use Cases - Query Optimization: Analyze execution plans, design index strategies, and tune queries for platforms like Snowflake, BigQuery, PostgreSQL, and Aurora. - Schema & Data Modeling: Design normalized schemas, star/snowflake models, and slowly changing dimensions for transactional and analytical workloads. - Cloud Database Architecture: Plan multi-region replication, migrations, partitioning, and cost optimization for cloud-native databases. - Use Case: You have a slow analytical query scanning a billion-row table in Snowflake. Use this Skill to inspect the query plan, apply partitioning and clustering keys, and rewrite the query with window functions to cut execution time dramatically. ## Quick Start Ask the assistant to optimize your slow SQL query by pasting the query text along with the table schema and target database platform.

Frequently Asked Questions about sql-pro

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

FAQPage Schema
How do I optimize a slow SQL query on a large table?

Start by inspecting the execution plan with EXPLAIN to find full table scans or missing indexes. Then apply appropriate indexing, partitioning, or query rewrites such as window functions and CTEs, and validate performance with realistic data volumes.

What is the difference between OLTP and OLAP database design?

OLTP systems prioritize fast transactional writes with normalized schemas, while OLAP systems optimize analytical reads using denormalized star or snowflake schemas. Hybrid HTAP platforms like TiDB and CockroachDB handle both workloads in one system.

Does this skill support cloud data warehouses like Snowflake and BigQuery?

Yes, it covers Snowflake, Google BigQuery, Amazon Redshift, and Databricks, along with cloud-native databases like Aurora and Azure SQL. It addresses platform-specific features, partitioning, and cost optimization for each.

When should I not use this SQL skill?

Avoid it when you only need ORM-level guidance, when the system is non-SQL or document-only, or when you cannot access query plans or schema details. It is designed for hands-on SQL work with verifiable database metadata.

How do I safely test heavy queries on a production database?

Use read replicas or query limits for exploratory analysis instead of running heavy queries directly on production. Validate changes with EXPLAIN first and test under load with realistic data volumes before deployment.