schema-drift-detector

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common issue of pull requests being polluted with unrelated schema.rb changes, which occurs when developers run migrations from other branches on their feature branches, leading to merge conflicts and confusion during code review.

Core Features & Use Cases

  • Drift Detection: Cross-references all schema.rb changes in a PR against the migrations included in that PR to identify unrelated modifications.
  • Pattern Recognition: Flags common drift types including extra columns, extra tables, extra indexes, and schema version mismatches.
  • Use Case: Perfect for Rails development teams conducting pull request reviews for changes that include database schema modifications, ensuring PRs remain focused and merge-ready.

Quick Start

Use the schema-drift-detector skill to review the current pull request for unrelated schema.rb changes against its included migrations.

Frequently Asked Questions about schema-drift-detector

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

FAQPage Schema
Why does schema.rb have unrelated changes in my Rails pull request?

Schema drift in Rails pull requests happens when developers run database migrations from other branches, causing unrelated schema.rb modifications that pollute the PR and trigger merge conflicts.

How do I detect unrelated schema.rb changes during a Rails code review?

Detect unrelated schema.rb changes by cross-referencing all schema modifications in a pull request against the migrations included in that PR to identify extra columns, tables, indexes, and version mismatches.

Can I check for database migration drift in Rails PRs automatically?

Yes, you can check for database migration drift by applying a review skill that verifies all schema changes correspond to PR migrations and flags extra tables or schema version mismatches with remediation steps.

What is the best way to prevent schema version mismatches in Rails pull requests?

The best way to prevent schema version mismatches is to cross-reference schema.rb changes against included migrations during code review, flagging any drift caused by running migrations from other branches.

Does the schema drift detector work with non-Rails database migrations?

No, the schema drift detector specifically applies to Rails codebases, cross-referencing schema.rb changes against included migrations to identify drift during pull request reviews for database schema modifications.