query-inspector
A Claude Code plugin that analyzes SQL and ORM queries in code to produce tuning reports and query inventories.
What does it do?
After installing the plugin in Claude Code, users run the tuning-report or inventory-report skill. Both skills collect changes, extract queries, and reconstruct SQL. The tuning report checks for N+1 queries, missing indexes, and antipatterns, then lists suggested fixes and ways to verify them. The inventory report lists query bodies and index coverage across the project. Users can optionally connect a development database to run read-only queries and EXPLAIN; the plugin does not edit code directly.
Key features
- Extracts SQL and ORM queries from changed code and reports performance issues.
- Inventories query bodies and index coverage across the project.
- Checks in the next run whether previous tuning suggestions were applied.
- Optionally connects to a development database to run EXPLAIN and read-only queries.
- Provides suggested fixes and verification methods in reports without modifying source code.