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.
npx skills add manutej/luxor-claude-marketplace --skill alembic -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/alembic/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/alembic/
1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill alembic -a codex2Manually: put the files in place
.agents/skills/alembic/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill alembic -a cursor2Manually: put the files in place
.cursor/skills/alembic/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install manutej/luxor-claude-marketplace alembic2Manually: put the files in place
.github/skills/alembic/SKILL.md1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill alembic -a gemini-cli2Platform CLI
gemini skills install https://github.com/manutej/luxor-claude-marketplace --path plugins/luxor-database-pro/skills/alembicManually: put the files in place
.devin/skills/alembic/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill alembic -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.