schema-drift-detector

Detect unrelated schema.rb changes in pull requests by cross-referencing database migrations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents accidental inclusion of unrelated schema.rb changes in pull requests, which commonly occurs when developers run migrations from other branches.

Core Features & Use Cases

  • Migration Verification: Compares schema.rb changes against the migrations included in a pull request.
  • Drift Detection: Identifies extra columns, tables, indexes, or version mismatches not originating from the PR's migrations.
  • Use Case: When reviewing a PR that includes database migrations, use this Skill to ensure that schema.rb only reflects the changes intended by the PR, not stray modifications from main.

Quick Start

Use the schema-drift-detector to verify that the schema.rb changes in this PR are only related to the included migrations.

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 in a pull request?

Detect unrelated schema.rb changes in a pull request by cross-referencing schema modifications against included database migrations to identify stray table alterations from other branches.

Why does my Rails pull request include accidental schema drift from main?

Schema drift occurs when developers run migrations from other branches. This Skill validates schema version and table alterations against PR-specific migrations to isolate unintended modifications.

How do I check if a database migration matches the schema.rb changes in a PR?

Check if a database migration matches schema.rb changes by comparing column additions, index creations, and version mismatches against the specific migration files included in the pull request.

Can I verify schema version changes against PR-specific migrations during code review?

Yes, you can verify schema version changes during code review by cross-referencing the schema.rb file against the database migrations included in the pull request to catch accidental inclusions.

What is the best way to prevent stray database schema modifications in Rails pull requests?

The best way to prevent stray database schema modifications is to validate schema.rb changes against PR-specific migrations, identifying extra columns, tables, or indexes not originating from the intended branch.