hello-data

Enforces database migration, transaction, indexing, and integrity rules for SQL and NoSQL development.

702|99|Updated Sep 26, 2025
One-click install
npx skills add https://github.com/hellowind777/helloagents --skill hello-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hello-data
Source: https://github.com/hellowind777/helloagents/tree/main/skills/hello-data
Command: npx skills add https://github.com/hellowind777/helloagents --skill hello-data

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database code often ships with unversioned schema changes, missing transactions, N+1 queries, and weak constraints that cause data corruption and slow queries in production. This Skill gives the AI a strict checklist of database engineering rules so migrations, transactions, indexes, and integrity constraints are handled correctly before delivery.

Core Features & Use Cases

  • Migration Discipline: Requires all schema changes to go through timestamped, reversible migration files (up + down) validated in staging before production.
  • Transaction & Index Rules: Enforces transactions for multi-table writes, minimal transaction scope, fixed lock ordering to prevent deadlocks, and leftmost-prefix composite indexing.
  • Data Integrity Checks: Mandates foreign keys, NOT NULL with defaults, unique constraints, and a consistent soft-delete vs hard-delete policy.
  • Use Case: When adding a new orders feature with Prisma or TypeORM, the AI will first design the data model and rollback plan, write a reversible migration, wrap multi-table writes in a transaction, and add indexes on query filter columns.

Quick Start

Ask the AI to design the schema and write a reversible migration with proper indexes and transactions for a new orders table using your ORM.

Frequently Asked Questions about hello-data

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

FAQPage Schema
How do I write reversible database migrations?

Every schema change should be a migration file with both up and down paths so it can be rolled back cleanly. Order migration files by timestamp and validate them in a staging environment before running against production.

How to prevent deadlocks in database transactions?

Keep transaction scope as small as possible to avoid long-held locks, and always acquire locks in a fixed, consistent order across code paths. On failure, roll back completely so no half-finished state remains.

Does this work with Prisma, TypeORM, Sequelize, and Mongoose?

Yes, the rules apply to Prisma, Sequelize, TypeORM, and Mongoose as well as raw SQL and NoSQL work. The same principles hold: versioned migrations, transactions for multi-write operations, and indexes on query filter fields.

When should I use composite indexes and column order?

Create indexes on columns used in query conditions, and for composite indexes follow the leftmost prefix rule so the column order matches your query patterns. Avoid over-indexing because every index adds write cost.

Should I use soft delete or hard delete for records?

Choose based on business requirements, but apply the choice consistently across the schema. Whichever approach you pick, enforce integrity with foreign keys, NOT NULL with defaults, and unique constraints to prevent dirty or duplicate data.