ignition-sql-authoringlisted
Install: claude install-skill aimerfan/ignition-skills
# Ignition SQL Authoring
SQL is where Ignition dashboards, reports, historian analyses, and MES-style workflows succeed or fail. This skill guides authoring, reviewing, and tuning SQL — Named Queries, inline scripting SQL, Perspective SQL bindings, DDL, indexes — so what Copilot produces actually runs, and runs fast, against real data volumes.
Unlike tag JSON (declarative and static), SQL work is inherently **multi-turn and data-dependent**:
- Correctness is cheap; being *fast enough on real row counts* is the real bar.
- AI has no access to the user's data distribution, existing indexes, or real query plans.
- Every dialect (MSSQL / Postgres / MySQL / Oracle / SQLite) differs in non-trivial ways.
This skill treats Copilot as a **fast first-pass author and a plan-reading assistant**, not as an autonomous SQL generator. The collaboration protocol in [§ The 7-step workflow](#the-7-step-collaboration-workflow) encodes that stance.
## Critical precondition — ground truth + dialect
**Before emitting any SQL**, two things must be pinned:
### 1. Ground truth
Priority order, same protocol as [ignition-tag-authoring](../ignition-tag-authoring/SKILL.md):
1. A sample in the consumer project's `ground-truth/sql/` directory that matches the target artifact (Named Query export, DDL, EXPLAIN output, historian query).
2. A sample the user provided in this conversation.
3. The verified reference catalog in [references/named-queries.md](references/named-queries.md) or [references/hist