Agent skill · software engineering · aiskillstore
py-alembic-patterns
Alembic migration patterns for PostgreSQL. Use when creating migrations, reviewing autogenerated migrations, or handling schema changes safely.
Why this skill is useful
Provides specific Alembic migration patterns and commands for PostgreSQL that enhance the AI's ability to generate safe and effective database migrations.
What it needs
Requires alembic, sqlalchemy installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Alembic Migration Patterns Problem Statement Alembic autogenerate is convenient but misses things and sometimes generates dangerous migrations. Schema changes are high-risk - bad migrations cause data loss or downtime. Every migration needs human review. --- Pattern: Migration Commands --- Pattern: Reviewing Autogenerated Migrations ALWAYS review autogenerated migrations. They often need fixes. What Autogenerate Catches Table creation/deletion Column addition/removal Column type changes Foreign key changes Index changes (sometimes) What Autogenerate Misses Column renames (sees as drop + add = DATA LOSS) Table renames (same problem) Data migrations Constraint names Partial indexes Complex index changes Check constraints Triggers and functions --- Pattern: Safe Migration Structure --- Pattern: Adding Non-Nullable Columns Problem: Adding NOT NULL column to existing table fails if table has rows. --- Pattern: Data Migrations Problem: Need to transform existing data during schema change. --- Pattern: Large Table Migrations Problem: Migrations on large tables can lock the table for too long. --- Pattern: Enum Changes Problem: PostgreSQL enums are tricky to modify. --- Pattern: Multiple Heads (Branching) Problem: Multiple developers creating migrations simultaneously. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/py-alembic-patterns