db-audit

Audits database performance and safety across 13 dimensions with ORM and live query analysis.

6|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/greglas75/zuvo --skill db-audit-greglas75
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-audit
Source: https://github.com/greglas75/zuvo/tree/main/skills/db-audit
Command: npx skills add https://github.com/greglas75/zuvo --skill db-audit-greglas75

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Database issues like N+1 queries, missing indexes, unsafe migrations, and exposed credentials often go undetected until they cause production incidents. This Skill systematically audits database interactions from code patterns through schema design to live query plans, producing a scored report with fixes ranked by impact and effort. ## Core Features & Use Cases - 70+ checks across 13 dimensions (DB1-DB13): Covers query patterns, indexes, schema design, connections, transactions, migrations, caching, ORM anti-patterns, observability, data lifecycle, DB security, and migration deployment safety. - ORM-aware analysis: Works with Prisma, TypeORM, Drizzle, Sequelize, Knex, Django ORM, SQLAlchemy, and raw SQL, with dedicated tooling like Prisma schema analysis and EXPLAIN query simulation. - Optional live analysis: Connect to PostgreSQL or MySQL in read-only mode for EXPLAIN plans and statistics. - Use Case: Before a release, run a full audit on your project to catch destructive migration operations, unbounded queries, and PII columns lacking protection, then receive a prioritized remediation report. ## Quick Start Ask the AI to run a full database audit on the current project with zuvo:db-audit, or scope it with a path, --schema, --queries, --connections, or --live <connection> flag.

Frequently Asked Questions about db-audit

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

FAQPage Schema
How do I audit database performance in my codebase?

Run the db-audit skill with no arguments for a full 13-dimension audit, or scope it with a path, file, or flags like --schema, --queries, or --connections. It detects your ORM and database engine automatically and produces a scored report with fixes ranked by impact.

How to detect N+1 queries and missing indexes automatically?

The audit runs pattern scans for unbounded findMany calls, await-in-loop, and read-then-write race conditions, plus Prisma-specific EXPLAIN query simulation. These tool-verified checks catch N+1 and missing-index issues that manual review typically misses.

Does the audit support Prisma, Django, and other ORMs?

Yes, it supports Prisma, TypeORM, Drizzle, Sequelize, Knex, Django ORM, SQLAlchemy, and raw SQL clients. Each ORM has dedicated detection signals and specialized checks, such as Prisma schema analysis and Django model graph inspection.

Can I run a live database audit against PostgreSQL or MySQL?

Yes, pass --live with a connection string to enable EXPLAIN plans and statistics gathering. Live mode is strictly read-only: only SELECT and EXPLAIN queries are permitted, with no DDL or DML allowed.

Is the database audit safe to run on production projects?

The audit is read-only by design and never runs migrations, modifies schema files, or executes INSERT/UPDATE/DELETE statements. Its only write target is the audit report directory, so it cannot alter your database or code.

When should I not use the database audit skill?

Use a code review skill for general code quality, a performance audit for full-stack latency, or a security audit for security-only concerns. This skill focuses specifically on database interactions, schema design, and migration safety.