sql-correctness

Evaluate SQL in agent traces against Databricks patterns and Unity Catalog rules.

1|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/leary-poken/ai-dev-kit --skill sql-correctness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-correctness
Source: https://github.com/leary-poken/ai-dev-kit/tree/main/.test/eval-criteria/sql-correctness
Command: npx skills add https://github.com/leary-poken/ai-dev-kit --skill sql-correctness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SQL evaluation criteria for Databricks. Load when the trace contains execute_sql tool calls or SQL code in responses. Covers syntax validity, Unity Catalog patterns, and Databricks-specific SQL features.

Core Features & Use Cases

  • Enforces Unity Catalog namespaces using 3-level catalog.schema.table syntax
  • Validates modern DDL patterns and safe SQL practices
  • Provides a trace-based evaluation workflow triggered by execute_sql calls or SQL statements

Quick Start

Provide a trace containing execute_sql calls or Databricks SQL statements to evaluate its correctness against the rubric.

Frequently Asked Questions about sql-correctness

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

FAQPage Schema
How do I evaluate Databricks SQL correctness in agent traces?

To evaluate Databricks SQL correctness in traces, provide a trace containing execute_sql tool calls or raw SQL snippets to validate syntax, Unity Catalog patterns, and Delta-specific features against a structured rubric.

What SQL patterns does Unity Catalog require for Databricks trace analysis?

Unity Catalog requires 3-level namespace usage (catalog.schema.table) for Databricks trace analysis. The evaluation checks that SQL statements enforce this syntax along with modern DDL patterns and safe parameterization.

Does this SQL evaluation check both DDL and DML statements in Databricks?

Yes, this SQL evaluation checks both DDL and DML statements in Databricks environments. It validates modern DDL syntax, safe data access patterns, and Delta-specific features while discouraging anti-patterns and unsafe practices.

How do I validate safe parameterization and prevent anti-patterns in Databricks SQL?

You validate safe parameterization and prevent anti-patterns in Databricks SQL by applying the evaluation rubric to traces with execute_sql calls, checking for modern syntax and discouraging unsafe data access practices.

Can I use this to check raw SQL snippets or only execute_sql tool calls?

You can use this to check both raw SQL snippets and execute_sql tool calls. The evaluation workflow triggers whenever the trace contains Databricks SQL statements, covering syntax validity and data access patterns.