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: X header. 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 match name: X :type.
  • select-star: SELECT * (always over-fetch).
  • double-wildcard-like: LIKE '%...%' (full-table scan risk).
Installs
49
Repository
mizchi/skills
GitHub Stars
325
First Seen
May 18, 2026
sql-lint — mizchi/skills