{"id":79564,"plugin_id":"plugins_6ab40fcbcc3c81919e0c679fee35faaf","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-04T00:11:25.821Z","digest":"b6c554fecdd3660bc55ca2f6f031890f8981dbd02d3864bdbca90e0d30954a9c","against":null,"payload":{"description":"Write SQL from natural-language specifications with explicit grain, keys and acceptance checks.","included_files":[],"name":"sql-from-requirements","skill_md_contents":"---\nname: sql-from-requirements\ndescription: Write SQL from natural-language specifications with explicit grain, keys and acceptance checks.\n---\n\n# Sql From Requirements\n\n**Trigger:** Write SQL from natural-language specifications with explicit grain, keys and acceptance checks.\n\n## Workflow\n1. Convert the requirement into a small input/output contract: tables, columns, filters, dates, keys, grouping, expected result grain, dialect.\n2. Sketch cardinality before joining: which joins are one-to-one, one-to-many, or many-to-many? Pre-aggregate many-side measures where appropriate.\n3. Write one dialect-correct query; use explicit columns for production and clear CTE names based on meaning, not perceived optimizer behavior.\n4. Check NULL rules, inclusive/exclusive time bounds, time zones, ties, deterministic ordering, integer versus decimal arithmetic and potential duplication.\n5. Add validation SQL: duplicate-key count, total reconciliation or result-shape checks sized to the task; do not assert it ran.\n\n## Critical standard\nOutput grain and expected uniqueness must be explicit; explain assumptions instead of inventing schema.\n\n## Evidence and execution\nOnly 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.\n\n## Supporting references\n- Read `../../references/query-specification.md` when relevant.\n- Read `../../references/correctness-and-grain.md` when relevant.\n- Read `../../references/dialects.md` when relevant.\n\n## Return\nOne copyable query, a concise meaning explanation, assumptions and 1–3 useful validation checks.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}