$npx -y skills add faizkhairi/claude-code-blueprint --skill db-checkValidate database schema integrity and check for common issues
| 1 | Database health check for the current project: |
| 2 | |
| 3 | 1. Read the ORM schema file (e.g., `prisma/schema.prisma`, `drizzle/schema.ts`, SQLAlchemy models, ActiveRecord schema, Entity Framework DbContext, GORM structs, or equivalent) and analyze all models |
| 4 | 2. **CRITICAL**: Check all database tables have ORM models (unmodeled tables may be dropped on schema sync, e.g. Prisma db push; know whether your ORM's sync command is destructive) |
| 5 | 3. Check for missing indexes on foreign keys and frequently queried columns |
| 6 | 4. Scan services for N+1 query patterns (missing eager loading / includes in queries) |
| 7 | 5. Verify `undefined` vs `null` usage in all ORM create/update operations |
| 8 | 6. Check raw SQL queries for injection vulnerabilities (parameterized queries required) |
| 9 | 7. Verify referential integrity (cascade rules, orphan prevention) |
| 10 | 8. Check for date handling issues (check CLAUDE.md for system-specific date formats) |
| 11 | 9. Review migration history for risky operations |
| 12 | |
| 13 | Report findings with severity: CRITICAL / HIGH / MEDIUM / LOW. |