alembic-specialist

alembic-specialist is an agent for Claude Code from AratKruglik/claude-sdlc. It costs 108 tokens per session (2,014 once invoked), scanned A, original, MIT.

A database coding agent for FastAPI applications using SQLAlchemy and Alembic, a tool that records changes to a database schema. It handles the database phase after feature development.

In plain words
What is it for?
It is for finalizing SQLAlchemy columns, indexes, constraints, and relationships; generating and reviewing Alembic migrations; applying them; and skipping the phase when no model metadata changed.
Why use it?
It reduces the risk of database changes disagreeing with the application's mapped classes by generating, reviewing, applying, and checking migrations.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the fastapi-plugin plugin — 2 skills, 2 agents shipped together

Good fit It is for finalizing SQLAlchemy columns, indexes, constraints, and relationships; generating and reviewing Alembic migrations; applying them; and skipping the phase when no model metadata changed.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/aratkruglik/claude-sdlc/alembic-specialist
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.

Clone the repo
git clone --depth 1 https://github.com/AratKruglik/claude-sdlc

Made for: Claude Code.

Or install fastapi-plugin, the plugin that ships this one along with the rest of its 2 skills, 2 agents.

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-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/aratkruglik/claude-sdlc/alembic-specialist/github.svg)](https://agentmods.dev/agents/aratkruglik/claude-sdlc/alembic-specialist)
Your own site
<a href="https://agentmods.dev/agents/aratkruglik/claude-sdlc/alembic-specialist"><img src="https://agentmods.dev/badge/agents/aratkruglik/claude-sdlc/alembic-specialist/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-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/aratkruglik/claude-sdlc/alembic-specialist"><img src="https://agentmods.dev/badge/agents/aratkruglik/claude-sdlc/alembic-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,014 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.
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.00108 $0.02014
Opus 5 $0.00054 $0.01007
Sonnet 5 $0.00022 $0.00403
Haiku 4.5 $0.00011 $0.00201

Measured 11d ago against content hash ab4c9038cf35, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

alembic-specialist 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 11d 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.

plugins/fastapi-plugin/agents/alembic-specialist.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Alembic Specialist (Database Phase)

You run in the "database" extra phase, defined by the FastAPI stack profile. Your scope is only database work for the current feature: finalizing SQLAlchemy 2.0 mapped class configurations, generating and reviewing Alembic migrations, and verifying the schema.

In SQLAlchemy 2.0 + Alembic, the mapped class is the source of truth and migrations are generated from the diff between Base.metadata and the current schema — you do not hand-write migrations from scratch. Your job is to get the column types, indexes, and relationships right, then alembic revision --autogenerate, then review the generated migration before applying it.

First: load sdlc:architect-conventions via the Skill tool — it defines the shared hard rules, code quality bar, workflow steps, and the report/compact-summary contract. Everything below is Alembic-specific and applies on top; where this file defines its own workflow, deliverable path, or summary format, this file wins.

When to skip

If the development phase made no SQLAlchemy model or Base.metadata changes (no new/edited mapped classes, no new relationships), report SKIPPED: no ORM model changes detected and return.

Look for these signals in docs/plans/{task_slug}/02-development.md:

  • File list contains a model file (e.g., models.py, app/*/models.py).
  • "Next phase notes" mention schema, model, migration, index, constraint, or relationship.

If none of those — skip. Don't manufacture work.

Alembic-specific hard rules

  • Never alembic upgrade head without reviewing the generated migration first. Read the migration file, verify column types, nullable settings, index names, and that downgrade() reverses upgrade() cleanly.
  • Never edit migrations from prior, already-applied releases. Only touch the migration generated in the current pipeline run.
  • Never squash or merge migration branch points without explicit direction — keep the linear history.
  • Never seed production data in migrations. Test/demo data belongs in a separate seeder, fixture, or conftest.py.
  • Always check alembic check after upgrade head to confirm no pending model changes remain.

Read the full file on GitHub · 167 lines

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. 11d ago First seen · 167 lines · 108 tokens per session scan A ab4c9038cf35

Subscribe to this mod's changes

alembic-specialist is an agent published in the GitHub repository AratKruglik/claude-sdlc (33 stars, last pushed 7d ago), licensed MIT. It adds 108 tokens to every session and 2,014 once invoked, about $0.0005 per session on Opus 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 agents, from other repositories

MS-SQL Database Administrator

Work with Microsoft SQL Server databases using the MS SQL extension.

github/awesome-copilot · 18 tokens

core-data-auditor

Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking. Automatically scans Core Data code for the 5 most critical safety violations - schema migration risks, thread-confinement errors, N+1 query patterns, production data loss risks, and performance issues…

CharlesWiltgen/Axiom · 261 tokens

lens

Turns raw data into actionable decisions — dashboards, metric definitions, SQL analytics, funnel and cohort analysis across BI platforms. Use when designing a dashboard, defining KPIs, or running funnel analysis. Trigger with "design a dashboard", "analyze our funnel".

jeremylongshore/tons-of-skills-marketplace · 53 tokens

ecto-schema-designer

Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.

oliver-kriska/claude-elixir-phoenix · 30 tokens

database-architect

Use this agent for database design and change work: schema design, indexing strategy, query optimization, migration safety, and engine selection. Trigger on "design a schema for", "this query is slow", "is this migration safe", "add an index", "Postgres or Mongo for this", or N+1 complaints. Returns schema/DDL with…

aayushostwal/nexus · 96 tokens

db-performance-auditor

Audits a .NET data-access layer end to end for performance — EF Core query patterns (N+1, projections, tracking), indexing gaps, DbContext configuration, connection resiliency, and bulk-operation opportunities — and produces a ranked report with fixes. Use when the user wants a database/EF performance review of a…

StefanTheCode/dotnet-ai-toolkit · 88 tokens