sql-review

Reviews SQL and ORM queries for injection risks, missing indexes, and bottlenecks.

746|130|Updated Jun 30, 2026
One-click install
npx skills add https://github.com/Archive228/loopkit --skill sql-review-archive228
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-review
Source: https://github.com/Archive228/loopkit/tree/main/skills/sql-review
Command: npx skills add https://github.com/Archive228/loopkit --skill sql-review-archive228

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures SQL and ORM queries are reviewed for potential issues before deployment, improving database security and performance.

Core Features & Use Cases

  • Correctness: Checks for SQL injection vulnerabilities, missing indexes, and unbounded queries.
  • Safety: Ensures transactions are properly wrapped and migrations are reversible.
  • Performance: Identifies potential performance bottlenecks like N+1 queries and unbounded selects.
  • Use Case: Before shipping a new query or migration, use this skill to validate its SQL and ORM constructs for any potential issues.

Quick Start

Run the sql-review skill on your new query before deploying it to production.

Frequently Asked Questions about sql-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check SQL queries for injection vulnerabilities before deployment?

To check SQL queries for injection vulnerabilities, you need static analysis of query constructs to identify unprotected inputs and unsafe execution patterns, ensuring database security before the code reaches production.

What is the best way to detect N+1 query performance bottlenecks in an ORM?

Detecting N+1 query performance bottlenecks requires static analysis of ORM query constructs to identify unbounded selects and inefficient data access patterns that degrade application performance.

Can I use static analysis to verify missing indexes in database migrations?

Yes, static analysis can verify missing indexes in database migrations by reviewing SQL query constructs and migration scripts to ensure proper indexing and reversible transaction wrapping for database maintenance.

Does query review work with ORM frameworks or only raw SQL statements?

Query review works with both ORM frameworks and raw SQL statements, applying static analysis to identify common issues like SQL injection, missing indexes, and unbounded queries across different database interaction patterns.

How do I ensure database migrations are reversible and safely wrapped in transactions?

Ensuring database migrations are reversible and safely wrapped in transactions requires static analysis of migration scripts to validate transaction boundaries and confirm that rollback constructs are properly defined.

What are the limitations of static analysis for SQL query review?

Static analysis for SQL query review is limited to examining query constructs without manual review, meaning it identifies structural issues like missing indexes and injection risks but cannot evaluate runtime database performance.