# Alembic knowledge patch

> Alembic knowledge patch is an open-source agent skill for databases. Guides an agent through Alembic migrations, upgrades, autogenerate and revision graph. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Nevaberry/nevaberry-plugins/tree/main/plugins/knowledge-patch/patches-claude/alembic-knowledge-patch
- **Repository:** https://github.com/nevaberry/nevaberry-plugins
- **GitHub stars:** 25
- **License:** MIT
- **Skill name:** alembic-knowledge-patch
- **Collection:** https://github.com/Nevaberry/nevaberry-plugins
- **Categories:** [databases](https://ai-powered.com/categories/databases), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-30

## About

This skill gives an agent working knowledge of Alembic, the database migration tool for SQLAlchemy. It covers the situations where a project's migration setup changes: upgrading Alembic versions, adjusting configuration and path handling, reviewing autogenerated migrations, and diagnosing revision graph or backend-specific DDL behavior. It points out version-specific pitfalls such as runtime floors, a yanked 1.15.0 wheel, and changed path separator settings.

The skill asks the agent to first check the project's pinned Alembic, Python, SQLAlchemy and backend versions, and to trust the project's own code, tests and observed database behavior over general guidance. It includes quick references for deployment head checks, backend-guarded DDL flags, inline keys and references, offline version-table behavior, CHECK constraint comparison, and merge revisions. Deeper edge cases live in four reference files covering compatibility, autogenerate and rendering, operations and DDL, and revisions, CLI and extensions.

The skill ships no scripts. It is written for work inside an existing Alembic project and expects access to that project's files and a database to test against.

## When your agent uses it

> Alembic

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Nevaberry/nevaberry-plugins/tree/HEAD/plugins/knowledge-patch/patches-claude/alembic-knowledge-patch)
- [License: MIT](https://github.com/Nevaberry/nevaberry-plugins/tree/HEAD/plugins/knowledge-patch/patches-claude/alembic-knowledge-patch)

## Features

- **Version upgrade triage:** Flags yanked releases and the Python and SQLAlchemy floors for each Alembic series.
- **Path and configuration guidance:** Explains TOML configuration, path_separator settings and recursive revision directories.
- **Head checks for deployments:** Shows how to fail a deployment check when the database is missing any revision head.
- **Backend-guarded DDL:** Covers IF EXISTS and IF NOT EXISTS flags and inline primary key and reference options.
- **Autogenerate review:** Covers named CHECK comparison, comparison plugins and preserved constraint names.
- **Revision graph repair:** Covers merge splicing, dependency-aware heads and revision identifier rules.

## Good for

- Upgrade an Alembic project to a newer release without breaking its configuration
- Review an autogenerated migration before it runs against production
- Add a column with an inline foreign key reference using Alembic operations
- Diagnose why a database fails the check for missing revision heads
- Create a merge revision that is based on non-head revisions

## Install

### Claude Code

This skill ships in the `knowledge-patch` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Nevaberry/nevaberry-plugins
/plugin install knowledge-patch@nevaberry
```

Or copy only this skill to `~/.claude/skills/alembic-knowledge-patch`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nevaberry/nevaberry-plugins.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/alembic-knowledge-patch &&
cp -R "$tmp/plugins/knowledge-patch/patches-claude/alembic-knowledge-patch" ~/.claude/skills/alembic-knowledge-patch &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/alembic-knowledge-patch` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/alembic-knowledge-patch` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nevaberry/nevaberry-plugins.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/alembic-knowledge-patch &&
cp -R "$tmp/plugins/knowledge-patch/patches-claude/alembic-knowledge-patch" ~/.agents/skills/alembic-knowledge-patch &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/alembic-knowledge-patch` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/alembic-knowledge-patch` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nevaberry/nevaberry-plugins.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/alembic-knowledge-patch &&
cp -R "$tmp/plugins/knowledge-patch/patches-claude/alembic-knowledge-patch" ~/.cursor/skills/alembic-knowledge-patch &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/alembic-knowledge-patch` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Nevaberry/nevaberry-plugins.git --path plugins/knowledge-patch/patches-claude/alembic-knowledge-patch
```

Or copy the folder to `~/.gemini/skills/alembic-knowledge-patch` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/alembic-knowledge-patch`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nevaberry/nevaberry-plugins.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/alembic-knowledge-patch &&
cp -R "$tmp/plugins/knowledge-patch/patches-claude/alembic-knowledge-patch" ~/.copilot/skills/alembic-knowledge-patch &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/alembic-knowledge-patch` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Nevaberry/nevaberry-plugins.git
```

Then copy `nevaberry-plugins/plugins/knowledge-patch/patches-claude/alembic-knowledge-patch` into your agent's skills folder as `alembic-knowledge-patch`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Alembic knowledge patch need any scripts or extra tools to run?

It ships no scripts. It works through the Alembic project's own code, configuration and database.

### Which Alembic versions does Alembic knowledge patch cover?

It includes version-specific notes for the 1.15, 1.16, 1.17 and 1.18 series, including the yanked 1.15.0 wheel.

### Does Alembic knowledge patch tell the agent which Alembic version to use?

No. It tells the agent to inspect the project's pinned versions first and use 1.15.1 or later in the 1.15 series.

### How do I install Alembic knowledge patch in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/alembic-knowledge-patch to use it in all your projects, or to .claude/skills/alembic-knowledge-patch in one project. Or install the knowledge-patch plugin, which includes it: /plugin marketplace add Nevaberry/nevaberry-plugins, then /plugin install knowledge-patch@nevaberry.

### Does Alembic knowledge patch run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Alembic knowledge patch?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Alembic knowledge patch?

The closest alternatives to Alembic knowledge patch are Airflow knowledge patch, Bevy migration 0 17 to 0 18, Database migrations, Android SDK knowledge patch and Angular knowledge patch.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Airflow knowledge patch](https://ai-powered.com/skills/airflow-knowledge-patch): Airflow knowledge patch is an open-source agent skill for developer tools.
- [Bevy migration 0 17 to 0 18](https://ai-powered.com/skills/bevy-migration-0-17-to-0-18): Bevy migration 0 17 to 0 18 is an open-source agent skill for developer tools.
- [Database migrations](https://ai-powered.com/skills/database-migrations): Database migrations is an open-source agent skill for databases.
- [Android SDK knowledge patch](https://ai-powered.com/skills/android-sdk-knowledge-patch): Android SDK knowledge patch is an open-source agent skill for developer tools.
- [Angular knowledge patch](https://ai-powered.com/skills/angular-knowledge-patch): Angular knowledge patch is an open-source agent skill for developer tools.
- [Reviewing oracle to postgres migration](https://ai-powered.com/skills/reviewing-oracle-to-postgres-migration): Reviewing oracle to postgres migration is an open-source agent skill for databases.
- [Dependency upgrade](https://ai-powered.com/skills/dependency-upgrade): Dependency upgrade is an open-source agent skill for developer tools.
- [API versioning helper](https://ai-powered.com/skills/api-versioning-helper): API versioning helper is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/alembic-knowledge-patch
