schema-alignment

Detect drift between database schemas and ORM code models.

8|1|Updated Jul 11, 2025
One-click install
npx skills add https://github.com/ViperJuice/treesitter-chunker --skill schema-alignment-viperjuice
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schema-alignment
Source: https://github.com/ViperJuice/treesitter-chunker/tree/main/.ai-dev-kit/skills/schema-alignment
Command: npx skills add https://github.com/ViperJuice/treesitter-chunker --skill schema-alignment-viperjuice

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect drift between database schemas and code data models. This skill identifies missing columns, type mismatches, orphaned migrations, and naming inconsistencies.

Core Features & Use Cases

  • Cross-ORM drift detection across SQLAlchemy, Django, Prisma, and TypeORM for multi-project codebases.
  • Extract database schema from migrations or live database and extract code models from ORM definitions.
  • Compare schemas and models to produce a drift report and migration guidance.
  • Supports framework-agnostic usage with guardrails and detailed warnings.

Quick Start

Run a drift check against your project to produce a schema-alignment report.

Frequently Asked Questions about schema-alignment

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

FAQPage Schema
How do I detect drift between my database schema and ORM models?

To detect schema drift, this skill extracts live database schemas and code models, compares them, and reports missing columns, type mismatches, and orphaned migrations. It produces a structured drift report to highlight inconsistencies between your database and ORM definitions.

Can I check schema alignment across different ORMs like Django, Prisma, and TypeORM?

Yes, schema alignment checks support cross-ORM drift detection for Django, Prisma, TypeORM, and SQLAlchemy. It extracts schema definitions from these ORMs and compares them against the database to find missing columns and naming inconsistencies across multi-project codebases.

What is the best way to find orphaned migrations and naming inconsistencies in my database?

The best way to find orphaned migrations and naming inconsistencies is to run a drift check that compares extracted database schemas against ORM code models. This process outputs a structured drift report detailing migration planning and specific schema mismatches.

Does schema drift detection work by comparing live databases or migration files?

Schema drift detection works by extracting database schemas from either live databases or migration files, then extracting code models from ORM definitions. It compares these two sources to produce an end-to-end drift report including missing columns and type mismatches.

How do I plan migrations after finding type mismatches and missing columns in my schema?

After finding type mismatches and missing columns, you can use the generated drift report to follow the migration planning workflow. This workflow provides structured results and guidance to help correct schema drift and align your ORM models with the database.

Why does my ORM code model have naming inconsistencies with the database schema?

Naming inconsistencies occur when database schemas and ORM code models drift apart over time. This skill identifies these mismatches by extracting and comparing live schemas with ORM definitions, outputting a detailed drift report to help correct the inconsistencies.