← Files SQL CopilotARCHIVED FILE

skills/test-sql-logic/SKILL.md

1.47 KB · Dec 2, 2026 · 18:35 UTC

↓ Download file

See the change to this file →

---
name: test-sql-logic
description: Create reproducible SQL test fixtures, expected outputs and cross-engine equivalence checks.
---

# Test Sql Logic

**Trigger:** Create reproducible SQL test fixtures, expected outputs and cross-engine equivalence checks.

## Workflow
1. Identify query invariants and edge cases: missing keys, duplicates, NULL, zero rows, dates at boundaries, ties, skew and unexpected cardinality.
2. Construct minimal sample rows with expected answers; use the target dialect when possible.
3. Distinguish unit fixture tests from production-data verification and version-dependent optimizer checks.
4. Run tests only if a SQL execution tool is available; otherwise give copyable setup/assertion SQL and mark unexecuted.
5. Explain how to compare totals, unique keys, exact rows and numerical tolerance for precision differences.

## Critical standard
SQLite fixture results do not prove validity on Snowflake, BigQuery, Databricks or SQL Server.

## Evidence and execution
Only say "executed", "passed", "observed", "optimized" or "deployed" when a connected tool returned evidence for that claim. An SQL draft, a textual review, or local fixture proof alone is not production validation. Never ask the user to paste passwords or raw confidential records.

## Supporting references
- Read `../../references/testing-method.md` when relevant.
- Read `../../references/reconciliation.md` when relevant.

## Return
Fixture DDL/rows, assertions, commands if run and evidence status.

SHA-256: a6eecbc3e121e1af08bd1d4c218c4c30971afa3a975304e8ab34d99d93a051d3