go-migration-gen

Community

Generate Go migrations from structs

Authorsaddam-eng-tech
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill automates the creation of golang-migrate compatible SQL migration files by translating Go domain structs into SQL schema definitions, ensuring consistency between your application's data models and your database schema.

Core Features & Use Cases

  • Automatic SQL Generation: Creates Up and Down migration SQL statements based on Go struct definitions.
  • Type Mapping: Correctly maps Go types to PostgreSQL data types.
  • Constraint & Index Support: Includes definitions for NOT NULL constraints and indexes as specified in the struct.
  • Soft Delete Column: Automatically adds a soft delete column if configured.
  • Makefile Integration: Updates the Makefile with new migration targets.
  • Use Case: When you define a new User struct in your Go application, use this skill to instantly generate the corresponding CREATE TABLE SQL migration file, including necessary indexes and constraints.

Quick Start

Generate a golang-migrate SQL migration file for the attached Go struct definition.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: go-migration-gen
Download link: https://github.com/saddam-eng-tech/ai-agent-skills/archive/main.zip#go-migration-gen

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.