Analyze SQL queries for performance and security issues
Scanned 9/7/2026
Install to Claude Code
npx -y skills add modbender/skill-library-mcp --skill ai-sql-check --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Ai Sql Check?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/modbender-ai-sql-check)More formats (shields.io, HTML) on the badges page.
---
name: sql-check
description: Analyze SQL queries for performance and security issues
---
# SQL Checker
Paste your SQL, get performance tips and security warnings. Catches N+1s and injection risks.
## Quick Start
```bash
npx ai-sql-check "SELECT * FROM users WHERE name LIKE '%john%'"
```
## What It Does
- Identifies performance issues
- Flags SQL injection risks
- Suggests missing indexes
- Warns about N+1 queries
## Usage Examples
```bash
# Check a query
npx ai-sql-check "SELECT * FROM orders WHERE status = 'pending'"
# Check from file
npx ai-sql-check --file ./queries/report.sql
# With schema for better analysis
npx ai-sql-check --file query.sql --schema ./schema.sql
```
## Issues It Catches
- SELECT * anti-pattern
- Missing WHERE clause
- Unindexed columns in WHERE
- LIKE with leading wildcard
- Cartesian joins
- SQL injection patterns
## Output Example
```
⚠️ Performance Issues:
- SELECT * returns unnecessary columns
- LIKE '%john%' can't use index
🔒 Security Issues:
- None detected
💡 Suggestions:
- Add index on users(name)
- Select only needed columns
```
## Requirements
Node.js 18+. OPENAI_API_KEY required.
## License
MIT. Free forever.
---
**Built by LXGIC Studios**
- GitHub: [github.com/lxgicstudios/ai-sql-check](https://github.com/lxgicstudios/ai-sql-check)
- Twitter: [@lxgicstudios](https://x.com/lxgicstudios)
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
MySQL development best practices for schema design, query optimization, and database administration
Spring Boot中的JPA/Hibernate实体设计、关系、查询优化、事务、审计、索引、分页和连接池模式。
ClickHouse数据库模式、查询优化、分析和数据工程最佳实践,适用于高性能分析工作负载。
基于Supabase最佳实践的PostgreSQL数据库模式,用于查询优化、架构设计、索引和安全。
Unify 6+ memory systems into AgentDB with HNSW indexing for 150x-12,500x search improvements. Implements ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend).