sqlfluff
Installation
SKILL.md
SQLFluff — SQL Linter and Auto-Formatter
When to Use
Load this skill when the user needs to:
- Enforce consistent SQL style across a team or codebase (keyword case, indentation, comma placement, alias conventions)
- Set up CI quality gates that reject non-conforming SQL before merge
- Lint a dbt project's
.sqlmodel files using the dbt templater (primary use case) - Automatically fix style violations with
sqlfluff fix - Clean up legacy SQL that has grown inconsistent over time
- Write a
.sqlfluffconfiguration file or tune specific rules - Configure a pre-commit hook to lint SQL locally before push
- Create a GitHub Actions workflow that annotates PRs with inline SQL violations
- Suppress specific rule violations inline with
-- noqacomments - Write a custom SQLFluff rule as a plugin