SQL Expert

VerifiedSafe

This skill enables writing, validating, and explaining optimized SQL queries for various database dialects. It includes a syntax validation tool and strictly adheres to provided schemas. Helpful for data analysts who need reliable queries with brief explanations.

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

Recommended for

Automated summary

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

Strengths

  • Generates optimized queries
  • Built-in SQL syntax validation
  • Strict adherence to provided schema
  • Clear explanation of query logic

Limitations

  • Limited to SQL operations only
  • Requires a schema for maximum accuracy
  • No direct database connection
When to use it

When you need to write, validate, or understand a SQL query with confidence.

When not to use it

For data manipulation tasks requiring non-SQL languages (Python, R, etc.)

Security analysis

Safe
Quality score80/100

The skill only provides SQL validation and explanation, with no destructive or risky actions, no shell access, and no exfiltration.

No concerns found

How this analysis is made

Examples

Top 10 Customers
Write a query to get the top 10 customers by total purchase amount.
Validate SQL Syntax
Validate this SQL query: SELECT * FROM orders WHERE date > '2020-01-01'
Explain a Query
Explain this query: SELECT product_id, COUNT(*) as cnt FROM sales GROUP BY product_id HAVING cnt > 5

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