tpo-database-design-rules

Defines database design rules, templates, and review checklists for technical product owners.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TECH-HY/SKILLS --skill tpo-database-design-rules-tech-hy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tpo-database-design-rules
Source: https://github.com/TECH-HY/SKILLS/tree/main/skills/tpo-database-design-rules
Command: npx skills add https://github.com/TECH-HY/SKILLS --skill tpo-database-design-rules-tech-hy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing a database without clear rules leads to inconsistent naming, missing constraints, unsafe migrations, and unprotected sensitive data. This Skill gives a Technical Product Owner Agent a complete rulebook for planning, reviewing, and approving database schemas. ## Core Features & Use Cases - Entity and Schema Templates: Provides ready-to-use templates for entity definitions, data model planning, and relationship documentation. - Design Rules: Covers naming conventions, primary keys, foreign keys, constraints, indexing, and delete behavior. - Migration Safety Checklist: Enforces reversible, tested, production-safe migrations with rollback plans. - Privacy and Audit Rules: Defines sensitivity classification, retention, and audit log requirements for sensitive fields. - Use Case: When planning a new SaaS product, use this Skill to produce a complete database design document with entities, relationships, indexes, migrations, and a review checklist that an AI Developer Agent can implement without guessing. ## Quick Start Ask the agent to design the database schema for your product using the database design rules, including entities, relationships, indexes, and a migration plan.

Frequently Asked Questions about tpo-database-design-rules

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

FAQPage Schema
How do I design a database schema for a new product?

Start by identifying product entities such as User, Organization, and Project, then define ownership, lifecycle states, relationships, and sensitivity for each. Use the entity design template and data model planning template to document tables, indexes, migrations, and query patterns.

What naming conventions should database tables and columns use?

Use plural snake_case for tables like users or project_members, snake_case for columns like created_at, id as the primary key, and [entity]_id for foreign keys. Pick one naming style and apply it consistently across the schema.

How do I make database migrations safe for production?

Every schema change must be a version-controlled, reviewed, and reversible migration. Before approval, verify it runs on production-sized data, avoids locking critical tables, backfills new not-null fields, has a rollback plan, and is tested in staging.

When should I use foreign keys versus application-level validation?

Use foreign keys in relational databases to protect referential integrity, since application validation can be bypassed by bugs or scripts. Always define explicit delete behavior such as RESTRICT, CASCADE, SET NULL, or soft delete.

What are common database design mistakes to avoid?

Reject designs that store everything in JSON without reason, lack foreign keys for critical relationships, guess indexes without query patterns, leave deletes undefined, or skip audit logs for sensitive actions. Sensitive data must always have access-control and retention rules.