data-integrity-guardian

Analyze database migrations for referential integrity and transaction boundary issues.

1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/jovermier/claude-code-plugins-ip-labs --skill data-integrity-guardian-jovermier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-integrity-guardian
Source: https://github.com/jovermier/claude-code-plugins-ip-labs/tree/main/plugins/dev/agents/review/data-integrity-guardian
Command: npx skills add https://github.com/jovermier/claude-code-plugins-ip-labs --skill data-integrity-guardian-jovermier

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migrations and data-layer changes risk violate referential integrity, split transactions, and allow invalid data if checks are missing. The Data Integrity Guardian identifies and mitigates these risks to keep data consistent across systems.

Core Features & Use Cases

  • Validate foreign key relationships and cascade rules; detect orphaned records.
  • Verify transaction boundaries and isolation to prevent partial commits and races.
  • Enforce data validation at the application and database level; provide fixes and patterns.
  • Use Case: When reviewing a migration that adds constraints, this skill highlights potential breaking changes and suggests safe alternatives.

Quick Start

Use the data-integrity-guardian skill to audit a migration script or data operation plan and produce a report that highlights referential integrity issues, transaction boundaries, and validation gaps.

Frequently Asked Questions about data-integrity-guardian

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

FAQPage Schema
How do I prevent orphaned records during database migrations?

To prevent orphaned records during database migrations, validate foreign key relationships and cascade rules before applying schema changes. Auditing migration scripts detects existing orphaned records and suggests safe alternatives to avoid breaking referential integrity.

What is the best way to handle transaction boundaries and concurrency in SQL migrations?

Handling transaction boundaries and concurrency in SQL migrations requires verifying isolation levels to prevent partial commits and race conditions. Enforcing correct transaction boundaries across schemas and ORM layers ensures data consistency during concurrent data-layer changes.

How do I validate data integrity when adding constraints to an existing schema?

Validating data integrity when adding constraints involves enforcing validation at both the application and database levels. Reviewing the migration operation plan highlights potential breaking changes and provides concrete patterns and fixes to safely apply the new constraints.

Do I need external tools to check referential integrity across ORM layers?

You do not need external tools to check referential integrity across ORM layers. The analysis requires no tooling beyond standard SQL and ORM usage, providing concrete guidance and fixes directly through your existing database environment.

Why does my database migration cause partial commits and race conditions?

Database migrations cause partial commits and race conditions when transaction boundaries and isolation levels are improperly configured. Splitting transactions across schema changes without strict validation allows concurrent operations to violate data integrity.