db

Define schemas, run type-safe queries, and manage migrations with Drizzle ORM and Neon Postgres.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/echarabati/adi-capital-admin --skill db-echarabati
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db
Source: https://github.com/echarabati/adi-capital-admin/tree/main/.agent/skills/domains/db
Command: npx skills add https://github.com/echarabati/adi-capital-admin --skill db-echarabati

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines database interactions by providing clear guidelines and helpers for defining schemas, writing queries, and managing migrations, ensuring data integrity and efficient development.

Core Features & Use Cases

  • Schema Definition: Define database tables, relationships, and enums using Drizzle ORM.
  • Querying & Mutations: Write type-safe queries for selecting, inserting, updating, and deleting data.
  • Migrations: Generate and apply database schema changes.
  • Use Case: When developing a new feature that requires storing user profiles, use this Skill to define the users table with audit fields and create a server action to insert new users.

Quick Start

Use the db skill to create a new user in the database with the provided email and name.

Frequently Asked Questions about db

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

FAQPage Schema
How do I define a database schema with audit fields and soft deletes using Drizzle ORM?

To define a database schema with audit fields and soft deletes, use Drizzle ORM to structure your tables with specific audit columns, dual IDs, enums, and relationship mappings, which ensures data integrity and clear schema boundaries.

What is the best way to manage type-safe queries and pagination in Postgres?

The best way to manage type-safe queries and pagination in Postgres is by using an ORM like Drizzle to structure efficient querying patterns, including joins and transactional mutations, ensuring data consistency.

How do I generate and apply database migrations for a Neon Postgres schema?

You generate and apply database migrations for a Neon Postgres schema by running dedicated workflow commands that translate your Drizzle ORM schema definitions into applied database changes.

Can I use Drizzle ORM to handle relationships and enums in my Postgres database?

Yes, you can use Drizzle ORM to handle relationships and enums in your Postgres database, allowing you to define structured table relations and enumerated types for strict data validation.

How do database transactions work when inserting or updating data with Drizzle ORM?

Database transactions work by grouping multiple insert or update mutations into a single atomic operation, ensuring that all changes apply successfully or roll back entirely to maintain data integrity.

When do I need to add indexes for query performance optimization in Postgres?

You need to add indexes for query performance optimization in Postgres when your querying patterns involve large datasets, complex joins, or specific filtering that would benefit from faster data retrieval.