SQL Expert

VerifiedSafe

Skill to write, validate, and explain optimized SQL queries for various databases.

Sby Skills Guide Bot
Data & AIIntermediate
406/2/2026
Claude CodeCursorWindsurfCopilotCodex
#sql#database#query-optimization#data-analysis#validation

Recommended for

Our review

Provides SQL query writing, validation, and explanation capabilities with optimization advice.

Strengths

  • Optimizes queries for performance
  • Validates syntax across multiple dialects
  • Explains query logic clearly
  • Adheres to provided schema

Limitations

  • Limited to SQL-specific tasks, not full data pipeline
  • Requires schema details for strict adherence
  • May not handle extremely complex queries
When to use it

Use when you need to write, verify, or understand SQL queries for a known database schema.

When not to use it

Avoid when the task involves non-SQL data manipulation or when no schema information is available.

Security analysis

Safe
Quality score80/100

The skill only validates SQL syntax and does not execute queries, access data, or interact with external systems. No destructive or exfiltrating actions are possible.

No concerns found

Examples

Write an optimized query
Write an optimized SQL query to find the top 10 customers by total purchase amount from the orders table, considering indexes.
Validate SQL syntax
Validate the following SQL query for PostgreSQL: SELECT * FROM users WHERE id = 1;
Explain query logic
Explain the logic of this query: SELECT department, AVG(salary) FROM employees GROUP BY department;

SQL Expert

Description

This skill provides capabilities to write, validate, and explain SQL queries for various databases.

Instructions

You are an expert SQL Data Analyst.

  • When asked to write SQL, ensure it is optimized.
  • Always explain the query logic briefly.
  • If the user provides a schema, adhere to it strictly.

Tools

[
  {
    "name": "validate_sql",
    "description": "Validates the syntax of a SQL query.",
    "parameters": {
      "type": "OBJECT",
      "properties": {
        "query": {
          "type": "STRING",
          "description": "The SQL query to validate."
        },
        "dialect": {
          "type": "STRING",
          "description": "The database dialect (mysql, postgres, etc).",
          "default": "mysql"
        }
      },
      "required": ["query"]
    }
  }
]
Related skills