schema-drift-detector

schema-drift-detector is a skill for Claude Code, Codex from gvkhosla/compound-engineering-pi. It costs 33 tokens per session (1,257 once invoked), scanned A, original, MIT.

A pull-request checker for unintended changes in Rails' schema.rb file, which records a database's current table and column structure.

In plain words
What is it for?
Use it when reviewing pull requests that change database migrations and schema.rb.
Why use it?
It detects database structure changes that do not match the migrations included in the pull request, reducing accidental branch changes and merge confusion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when reviewing pull requests that change database migrations and schema.rb.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gvkhosla/compound-engineering-pi/schema-drift-detector
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gvkhosla/compound-engineering-pi --skill schema-drift-detector
Clone the repo
git clone --depth 1 https://github.com/gvkhosla/compound-engineering-pi

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for schema-drift-detector

README.md
[![agentmods](https://agentmods.dev/badge/skills/gvkhosla/compound-engineering-pi/schema-drift-detector/github.svg)](https://agentmods.dev/skills/gvkhosla/compound-engineering-pi/schema-drift-detector)
Your own site
<a href="https://agentmods.dev/skills/gvkhosla/compound-engineering-pi/schema-drift-detector"><img src="https://agentmods.dev/badge/skills/gvkhosla/compound-engineering-pi/schema-drift-detector/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for schema-drift-detector

Your own site · 80×15
<a href="https://agentmods.dev/skills/gvkhosla/compound-engineering-pi/schema-drift-detector"><img src="https://agentmods.dev/badge/skills/gvkhosla/compound-engineering-pi/schema-drift-detector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,257 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01257
Opus 5.5 $0.00013 $0.00503
Sonnet 5.5 $0.00007 $0.00251
Haiku 4.5 $0.00003 $0.00126

Measured 1mo ago against content hash a4856aa14a80, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

schema-drift-detector scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/schema-drift-detector/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Schema Drift Detector. Your mission is to prevent accidental inclusion of unrelated schema.rb changes in PRs - a common issue when developers run migrations from other branches.

The Problem

When developers work on feature branches, they often:

  1. Pull the default/base branch and run db:migrate to stay current
  2. Switch back to their feature branch
  3. Run their new migration
  4. Commit the schema.rb - which now includes columns from the base branch that aren't in their PR

This pollutes PRs with unrelated changes and can cause merge conflicts or confusion.

Core Review Process

Step 1: Identify Migrations in the PR

Use the reviewed PR's resolved base branch from the caller context. The caller should pass it explicitly (shown here as <base>). Never assume main.

# List all migration files changed in the PR
git diff <base> --name-only -- db/migrate/

# Get the migration version numbers
git diff <base> --name-only -- db/migrate/ | grep -oE '[0-9]{14}'

Step 2: Analyze Schema Changes

# Show all schema.rb changes
git diff <base> -- db/schema.rb

Step 3: Cross-Reference

For each change in schema.rb, verify it corresponds to a migration in the PR:

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 156 lines · 33 tokens per session scan A a4856aa14a80

Subscribe to this mod's changes

schema-drift-detector is a skill published in the GitHub repository gvkhosla/compound-engineering-pi (52 stars, last pushed 15d ago), licensed MIT. It adds 33 tokens to every session and 1,257 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-15.

Related

Other skills, from other repositories

review-harness

Use when reviewing implementation work that ran through a /tmp Pi task harness. Checks contract drift, unsafe shortcuts, validation evidence, and status honesty.

spences10/my-pi · 33 tokens

triage-contributor-pr

Triage open pull requests from external contributors to prisma/orm and produce a per-PR verdict with evidence. Use when a maintainer asks to triage, evaluate, assess, or review the queue of incoming contributor PRs, to decide whether a fork PR is safe to run CI on, to check whether a PR is in scope for its version…

prisma/orm · 131 tokens

review-implement-phase

Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.

prisma/orm · 38 tokens

review-triage-phase

Produces canonical review actions from fetched review state and renders action markdown. Use when the user wants only triage/action-planning for the review-framework workflow.

prisma/orm · 36 tokens

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

fabric-spec

Starts a persistent Pi Fabric spec supervisor that audits the main session against a feature design spec and steers only when a requirement lacks verified evidence. Use for strict, unblocked spec compliance while the main agent keeps full freedom to orchestrate.

monotykamary/pi-fabric · 50 tokens