debugging-orm-queries
1
总安装量
1
周安装量
#45231
全站排名
安装命令
npx skills add https://github.com/galihcitta/dotclaudeskills --skill debugging-orm-queries
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
codex
1
github-copilot
1
claude-code
1
Skill 文档
Debugging ORM Queries
References
| Language | ORMs | Reference |
|---|---|---|
| Node.js | Sequelize, Prisma, TypeORM | references/nodejs.md |
| Go | GORM, sqlc, sqlx, ent | references/golang.md |
| Python | SQLAlchemy, Django, Peewee | references/python.md |
| Anti-patterns | N+1, indexes, pagination | references/anti_patterns.md |
Scripts
# Pretty-print SQL
python scripts/sql_formatter.py "SELECT..."
# Detect N+1, missing WHERE, duplicates from log file
python scripts/query_analyzer.py queries.log [--json]
# Parse EXPLAIN output (PostgreSQL or MySQL)
psql -c "EXPLAIN ANALYZE ..." | python scripts/explain_parser.py --postgres
mysql -e "EXPLAIN FORMAT=JSON ..." | python scripts/explain_parser.py --mysql
# Node.js request-scoped query tracking (see script for setup)
# Integrates with Sequelize, Prisma, TypeORM
Quick Patterns
Enable logging: Check reference for ORM-specific config (usually logging: true or echo=True)
ORM â SQL: Enable logging, run query, capture output
SQL â ORM: Map clauses to methods:
SELECT columnsâ specify fields/attributesWHEREâwhere/filterwith operatorsJOINâinclude/preload/prefetch_relatedORDER BYâorder/orderByLIMIT/OFFSETâlimit/offsetor cursor-based
Performance issues: Run query_analyzer.py on logs, check anti_patterns.md for solutions