Sql anti pattern linter
Skill sisodiabhumca/agent-skills/skills/sql-anti-pattern-linter
Vendor-neutral skill to lint SQL text for common anti-patterns and output actionable findings.From its SKILL.md
npx -y skills add sisodiabhumca/agent-skills --skill sql-anti-pattern-linterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.1 KB, 267 tokens by cl100k_base, as published. Nobody here has run it
When to invoke
- You want a lightweight, fast static check on SQL before review.
- You suspect performance issues from patterns like
SELECT *or non-sargable filters.
Inputs needed
--sql_file: Path to a.sqlfile.--out_json: Path to write findings as JSON.
Workflow
- Read SQL text.
- Run heuristic rule checks (regex-based):
SELECT *WHEREclause using functions on indexed-looking columns (e.g.,LOWER(col)=...)- Leading wildcard
LIKE '%foo' ORchains on same column- Implicit joins via comma in
FROM a, b NOT IN (subquery)null-trap risk- Missing
WHEREonUPDATE/DELETE
- Emit findings with rule id, severity, message, and line number when detectable.
Output format
JSON with:
filefindings[]:{rule_id, severity, message, line}
Guardrails
- Not a full SQL parser; results are best-effort.
- Do not auto-rewrite queries without human review.
Reference code
sql_anti_pattern_linter.py
What ships with it: 2 files
3.7 KB alongside SKILL.md, 1 of them executable
- README.md280 B
- sql_anti_pattern_linter.pyruns3.4 KB