migration-check

migration-check is a skill for Claude Code from atretyak1985/swarmery. It costs 45 tokens per session (821 once invoked), scanned A, original, Apache-2.0.

A safety checker for SQL database migrations and the schemas used by an application. It compares migration-managed PostgreSQL tables with ORM schemas and Zod or DTO validation types; ORM schemas describe database tables in application code.

In plain words
What is it for?
Use it to review migration files, check PostgreSQL schema changes, compare database and application types, and identify unsafe or partially applied migrations.
Why use it?
Migrations can cause data loss, failed deployments, or differences between the database and application code. Checking them before release helps reveal unsafe SQL and schema drift.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the core plugin — 36 skills, 8 commands, 13 agents shipped together

Good fit Use it to review migration files, check PostgreSQL schema changes, compare database and application types, and identify unsafe or partially applied migrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atretyak1985/swarmery/migration-check
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 atretyak1985/swarmery --skill migration-check
Clone the repo
git clone --depth 1 https://github.com/atretyak1985/swarmery

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 36 skills, 8 commands, 13 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 migration-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/atretyak1985/swarmery/migration-check/github.svg)](https://agentmods.dev/skills/atretyak1985/swarmery/migration-check)
Your own site
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/migration-check"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/migration-check/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 migration-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/migration-check"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/migration-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 821 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.00045 $0.00821
Opus 5 $0.00023 $0.00411
Sonnet 5 $0.00009 $0.00164
Haiku 4.5 $0.00005 $0.00082

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

Security

Grade A, and why

migration-check 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 7d 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/core/skills/migration-check/SKILL.md · 61 lines

How it starts

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

Purpose

Validate migration safety and schema consistency for the project's PostgreSQL database: check migration SQL files for safety issues and verify alignment between the migration-managed schema, the main app's ORM schema (apps/<mainApp>/src/lib/db/schema.ts), and the Zod/DTO validation types in route handlers. Examples use Flyway-style migrations and Drizzle ORM — adapt to the project's actual tools (project.json -> stack.db).

Rules

  • Discover migration files from disk (ls the migrations directory) — never rely on a static "known migrations" table.
  • Never suggest modifying an already-applied migration — create a new migration instead.
  • Never approve a migration adding NOT NULL without DEFAULT on a table with existing data; large-table indexes need CREATE INDEX CONCURRENTLY.
  • Use "Zod/DTO" terminology in reports, never "Java Entity" (unless the project actually has Java services).
  • Never mix DDL and DML in one migration file.
  • STOP and escalate on: DROP TABLE/TRUNCATE against a production table, an ORM schema missing or 5+ columns out of sync, or a FAILED (partially applied) migration.

Resources

  • Read resources/safety-checks-and-procedure.md when reviewing migrations — the five-step procedure, eight safety checks, inputs/outputs, self-check, escalation, failure modes, related skills.
  • Read resources/worked-examples.md when writing the report — a full safety-review example (with idempotency fix) and the Migration Report template with the alignment table.

How to use

What it does

Reviews database migrations before they cause an incident: checks each SQL file for the things that break deploys (irreversibility, destructive statements, locking index builds, NOT NULL without default, bad naming, missing idempotency guards), then compares what migrations create against the ORM schema and Zod/DTO types. One report covers migration safety and layer drift.

When to use it

  • A new migration file needs a safety verdict before it is applied.
  • You changed the schema and want the ORM definitions confirmed against the SQL.
  • A release checklist calls for a pre-deploy migration review.
  • Not for deploying (the project's infra pack skills), IaC drift (infrastructure-as-code), field-level contract tracing (api-contract), or pod health (troubleshooting).

Read the full file on GitHub · 61 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 61 lines · 45 tokens per session scan A ff71590eb1b2

Subscribe to this mod's changes

migration-check is a skill published in the GitHub repository atretyak1985/swarmery (5 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 821 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

testing-paperclip

Paperclip-Testing-Strategie — Vitest, Plugin-Test-Harness aus @paperclipai/plugin-sdk/testing, echte Postgres-Integration-Tests, Cross-Tenant-Isolation. Verwenden Sie dies beim Schreiben oder Reviewen von Paperclip-Tests.

TheBeardedBearSAS/claude-craft · 57 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

azure-resource-manager-postgresql-dotnet

Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…

microsoft/skills · 97 tokens

azure-cosmos-db-py

Build Azure Cosmos DB NoSQL services with Python/FastAPI following production-grade patterns. Use when implementing database client setup with dual auth (DefaultAzureCredential + emulator), service layer classes with CRUD operations, partition key strategies, parameterized queries, or TDD patterns for Cosmos. Triggers…

microsoft/skills · 96 tokens

azure-postgres-ts

Connect to Azure Database for PostgreSQL Flexible Server from Node.js/TypeScript using the pg (node-postgres) package. Use for PostgreSQL queries, connection pooling, transactions, and Microsoft Entra ID (passwordless) authentication. Triggers: "PostgreSQL", "postgres", "pg client", "node-postgres", "Azure PostgreSQL…

microsoft/skills · 94 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens