schema-drift-detector

Cross-references PR migrations with schema.rb changes to flag drift during code review.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/drhazemibclc/plate --skill schema-drift-detector-drhazemibclc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schema-drift-detector
Source: https://github.com/drhazemibclc/plate/tree/main/.codex/skills/schema-drift-detector
Command: npx skills add https://github.com/drhazemibclc/plate --skill schema-drift-detector-drhazemibclc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detects unrelated schema.rb changes in PRs by cross-referencing against included migrations. Use when reviewing PRs with database schema changes.

Core Features & Use Cases

  • Cross-reference PR migrations with schema.rb
  • Surface drift indicators during code review
  • Enforce drift-review workflows and provide remediation guidance

Quick Start

Run a drift check by verifying that the changes to db/schema.rb in the PR correspond to the included migrations and flag any drift.

Frequently Asked Questions about schema-drift-detector

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

FAQPage Schema
How do I detect unrelated schema.rb changes leaking into a pull request?

Detect unrelated schema.rb changes by cross-referencing the PR's database migrations against the schema.rb diff. This validates that schema modifications align with included migrations and surfaces drift indicators during code review.

Why does schema.rb drift occur in feature branches with database migrations?

Schema.rb drift occurs when developers commit unrelated database schema changes alongside feature branch migrations. Cross-referencing the PR diff against included migrations identifies and prevents these unintended schema modifications from leaking into the main branch.

What is the best way to review database schema changes in a git diff?

The best way to review database schema changes is to apply a drift check that validates schema.rb modifications against the PR's migrations. This surfaces drift indicators and enforces correct migration workflows during code review.

How do I enforce a drift-review workflow for Rails migrations in code review?

Enforce a drift-review workflow by validating that schema.rb changes in the PR diff correspond to included migrations. This surfaces drift indicators and provides remediation guidance to ensure correct database migrations.

Can I use this to check schema.rb alignment across multiple feature branches?

Yes, you can check schema.rb alignment across feature branches by applying the drift detector during code reviews. It validates that schema.rb changes in each PR diff align with that PR's specific database migrations.

When should I not use automated schema drift detection?

Automated schema drift detection is not suitable when a PR intentionally modifies schema.rb without corresponding database migrations, as the tool cross-references migrations to validate schema changes and flag drift indicators.