sql-lint

star 27

SQL code style check - Use SQLFluff to check SQL statement style and syntax (supports PostgreSQL, MySQL, SQLite, etc.)

y1feng200156 By y1feng200156 schedule Updated 2/10/2026

name: sql-lint description: SQL code style check - Use SQLFluff to check SQL statement style and syntax (supports PostgreSQL, MySQL, SQLite, etc.)

SQL Lint Skill

๐Ÿ“‹ Overview

Use SQLFluff to check SQL code quality, supporting multiple database dialects:

  • PostgreSQL, MySQL, MariaDB
  • SQLite, BigQuery, Snowflake
  • Redshift, TSQL, Oracle, etc.

๐Ÿ”ง Prerequisites

Tool Installation
Python 3.8+ python.org
SQLFluff pip install sqlfluff

๐Ÿš€ Usage

Check single file:

.\.agent\skills\sql-lint\scripts\lint.ps1 -File query.sql

Specify database dialect:

.\.agent\skills\sql-lint\scripts\lint.ps1 -Dialect postgres

Auto-fix:

.\.agent\skills\sql-lint\scripts\lint.ps1 -Fix

๐ŸŽฏ What It Checks

  • โœ… SQL keyword case consistency
  • โœ… Indentation and formatting standards
  • โœ… JOIN type clarity
  • โœ… Table alias usage standards
  • โœ… WHERE condition safety

๐Ÿ“Š Supported Database Dialects

Dialect Database
postgres PostgreSQL
mysql MySQL/MariaDB
sqlite SQLite
bigquery Google BigQuery
snowflake Snowflake
tsql SQL Server

โš™๏ธ Configuration Example

Create .sqlfluff:

[sqlfluff]
dialect = postgres
templater = jinja
exclude_rules = L003,L009

[sqlfluff:indentation]
indent_unit = space
tab_space_size = 2

[sqlfluff:rules:L010]
capitalisation_policy = upper

๐Ÿ”— Related Resources

Install via CLI
npx skills add https://github.com/y1feng200156/ham-study --skill sql-lint
Repository Details
star Stars 27
call_split Forks 5
navigation Branch main
article Path SKILL.md
More from Creator
y1feng200156
y1feng200156 Explore all skills →