data-model

Generate SQL database migrations from data model specifications.

89|32|Updated May 28, 2026
One-click install
npx skills add https://github.com/genkovich/sdd --skill data-model-genkovich
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-model
Source: https://github.com/genkovich/sdd/tree/main/skills/data-model
Command: npx skills add https://github.com/genkovich/sdd --skill data-model-genkovich

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides an end-to-end solution for designing data models and generating forward and rollback migrations in a single pass, ensuring shippable SQL code.

Core Features & Use Cases

  • End-to-End Workflow: Design the data model and generate migrations for SQL databases.
  • Greenfield & Brownfield Support: Suitable for both new projects and existing databases.
  • Stack-Agnostic: Detects and follows the repository's database and migration conventions without imposing any specific DB philosophy.
  • Security & Safety: Applies migration safety principles, including staging, reversibility, and zero-downtime decomposition.

Quick Start

To generate data model and migrations for a feature with the slug 'new_feature', run: /sdd:data-model new_feature.

Frequently Asked Questions about data-model

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

FAQPage Schema
How do I generate SQL database migrations from a data model specification?▼

Yes, you can generate migrations for existing databases. The tool supports brownfield projects by detecting and following your repository's current database and migration naming conventions automatically.

What files do I need to provide for data modeling and migration generation?▼

You need spec.md and sad.md files for entity and persistence definitions, plus an architecture-map.md file detailing your migration tool and naming conventions to generate accurate SQL migrations.

Does the generated SQL migration include rollback scripts for zero-downtime deployment?▼

Yes, the generated SQL migration includes rollback scripts. It applies migration safety principles like staging, reversibility, and zero-downtime decomposition to ensure secure and shippable database code.

Can I use this approach for both greenfield and brownfield database projects?▼

Yes, this approach works for both greenfield and brownfield database projects. It is stack-agnostic, meaning it detects your existing repository's database conventions rather than imposing a specific DB philosophy.

How does specification-driven data modeling handle existing repository conventions?▼

Specification-driven data modeling handles existing repository conventions by referencing the architecture-map.md file. It aligns generated migrations with your established migration tool and naming conventions without enforcing external standards.