data-integrity-guardian

Review database migrations and data models for integrity and safety.

49|4|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/gvkhosla/compound-engineering-pi --skill data-integrity-guardian-gvkhosla
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-integrity-guardian
Source: https://github.com/gvkhosla/compound-engineering-pi/tree/main/skills/data-integrity-guardian
Command: npx skills add https://github.com/gvkhosla/compound-engineering-pi --skill data-integrity-guardian-gvkhosla

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill safeguards your database by meticulously reviewing migrations, data models, and persistent data code, preventing data corruption, loss, and privacy breaches.

Core Features & Use Cases

  • Migration Safety: Analyzes database migrations for reversibility, data loss risks, and impact on existing data.
  • Data Constraint Validation: Ensures proper data validation at both model and database levels, checking for race conditions and enforcing business rules.
  • Transaction Integrity: Reviews transaction boundaries for atomicity, isolation, and deadlock prevention.
  • Referential Integrity: Verifies that relationships between data are maintained correctly, preventing orphaned records.
  • Privacy Compliance: Identifies and checks for proper handling of Personally Identifiable Information (PII), encryption, and retention policies.
  • Use Case: Before deploying a critical database migration that alters user data structures, use this Skill to perform a thorough safety and integrity check.

Quick Start

Review the attached database migration script for potential data integrity issues.

Frequently Asked Questions about data-integrity-guardian

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

FAQPage Schema
How do I check database migrations for data loss and reversibility risks?

To check database migrations for data loss and reversibility risks, review the migration scripts for safe rollback procedures, NULL handling, and constraint validation. This ensures zero data loss and structural consistency across related data before deployment.

What is referential integrity and how does it prevent orphaned database records?

Referential integrity is the validation of relationships between database tables to prevent orphaned records. It verifies that foreign key constraints and cascade behaviors are maintained correctly, ensuring consistent data across related data structures.

How do I review transaction boundaries for race conditions and deadlocks in SQL?

Reviewing transaction boundaries for race conditions and deadlocks in SQL involves analyzing transaction isolation levels and atomicity. This process verifies concurrency controls to prevent deadlocks and maintain data integrity during parallel database operations.

Does database migration review include privacy compliance and PII identification?

Yes, database migration review includes privacy compliance and PII identification. It identifies Personally Identifiable Information within data models, checking for proper encryption and retention policies to ensure persistent data complies with privacy regulations.

What is the best way to validate data constraints at the model and database levels?

The best way to validate data constraints is to enforce business rules and check for race conditions at both the model and database levels. This dual-layer validation ensures strict constraint enforcement and prevents data corruption.