create-migration

Generate an EF Core migration for a HearthPortal extension after a pre-flight diff check.

1|1|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/lithiumtoast/hearthportal --skill create-migration-lithiumtoast
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-migration
Source: https://github.com/lithiumtoast/hearthportal/tree/main/.claude/skills/create-migration
Command: npx skills add https://github.com/lithiumtoast/hearthportal --skill create-migration-lithiumtoast

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate an EF Core migration for a HearthPortal extension's DbContext after verifying the model has actually changed. Wraps src/bash/create-migration.sh with a pre-flight diff check that catches the empty-migration footgun.

Core Features & Use Cases

  • One migration per extension invocation.
  • Pre-flight diff check to ensure changes exist before generating.
  • Gate for empty migrations to avoid empty results.
  • Propose a descriptive migration name and show the diff.
  • Execute a helper script to generate and place migrations under Data/Migrations.
  • Hand off with instructions to review Up/Down and avoid auto-commit.

Quick Start

Run the create-migration skill for a HearthPortal extension to generate a new EF Core migration only when the model has changed.

Frequently Asked Questions about create-migration

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

FAQPage Schema
How do I prevent empty EF Core migrations when generating database changes?

A pre-flight diff check validates the DbContext model for actual changes before generating an EF Core migration, ensuring no empty migration files are created when the schema has not changed.

How do I generate an EF Core migration for a specific extension?

Invoke the skill targeting a single extension to generate an EF Core migration, which proposes a descriptive name, shows the model diff, and executes a helper script to place files under Data/Migrations.

Why does my EF Core migration have no changes?

Your EF Core migration has no changes because the underlying DbContext model has not been modified since the last migration, which the pre-flight diff check detects to gate and prevent empty migration generation.

What should I do after generating an EF Core migration?

After generating an EF Core migration, review the Up and Down methods to verify schema changes and avoid auto-committing the generated files until the manual review is complete.

Does this migration tool work with multiple extensions at once?

No, this migration tool does not work with multiple extensions at once; it strictly generates one EF Core migration for a single HearthPortal extension per invocation to ensure precise schema tracking.