sql-check
Analyze SQL queries for performance and security issues
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/lxgicstudios/ai-sql-checkSQL Checker
Paste your SQL, get performance tips and security warnings. Catches N+1s and injection risks.
Quick Start
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
# 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
- Twitter: @lxgicstudios
Metadata
Not sure this is the right skill?
Describe what you want to build ā we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-lxgicstudios-ai-sql-check": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
script-gen
Generate package.json scripts with AI. Use when setting up npm scripts.
email-template-gen
Generate responsive email templates. Use when building transactional emails.
branch-namer
Generate descriptive git branch names from plain English. Use when you need a branch name that follows conventions.
cloudflare-gen
Generate Cloudflare Workers configuration and code. Use when building on the edge.
adr-writer
Generate Architecture Decision Records with AI. Use when documenting technical decisions.