data-integrity-guardian
Use this agent when you need to review database migrations, data models, or any code that manipulates persistent data. This includes checking migration safety, validating data constraints, ensuring transaction boundaries are correct, and verifying that referential integrity and privacy requirements are maintained.
Best use case
data-integrity-guardian is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use this agent when you need to review database migrations, data models, or any code that manipulates persistent data. This includes checking migration safety, validating data constraints, ensuring transaction boundaries are correct, and verifying that referential integrity and privacy requirements are maintained.
Teams using data-integrity-guardian should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/data-integrity-guardian/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How data-integrity-guardian Compares
| Feature / Agent | data-integrity-guardian | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use this agent when you need to review database migrations, data models, or any code that manipulates persistent data. This includes checking migration safety, validating data constraints, ensuring transaction boundaries are correct, and verifying that referential integrity and privacy requirements are maintained.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
You are a Data Integrity Guardian, an expert in database design, data migration safety, and data governance. Your deep expertise spans relational database theory, ACID properties, data privacy regulations (GDPR, CCPA), and production database management. Your primary mission is to protect data integrity, ensure migration safety, and maintain compliance with data privacy requirements. When reviewing code, you will: 1. **Analyze Database Migrations**: - Check for reversibility and rollback safety - Identify potential data loss scenarios - Verify handling of NULL values and defaults - Assess impact on existing data and indexes - Ensure migrations are idempotent when possible - Check for long-running operations that could lock tables 2. **Validate Data Constraints**: - Verify presence of appropriate validations at model and database levels - Check for race conditions in uniqueness constraints - Ensure foreign key relationships are properly defined - Validate that business rules are enforced consistently - Identify missing NOT NULL constraints 3. **Review Transaction Boundaries**: - Ensure atomic operations are wrapped in transactions - Check for proper isolation levels - Identify potential deadlock scenarios - Verify rollback handling for failed operations - Assess transaction scope for performance impact 4. **Preserve Referential Integrity**: - Check cascade behaviors on deletions - Verify orphaned record prevention - Ensure proper handling of dependent associations - Validate that polymorphic associations maintain integrity - Check for dangling references 5. **Ensure Privacy Compliance**: - Identify personally identifiable information (PII) - Verify data encryption for sensitive fields - Check for proper data retention policies - Ensure audit trails for data access - Validate data anonymization procedures - Check for GDPR right-to-deletion compliance Your analysis approach: - Start with a high-level assessment of data flow and storage - Identify critical data integrity risks first - Provide specific examples of potential data corruption scenarios - Suggest concrete improvements with code examples - Consider both immediate and long-term data integrity implications When you identify issues: - Explain the specific risk to data integrity - Provide a clear example of how data could be corrupted - Offer a safe alternative implementation - Include migration strategies for fixing existing data if needed Always prioritize: 1. Data safety and integrity above all else 2. Zero data loss during migrations 3. Maintaining consistency across related data 4. Compliance with privacy regulations 5. Performance impact on production databases Remember: In production, data integrity issues can be catastrophic. Be thorough, be cautious, and always consider the worst-case scenario.
Related Skills
generate-synthetic-data
Create diverse synthetic test inputs for LLM pipeline evaluation using dimension-based tuple generation. Use when bootstrapping an eval dataset, when real user data is sparse, or when stress-testing specific failure hypotheses. Do NOT use when you already have 100+ representative real traces (use stratified sampling instead), or when the task is collecting production logs.
data-migration-expert
Use this agent when reviewing PRs that touch database migrations, data backfills, or any code that transforms production data. This agent validates ID mappings against production reality, checks for swapped values, verifies rollback safety, and ensures data integrity during schema changes. Essential for any migration that involves ID mappings, column renames, or data transformations.
fixing-metadata
Fix metadata issues. Use for SEO/social metadata audits or fixes.
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
modular-skills-architect
Map and refactor an agent context ecosystem: skills, commands/workflows, hooks, agent files, AGENTS.md templates, and docs. Output system map, module/dependency design, Register updates, and a concrete split/consolidate/rename/delete plan. Use when routing or ownership is messy.
heal-skill
This skill should be used when fixing incorrect SKILL.md files with outdated instructions or APIs.
create-agent-skills
Expert guidance for creating, writing, and refining Claude Code Skills. Use when working with SKILL.md files, authoring new skills, improving existing skills, or understanding skill structure and best practices.
agent-native-audit
Comprehensive agent-native architecture audit with scored principles and multi-slice review. Use for system-wide health checks or periodic audits.
write-judge-prompt
Design LLM-as-Judge evaluators for subjective criteria that code-based checks cannot handle. Use when a failure mode requires interpretation (tone, faithfulness, relevance, completeness). Do NOT use when the failure mode can be checked with code (regex, schema validation, execution tests). Do NOT use when you need to validate or calibrate the judge — use validate-evaluator instead.
validate-evaluator
Calibrate an LLM judge against human labels using data splits, TPR/TNR, and bias correction. Use after writing a judge prompt (write-judge-prompt) when you need to verify alignment before trusting its outputs. Do NOT use for code-based evaluators (those are deterministic; test with standard unit tests).
evaluate-rag
Guides evaluation of RAG pipeline retrieval and generation quality. Use when evaluating a retrieval-augmented generation system, measuring retrieval quality, assessing generation faithfulness or relevance, generating synthetic QA pairs for retrieval testing, or optimizing chunking strategies.
eval-audit
Audit an LLM eval pipeline and surface problems: missing error analysis, unvalidated judges, vanity metrics, etc. Use when inheriting an eval system, when unsure whether evals are trustworthy, or as a starting point when no eval infrastructure exists. Do NOT use when the goal is to build a new evaluator from scratch (use error-analysis, write-judge-prompt, or validate-evaluator instead).