managing-azure-sql-migrations

managing-azure-sql-migrations is a skill for Claude Code from alexpizarro/azure-lean-stack-skills. It costs 129 tokens per session (1,246 once invoked), scanned B, original, MIT.

A system for applying database changes to Azure SQL, Microsoft's cloud database service, in numbered order during deployments. It records which changes have already run so repeating a deployment is safe.

In plain words
What is it for?
Use it to add migrations, set up migrations in a project, or investigate CI failures related to Azure SQL changes.
Why use it?
It prevents deployment scripts from applying the same table or data changes repeatedly. It also handles running the SQL command-line tool in GitHub Actions, a service that automates tasks when code changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the azure-lean-stack-skills plugin — 16 skills shipped together

Good fit Use it to add migrations, set up migrations in a project, or investigate CI failures related to Azure SQL changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexpizarro/azure-lean-stack-skills/managing-azure-sql-migrations
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 alexpizarro/azure-lean-stack-skills --skill managing-azure-sql-migrations
Clone the repo
git clone --depth 1 https://github.com/alexpizarro/azure-lean-stack-skills

Made for: Claude Code.

Or install azure-lean-stack-skills, the plugin that ships this one along with the rest of its 16 skills.

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 managing-azure-sql-migrations

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexpizarro/azure-lean-stack-skills/managing-azure-sql-migrations/github.svg)](https://agentmods.dev/skills/alexpizarro/azure-lean-stack-skills/managing-azure-sql-migrations)
Your own site
<a href="https://agentmods.dev/skills/alexpizarro/azure-lean-stack-skills/managing-azure-sql-migrations"><img src="https://agentmods.dev/badge/skills/alexpizarro/azure-lean-stack-skills/managing-azure-sql-migrations/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 managing-azure-sql-migrations

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexpizarro/azure-lean-stack-skills/managing-azure-sql-migrations"><img src="https://agentmods.dev/badge/skills/alexpizarro/azure-lean-stack-skills/managing-azure-sql-migrations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00129 $0.01246
Opus 5 $0.00064 $0.00623
Sonnet 5 $0.00026 $0.00249
Haiku 4.5 $0.00013 $0.00125

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

Security

Grade B, and why

managing-azure-sql-migrations scanned grade B with 2 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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/install-sqlcmd.sh, scripts/run-migrations.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| Pipe through `sudo tee` | Don't use `sudo gpg -o /path` — permission issues |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

MY_IP=$(curl -s https://api.ipify.org)
skills/managing-azure-sql-migrations/SKILL.md · 114 lines

How it starts

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

Managing Azure SQL Migrations

Idempotent, roll-forward SQL migrations run on every deploy via sqlcmd. The migration system uses a __MigrationHistory table for tracking, guard-clause migrations to make every run safe, and a workflow step that handles the operational quirks of running sqlcmd on ubuntu-24.04 in GitHub Actions.

When to invoke

  • Adding a new migration file
  • Bootstrapping the migration system on a new project
  • Fixing a CI failure related to SQL migrations

File naming

infra/sql/migrations/
├── 000_migration_history.sql       # tracking table — always runs first
├── 001_create_items_table.sql      # initial schema (pre-tracking guard ok)
├── 002_add_user_id_to_items.sql    # guarded by __MigrationHistory
├── 003_seed_demo_data.sql          # also guarded
└── ...

Pattern: {NNN}_{snake_case_description}.sql. Zero-padded, alphabetical order = execution order.

Guard clause template

Every migration from 002 onward MUST use this pattern:

IF NOT EXISTS (
    SELECT 1 FROM dbo.__MigrationHistory WHERE MigrationId = 'NNN_describe_change'
)
BEGIN
    -- DDL here (CREATE TABLE, ALTER TABLE, INSERT, MERGE, etc.)

    INSERT INTO dbo.__MigrationHistory (MigrationId) VALUES ('NNN_describe_change');
    PRINT 'Migration NNN_describe_change applied.';
END
ELSE
BEGIN
    PRINT 'Migration NNN_describe_change already applied — skipping.';
END

The exception is 001_create_items_table.sql, which uses IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'Items') because Items may have been deployed before tracking existed.

The tracking table

000_migration_history.sql creates __MigrationHistory. Idempotent — safe to re-run:

IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = '__MigrationHistory')
BEGIN
    CREATE TABLE dbo.__MigrationHistory (
        MigrationId NVARCHAR(200) NOT NULL PRIMARY KEY,
        AppliedAt   DATETIME2     NOT NULL DEFAULT GETUTCDATE()
    );
END

See templates/000_migration_history.sql and templates/001_create_items_table.sql.

Read the full file on GitHub · 114 lines

Files

What ships with it

4 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. 10d ago First seen · 114 lines · 129 tokens per session scan B c71e3fb4d96f

Subscribe to this mod's changes

managing-azure-sql-migrations is a skill published in the GitHub repository alexpizarro/azure-lean-stack-skills (1 stars, last pushed 1mo ago), licensed MIT. It adds 129 tokens to every session and 1,246 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

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-mgmt-mongodbatlas-dotnet

Manage MongoDB Atlas Organizations as Azure ARM resources using Azure.ResourceManager.MongoDBAtlas SDK. Use when creating, updating, listing, or deleting MongoDB Atlas organizations through Azure Marketplace integration. This SDK manages the Azure-side organization resource, not Atlas clusters/databases directly.

microsoft/skills · 64 tokens

azure-resource-manager-mysql-dotnet

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

microsoft/skills · 87 tokens

azure-resource-manager-redis-dotnet

Azure Resource Manager SDK for Redis in .NET. Use for MANAGEMENT PLANE operations: creating/managing Azure Cache for Redis instances, firewall rules, access keys, patch schedules, linked servers (geo-replication), and private endpoints via Azure Resource Manager. NOT for data plane operations (get/set keys, pub/sub) …

microsoft/skills · 114 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-cosmos-ts

Azure Cosmos DB JavaScript/TypeScript SDK (@azure/cosmos) for data plane operations. Use for CRUD operations on documents, queries, bulk operations, and container management. Triggers: "Cosmos DB", "@azure/cosmos", "CosmosClient", "document CRUD", "NoSQL queries", "bulk operations", "partition key", "container.items".

microsoft/skills · 79 tokens