ajitpratap0/gosqlx/sql-linting

Claude Code and agent skill by ajitpratap0/gosqlx

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Lint SQL with GoSQLX and explain its rules L001-L030 (whitespace, keyword case, comma placement, aliasing, plus safety, performance and naming rules), including which rules each entry point applies and which can be auto-fixed. Use when the user asks to lint SQL, enforce SQL style, explains a GoSQLX rule ID like L007 or L019, or sets up SQL linting in CI.

Install

npx vskill@latest install ajitpratap0/gosqlx/sql-linting

SKILL.md

SQL linting with GoSQLX

Input: $ARGUMENTS - SQL, a .sql file, or a rule ID to explain.

Which rules run where

Entry pointRules applied
MCP lint_sql (mcp__plugin_gosqlx_gosqlx__lint_sql)L001-L010 (style). Keyword case expected UPPER, trailing commas, max line 100
gosqlx lint CLIL001-L010; --auto-fix fixes L001, L002, L003, L007, L010
gosqlx.Lint() Go libraryAll 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.

Rules

IDRuleSeverityAuto-fix
L001Trailing whitespaceWarningYes
L002Mixed indentation (tabs and spaces)ErrorYes
L003Consecutive blank linesWarningYes
L004Indentation depth (excessive nesting)WarningNo
L005Long linesInfoNo
L006Column alignment in SELECT listsInfoNo
L007Keyword case consistencyWarningYes
L008Comma placement (trailing vs leading)InfoNo
L009Aliasing consistencyWarningNo
L010Redundant whitespaceInfoYes
L011DELETE without WHEREErrorNo
L012UPDATE without WHEREErrorNo
L013DROP without IF EXISTSWarningNo
L014TRUNCATE TABLEWarningNo
L015SELECT ... INTO OUTFILE / DUMPFILEErrorNo
L016SELECT *WarningNo
L017Missing WHERE on full scan (no WHERE or LIMIT)WarningNo
L018Leading wildcard LIKE ('%x')WarningNo
L019NOT IN with NULL risk (prefer NOT EXISTS)WarningNo
L020Correlated subquery in SELECT list (N+1)WarningNo
L021OR chain instead of INWarningNo
L022Function on indexed column in WHEREWarningNo
L023Implicit cross join (comma joins)WarningNo
L024Table alias requiredWarningNo
L025Reserved keyword used as identifierWarningNo
L026INSERT without explicit column listWarningNo
L027UNION instead of UNION ALLWarningNo
L028LIMIT without ORDER BYWarningNo
L029Subquery that can be a JOINWarningNo
L030DISTINCT on many columnsWarningNo

Full reference with examples: https://github.com/ajitpratap0/GoSQLX/blob/main/docs/LINTING_RULES.md

Steps

  1. Call lint_sql with {"sql": "..."}. Each violation has rule, rule_name, severity, message, line, column and suggestion.
  2. Group violations by rule, show the offending line, and give the fix. For auto-fixable rules, mention gosqlx lint --auto-fix.
  3. For a rule-ID question, explain the rule from the table above and show a before/after example.

Fallback when the MCP tools are unavailable

sh
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

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ajitpratap0/gosqlx/sql-linting/badge)](https://verified-skill.com/skills/ajitpratap0/gosqlx/sql-linting)

Something wrong with this skill or its page? Tell us.