Skip to main content
skill CX Codex

alembic — Claude Code skill: database migrations

A skill that walks your agent through Alembic migrations on SQLAlchemy projects, from alembic init to production rollout and rollback.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add manutej/luxor-claude-marketplace --skill alembic -a claude-code
Open on GitHub

What alembic does

The skill covers the whole Alembic loop: hand-written revisions and --autogenerate, data migrations during schema changes, and the path from dev to staging to production. It ships code samples for env.py, pulling DATABASE_URL from environment variables, and adding columns and indexes to a tickets table.

Autogenerate gets its own section. The agent will flag that the output needs a human pass: a renamed column shows up as a drop plus an add, a type change needs data conversion, and complex constraints and data migrations never make it into the generated file. That is the reason not to run alembic upgrade head right after generating.

Dependencies are alembic>=1.13.0, sqlalchemy>=2.0.0, psycopg2-binary>=2.9.0 and pytest>=7.0.0. The examples assume PostgreSQL and support-desk tables: tickets, satisfaction ratings, schema versioning. On another database engine you will rewrite the connection setup.

What it helps with

  • write an Alembic revision for a new column on the tickets table
  • backfill data when a column type or value set changes
  • roll back a failed migration in production
  • read the connection string from environment variables
  • review an autogenerated revision before deploy

Example prompts for the agent

  • create an Alembic migration for a priority column on tickets
  • write a data migration that maps old ticket statuses to the new enum
  • review this autogenerated revision and tell me what it missed

How to install alembic

1Skills CLI (Vercel)

npx skills add manutej/luxor-claude-marketplace --skill alembic -a claude-code

2Manually: put the files in place

~/.claude/skills/alembic/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/alembic/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about alembic

How do I install the alembic skill in Claude?

Run npx skills add manutej/luxor-claude-marketplace --skill alembic -a claude-code. The skill then lives at ~/.claude/skills/alembic/SKILL.md.

What does the alembic skill do?

It guides the agent through writing and checking Alembic migrations: revisions, data migrations, rollbacks and production deploys. It targets PostgreSQL and support systems.

What do I need to run it?

The packages alembic>=1.13.0, sqlalchemy>=2.0.0, psycopg2-binary>=2.9.0 and pytest>=7.0.0. The connection examples assume PostgreSQL.

Similar skills

All skills for Data and databases →

From the same set31

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor