/gosqlx:sql-linting [SQL string, .sql file, or rule ID like L016]from GoSQLX
Lint SQL using GoSQLX with 30 rules covering style, safety, performance, and naming. Explains rule IDs L001-L030, which entry points apply which rules, and which can be auto-fixed. Useful for enforcing SQL style, reviewing queries, or setting up CI linting.
Ships in GoSQLX. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Input: $ARGUMENTS - SQL, a .sql file, or a rule ID to explain.
| Entry point | Rules applied |
|---|---|
MCP lint_sql (mcp__plugin_gosqlx_gosqlx__lint_sql) | L001-L010 (style). Keyword case expected UPPER, trailing commas, max line 100 |
gosqlx lint CLI | L001-L010; --auto-fix fixes L001, L002, L003, L007, L010 |
gosqlx.Lint() Go library | All 30 rules, L001-L030 |
L011-L030 are not returned by lint_sql or the CLI. When you spot one of those patterns yourself, cite the rule ID as guidance and say it comes from the Go library's rule set.
| ID | Rule | Severity | Auto-fix |
|---|---|---|---|
| L001 | Trailing whitespace | Warning | Yes |
| L002 | Mixed indentation (tabs and spaces) | Error | Yes |
| L003 | Consecutive blank lines | Warning | Yes |
| L004 | Indentation depth (excessive nesting) | Warning | No |
| L005 | Long lines | Info | No |
| L006 | Column alignment in SELECT lists | Info | No |
| L007 | Keyword case consistency | Warning | Yes |
| L008 | Comma placement (trailing vs leading) | Info | No |
| L009 | Aliasing consistency | Warning | No |
| L010 | Redundant whitespace | Info | Yes |
| L011 | DELETE without WHERE | Error | No |
| L012 | UPDATE without WHERE | Error | No |
| L013 | DROP without IF EXISTS | Warning | No |
| L014 | TRUNCATE TABLE | Warning | No |
| L015 | SELECT ... INTO OUTFILE / DUMPFILE | Error | No |
| L016 | SELECT * | Warning | No |
| L017 | Missing WHERE on full scan (no WHERE or LIMIT) | Warning | No |
| L018 | Leading wildcard LIKE ('%x') | Warning | No |
| L019 | NOT IN with NULL risk (prefer NOT EXISTS) | Warning | No |
| L020 | Correlated subquery in SELECT list (N+1) | Warning | No |
| L021 | OR chain instead of IN | Warning | No |
| L022 | Function on indexed column in WHERE | Warning | No |
| L023 | Implicit cross join (comma joins) | Warning | No |
| L024 | Table alias required | Warning | No |
| L025 | Reserved keyword used as identifier | Warning | No |
| L026 | INSERT without explicit column list | Warning | No |
| L027 | UNION instead of UNION ALL | Warning | No |
| L028 | LIMIT without ORDER BY | Warning | No |
| L029 | Subquery that can be a JOIN | Warning | No |
| L030 | DISTINCT on many columns | Warning | No |
Full reference with examples: https://github.com/ajitpratap0/GoSQLX/blob/main/docs/LINTING_RULES.md
lint_sql with {"sql": "..."}. Each violation has rule, rule_name, severity, message, line, column and suggestion.gosqlx lint --auto-fix.gosqlx lint query.sql
gosqlx lint -r ./queries/ # recurse into a directory
gosqlx lint --auto-fix query.sql # rewrites the file - only when asked
gosqlx lint --fail-on-warn query.sql # non-zero exit on warnings (CI)
gosqlx lint --max-length 120 query.sql
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/sql-analysisFull GoSQLX review of a SQL query or .sql file - syntax validity, statement types, referenced tables/columns/functions, injection patterns, style lint and a formatted version - followed by a plain-language explanation of what the SQL does and what to fix. Use when the user asks to analyze, review, check, explain or sanity-check SQL./sql-dialectsCheck whether SQL parses under a specific database dialect with GoSQLX (PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake, generic; MariaDB and ClickHouse via the CLI) and explain dialect-specific syntax problems. Use when the user asks if SQL is valid for a particular database, is porting SQL between databases, or gets a syntax error that may be dialect-related./sql-npx claudepluginhub ajitpratap0/gosqlx --plugin gosqlxOther plugins' skills for the same job