create-migration

Generate EF Core migrations after validating Domain entities against PostgreSQL schema.

2|Updated May 2, 2026
One-click install
npx skills add https://github.com/andrecini/dotnet-squad-copilot-agent --skill create-migration-andrecini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-migration
Source: https://github.com/andrecini/dotnet-squad-copilot-agent/tree/main/.claude/skills/create-migration
Command: npx skills add https://github.com/andrecini/dotnet-squad-copilot-agent --skill create-migration-andrecini

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dotnet ef *.

What problem does it solve?

This Skill solves the problem of keeping your EF Core database schema in sync with your Domain and Infrastructure code changes, without risking destructive or unsafe migration operations.

Core Features & Use Cases

  • Scaffold EF Core migrations safely: Generates the correct migration after you add or change Domain entities and EF configurations.
  • Align with real PostgreSQL schema: Inspects the current DB schema to validate table/column names before generating migrations.
  • Apply controlled changes with confirmation: Prevents auto-execution of dotnet ef database update, blocks modification of existing migration files, and requires user confirmation before running commands.

Quick Start

Ask the agent to create a migration for your new entity or for a specific schema change, then confirm the generated dotnet ef migrations add command before it runs.

Frequently Asked Questions about create-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely generate EF Core migrations for PostgreSQL schema changes?

To safely generate EF Core migrations, you update Domain entities and Infrastructure configurations, then the system validates against the current PostgreSQL schema and enforces snake_case naming before scaffolding the migration.

How does EF Core migration generation handle destructive database schema changes?

EF Core migration generation handles destructive changes by blocking column or table removals automatically, requiring explicit double confirmation from the user before proceeding with any potentially unsafe schema alignment operations.

Can I use this to add new entities and columns in a C# 12 clean architecture project?

Yes, you can use this to add new entities and columns in a C# 12 clean architecture project by updating required Domain entities and EF configurations, which then validates BaseEntity and soft-delete rules during migration generation.

What's the best way to align EF Core staging differences with a real PostgreSQL schema?

The best way to align EF Core staging differences is by inspecting the current PostgreSQL schema directly to validate table and column names, ensuring safe migration generation that adheres to your clean architecture rules.

Does generating EF Core migrations automatically apply database updates via dotnet ef?

No, generating EF Core migrations does not automatically apply database updates. The system prevents auto-execution of dotnet ef database update and requires explicit user confirmation before running any commands or modifying existing files.