setup-database

Detect the ORM and generate reviewed migration steps for database schema changes.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/jnlanahan/Product-Agents-and-Skills --skill setup-database-jnlanahan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-database
Source: https://github.com/jnlanahan/Product-Agents-and-Skills/tree/main/skills/4-Build-Database
Command: npx skills add https://github.com/jnlanahan/Product-Agents-and-Skills --skill setup-database-jnlanahan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you set up a database and apply schema changes without breaking your app or accidentally running destructive migrations.

Core Features & Use Cases

  • First-time database setup: Wire up your connection string, ORM, and migration system (with safe defaults).
  • Schema evolution via migrations: Add tables, columns, indexes, constraints, and seed data by generating and reviewing migrations.
  • Broken migration recovery: Diagnose migration state by inspecting migration history and explaining next steps.
  • Safety guardrails: Prevent destructive operations from running without explicit confirmation, and always show generated SQL before applying it.

Quick Start

Ask the assistant to set up your database for migrations by running setup-database for a new project that needs a Neon Postgres connection and Drizzle migrations.

Frequently Asked Questions about setup-database

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

FAQPage Schema
How do I set up Drizzle migrations with a Neon Postgres database?

To set up Drizzle migrations with Neon Postgres, wire your DATABASE_URL connection string into your environment, configure the Drizzle ORM, and generate initial migration scripts with safe defaults. You then review the generated SQL before applying any schema changes.

What is the safest way to add columns and indexes to an existing database schema?

The safest way to add columns and indexes is generating a schema migration that explicitly shows the SQL for review. You must confirm any destructive operations before execution, ensuring the ORM conventions verify changes through checks and studio visibility.

How do I fix a broken database migration sequence?

To fix a broken database migration, diagnose the migration state by inspecting your migration history. The system analyzes the sequence to explain what failed and outlines the exact next steps required to recover your schema safely.

Can I use raw SQL for schema migrations instead of an ORM?

Yes, you can use raw SQL for schema migrations. The system detects your ORM and supports Drizzle, Prisma, Kysely, and raw SQL conventions, generating reviewed migration steps that require explicit confirmation before running destructive operations.

Why does my database setup require SQL review before applying migrations?

Database setup requires SQL review to prevent destructive operations from breaking your application. Showing generated SQL before applying migrations ensures you explicitly confirm schema additions, changes, and constraint drops, maintaining migration safety.