Data Consistency Review
by eighttrigrams
Data consistency review guidance. Use when reviewing database changes, migrations, schema modifications, or data integrity concerns.
Skill Details
Repository Files
1 file in this skill directory
name: data-consistency-review description: Data consistency review guidance. Use when reviewing database changes, migrations, schema modifications, or data integrity concerns.
Report ONLY when you found something concerning and then report what you found. If you didn't find anything, don't report it. Mention only things you actually found. Don't "check off" certain points here by saying "passed" this or that point. I assume when you didn't mention an aspect that is precisely because it PASSED. (But, if there is really absolutely nothing you found, at least acknowledge with a single statement that you did found nothing.)
Data Consistency Review
Exports
- User self serviced Backups (export functionality) breaks older backups?
DB
Focus Areas
- Migration safety and reversibility
- Schema soundness and normalization
- Data integrity constraints
- Backward compatibility with existing data
- Production data impact assessment
- Transaction boundaries and atomicity
Process
- Identify all schema changes and migrations
- Assess impact on existing production data
- Verify migrations are idempotent or safely repeatable
- Check for potential data loss scenarios
- Review rollback strategy
- Validate constraint additions against existing data
Migration Safety
Before Deploying
- Can the migration run on production data without failing?
- Are there NULL values that would violate new NOT NULL constraints?
- Are there duplicate values that would violate new UNIQUE constraints?
- Will foreign key additions find orphaned records?
- Is the migration small enough to complete without locking issues?
Destructive Changes
Flag these as high-risk:
- Dropping columns or tables
- Changing column types (especially narrowing)
- Adding NOT NULL without defaults
- Removing or modifying constraints
- Renaming columns/tables (breaks existing queries)
Safe Patterns
- Add columns as nullable first, backfill, then add constraint
- Create new table, migrate data, swap references, drop old
- Use feature flags to decouple deploy from migration
Schema Soundness
Normalization
- Avoid redundant data that can become inconsistent
- Use foreign keys to enforce relationships
- Consider denormalization only with clear justification
Constraints
- Primary keys on all tables
- Foreign keys for relationships
- NOT NULL where business logic requires values
- CHECK constraints for domain validation
- UNIQUE constraints for natural keys
Indexing
- Indexes on foreign keys
- Indexes on frequently queried columns
- Composite indexes match query patterns
- Avoid over-indexing (write performance)
Production Data Concerns
Data Volume
- Will queries still perform with 10x/100x data?
- Are there full table scans in migrations?
- Index creation on large tables may lock
Edge Cases
- Empty strings vs NULL handling
- Zero values vs NULL for numbers
- Timezone handling for dates
- Unicode and special characters
Rollback Strategy
- Can we revert the migration?
- Is there data loss on rollback?
- Do we need a data backup before migrating?
Related Skills
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Analyzing Financial Statements
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
Data Storytelling
Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.
Kpi Dashboard Design
Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Sql Optimization Patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
Anndata
This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.
Xlsx
Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.
