schema-alignmentlisted
Install: claude install-skill aiskillstore/marketplace
# Schema Alignment Skill
Detect drift between database schemas and code data models. This skill identifies missing columns, type mismatches, orphaned migrations, and naming inconsistencies.
## Design Principle
This skill is **framework-generic**. It works with any ORM or database:
- SQLAlchemy (Python)
- Django ORM (Python)
- Prisma (TypeScript/JavaScript)
- TypeORM (TypeScript)
- Drizzle (TypeScript)
- Alembic migrations
- Prisma migrations
- Django migrations
## Variables
| Variable | Default | Description |
|----------|---------|-------------|
| SCHEMA_SOURCE | auto | Schema source: auto, migrations, live_db, models |
| SEVERITY_THRESHOLD | medium | Report issues at this level or higher |
| AUTO_FIX | false | Attempt to generate fix suggestions |
| INCLUDE_TYPES | true | Include type mismatch detection |
## Instructions
**MANDATORY** - Follow the Workflow steps below in order.
1. Detect database technology and ORM in use
2. Extract schema from migrations or live database
3. Extract data models from code
4. Compare and identify drift
5. Generate alignment report
## Red Flags - STOP and Reconsider
If you're about to:
- Modify the database schema directly without a migration
- Assume a column exists without checking the schema
- Skip type checking because "it works in tests"
- Ignore nullable/not-null mismatches
**STOP** -> Check schema alignment -> Generate migration if needed -> Then proceed
## Workflow
### 1. Detect Stack
Identify the database and ORM:
```ma