db-check

Validate database schema integrity, indexes, query patterns, and ORM operations.

64|19|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/faizkhairi/claude-code-blueprint --skill db-check-faizkhairi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-check
Source: https://github.com/faizkhairi/claude-code-blueprint/tree/main/skills/db-check
Command: npx skills add https://github.com/faizkhairi/claude-code-blueprint --skill db-check-faizkhairi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Quickly identify and fix database schema issues before they cause problems in your project.

Core Features & Use Cases

  • Schema Integrity: Validates database schema for missing tables, columns, and models.
  • Index Checking: Ensures indexes are in place on foreign keys and frequently queried columns.
  • Query Patterns: Scans for N+1 query patterns to optimize performance.
  • Null Handling: Verifies null and undefined usage in ORM operations.
  • SQL Security: Checks raw SQL queries for potential injection vulnerabilities.
  • Referential Integrity: Ensures proper cascade rules and orphan prevention.
  • Date Handling: Reviews date formats for system compatibility.
  • Migration History: Reviews migration history for risky operations.

Quick Start

Run the 'db-check' skill to validate your database schema.

Frequently Asked Questions about db-check

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

FAQPage Schema
How do I check my database schema for missing indexes and foreign keys?

To check database schema integrity, you can run a validation process that scans for missing tables, columns, and models while ensuring indexes exist on foreign keys and frequently queried columns to prevent performance degradation.

How do I detect N+1 query patterns in my ORM operations?

Detecting N+1 query patterns involves scanning ORM operations to identify inefficient data fetching loops. This query optimization technique exposes redundant database calls, allowing developers to refactor relationships and batch queries for better performance.

How can I scan raw SQL queries for potential injection vulnerabilities?

Scanning raw SQL queries for injection vulnerabilities requires analyzing query construction patterns to detect un sanitized inputs. This security check verifies that ORM operations handle null and undefined values safely to prevent unauthorized data access.

What is the best way to validate referential integrity and cascade rules in a relational database?

Validating referential integrity involves checking cascade rules and orphan prevention mechanisms within your relational database schema. This schema validation ensures relationships remain consistent and prevents orphaned records when parent entries are deleted.

Can I review database migration history for risky operations before deployment?

You can review database migration history to identify risky schema operations prior to deployment. This validation process audits historical changes to ensure new migrations will not cause data loss or lock tables unexpectedly during execution.

Why does my database schema validation fail on date formats and system compatibility?

Database schema validation fails on date formats when stored values lack system compatibility across different environments. Reviewing date handling ensures consistent formatting within ORM operations and prevents query parsing errors.