sql-review
About this skill
Pre-commit SQL code review for uncommitted database changes. Detects antipatterns that cause real production incidents — `sp_send_dbmail` in CATCH blocks (masks the real error as a misleading permission denial), broken retry patterns (`@retry` declared without a surrounding `WHILE` loop), swallowing CATCH blocks (no `THROW`/`RAISERROR`/log), new tables created without a primary key or any index (silent perf-then-deadlock killer), parameter-vs-column type mismatches (8152 truncation risk), `EXEC()` string concatenation without `sp_executesql` parameters (SQL injection), `NOLOCK` in write paths, `UPDATE`/`DELETE` without `WHERE`, cursors without `READ_ONLY FORWARD_ONLY LOCAL`, hardcoded env values (emails, server names, paths), cross-DB references like `msdb.dbo.*`, missing `SET NOCOUNT ON`, missing `GRANT EXECUTE` on `CREATE PROC`, `BEGIN TRANSACTION` outside `TRY`/`CATCH`, and vestigial control-flow comments hinting at refactor leftovers (e.g. `-- end while loop` with no `WHILE`). Reports findings as `BLOCKER` / `WARN` / `INFO` with `file:line` citations and per-finding fix recommendations. **Never edits SQL** — surfaces findings for human review. Use this skill whenever the user says "/sql-review", "review my SQL", "review the SQL diff", "lint the SQL", "check my SQL changes", "SQL pre-commit check", "audit my stored proc", or "any SQL antipatterns in this diff" — even if they don't explicitly say "SQL review skill". Distinct from `code-review` (general best-practice review) — this carries SQL-specific patterns that surface DB-layer production incidents.
Security
This skill was reviewed and published through ClawHub's own moderation and security scanning pipeline before being listed on their registry. ClawHub checks for malicious code, dependency vulnerabilities, and policy violations.
When you run npx @agentpowers/cli install sql-review, AgentPowers downloads the package to a sandbox and runs a full security scan (ClamAV, Snyk, GuardDog, VirusTotal) before allowing installation. If the scan fails, installation is blocked.
Powered by ClawHub
This skill is sourced from ClawHub, a large open registry of community-built AI tools. By integrating ClawHub into AgentPowers, you get access to hundreds of additional skills while still benefiting from our security scanning, one-command install, and unified management through the AgentPowers CLI.
Getting started
New to AgentPowers? Learn how to install and use skills from the community.