alembic-migration

alembic-migration is a skill for Claude Code from vstorm-co/full-stack-ai-agent-template. It costs 56 tokens per session (552 once invoked), scanned A, original, MIT.

A guide for managing PostgreSQL database structure changes with Alembic, a tool used with SQLAlchemy. It covers creating, checking, and applying numbered migration files.

In plain words
What is it for?
Use it when changing SQLAlchemy models, updating the PostgreSQL schema, or backfilling existing data. It helps generate migrations, review upgrade and rollback steps, and verify the database reaches the latest version.
Why use it?
It helps keep changes to tables, columns, indexes, constraints, and stored data deliberate and reversible. It also reduces the risk of applying an autogenerated change that does something unexpected.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when changing SQLAlchemy models, updating the PostgreSQL schema, or backfilling existing data. It helps generate migrations, review upgrade and rollback steps, and verify the database reaches the latest version.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vstorm-co/full-stack-ai-agent-template/alembic-migration
About the project

Full-Stack AI Agent Template generates full-stack AI applications with a FastAPI backend and Next.js frontend, including agents, retrieval-augmented generation, streaming, authentication, and integrations. It is for building AI products with features such as chat, conversation sharing, administration, and multiple agent or vector-database choices. Catalogue add-ons support the generated applications and their agent workflows.

vstorm-co/full-stack-ai-agent-template · 1,953 stars · on GitHub · vstorm-co.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vstorm-co/full-stack-ai-agent-template --skill alembic-migration
Clone the repo
git clone --depth 1 https://github.com/vstorm-co/full-stack-ai-agent-template

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for alembic-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/vstorm-co/full-stack-ai-agent-template/alembic-migration/github.svg)](https://agentmods.dev/skills/vstorm-co/full-stack-ai-agent-template/alembic-migration)
Your own site
<a href="https://agentmods.dev/skills/vstorm-co/full-stack-ai-agent-template/alembic-migration"><img src="https://agentmods.dev/badge/skills/vstorm-co/full-stack-ai-agent-template/alembic-migration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for alembic-migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/vstorm-co/full-stack-ai-agent-template/alembic-migration"><img src="https://agentmods.dev/badge/skills/vstorm-co/full-stack-ai-agent-template/alembic-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 552 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.00552
Opus 5.5 $0.00022 $0.00221
Sonnet 5.5 $0.00011 $0.00110
Haiku 4.5 $0.00006 $0.00055

Measured 1mo ago against content hash db4fedbdf500, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

alembic-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

template/{{cookiecutter.project_slug}}/.claude/skills/alembic-migration/SKILL.md · 42 lines

What it actually says

Alembic Migrations

This project uses async SQLAlchemy 2.0 + Alembic on PostgreSQL. Migrations live in backend/alembic/versions/ and are numbered (0001_…, 0002_…).

Workflow

  1. Change the model first in backend/app/db/models/ (Mapped[...] + mapped_column(), __repr__, relationships with ondelete="CASCADE"). Make sure the model is imported in backend/app/db/models/__init__.py so autogenerate sees it.

  2. Autogenerate the migration:

    cd backend && uv run alembic revision --autogenerate -m "add <thing>"
    # or: make db-migrate
    
  3. ALWAYS review the generated file. Autogenerate is a draft, not the truth:

    • Confirm upgrade() matches your intent and downgrade() actually reverses it.
    • Check the down_revision chains onto the current head (uv run alembic heads).
    • Watch for dropped columns/tables you didn't intend, server defaults, enum changes, and JSON/array types.
    • Name the revision file with the next sequential prefix to match the existing convention.
  4. Apply and verify:

    cd backend && uv run alembic upgrade head   # or: make db-upgrade
    uv run alembic current                       # confirm at head
    

    Then round-trip once to prove downgrade() works: alembic downgrade -1 && alembic upgrade head.

Data migrations / backfills

For backfills, add explicit op.execute(...) or a small data-loop in upgrade() (see the existing *_backfill_*.py migrations for the pattern). Keep schema and data changes in separate, well-named revisions when practical.

Rules

  • Never edit a migration that has already been applied in shared environments — add a new one.
  • make dev / make bootstrap run alembic upgrade head automatically; you don't need a separate step in dev.
  • Keep models and migrations in sync — a model change without a migration will pass tests (sessions are mocked) but break on real Postgres.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 42 lines · 56 tokens per session scan A db4fedbdf500

Subscribe to this mod's changes

alembic-migration is a skill published in the GitHub repository vstorm-co/full-stack-ai-agent-template (1,953 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 552 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories