sql-lint
Installation
SKILL.md
SQL Lint
Use this when a project has a SQL catalog (-- name: X :type comments or any named-query convention) and wants to enforce basic hygiene without adopting a heavy SQL linter.
Two layers
This skill ships two linters, with different cost / coverage trade-offs.
Layer 1: catalog-lint (built-in, zero deps)
scripts/catalog-lint.mjs is a Node 20+ script with no dependencies. It catches:
- duplicate-name: two queries with the same
-- name: Xheader. Some codegens silently shadow; others break. - missing-semicolon: queries that omit the trailing
;. sqlc rejects these at build time, but catalog-lint surfaces them in fmt-time. - empty-body: header with no SQL body.
- malformed-name:
-- name:line that doesn't matchname: X :type. - select-star:
SELECT *(always over-fetch). - double-wildcard-like:
LIKE '%...%'(full-table scan risk).