Skip to content
Back to skills

Database Design

ASecurity

Designs or reviews relational, document, key-value, graph, or search data models with ownership, invariants, access paths, migrations, consistency, retention, privacy, and recovery behavior. Use for schema changes, new data stores, indexes, migrations, persistence boundaries, or query-driven design. Not for a query-only bug without a model change or for API contract design.

  • 95 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 22, 2026
ai-agentsapidatabase

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add thiientv/godmode --skill database-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Database Design?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Database Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thiientv-database-design/badge)](https://www.skillsdirectory.com/skills/thiientv-database-design)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: database-design
description: >-
  Designs or reviews relational, document, key-value, graph, or search data
  models with ownership, invariants, access paths, migrations, consistency,
  retention, privacy, and recovery behavior. Use for schema changes, new data
  stores, indexes, migrations, persistence boundaries, or query-driven design.
  Not for a query-only bug without a model change or for API contract design.
---

# Database Design

Start from invariants and access patterns; a schema is an operational contract.

## Design sequence

1. Identify entities, ownership, lifecycle, source of truth, cardinality, and
   deletion/retention rules.
2. Write invariants and transaction boundaries before choosing tables or
   collections.
3. Map real reads, writes, filters, sorts, joins, uniqueness, and expected
   scale. Add indexes for measured access paths, not guesses.
4. Decide consistency, isolation, idempotency, concurrency, and failure
   recovery at each boundary.
5. Design an expand-migrate-contract migration: backward-compatible expand,
   backfill/dual-write when needed, cutover, verification, and cleanup.
6. Protect sensitive data with least privilege, encryption, minimization,
   auditability, and retention limits.

Read [schema-checklist.md](references/schema-checklist.md). Include rollback,
backup/restore, lock duration, online migration behavior, and observability in
the plan. Treat production data as irreplaceable unless a tested recovery path
proves otherwise.

## Evidence

Use representative query plans, migration rehearsal on a safe fixture, invariant
tests, concurrency checks, and restore evidence. A migration that applies once
is not proven safe to roll forward, retry, or roll back.

## Completion condition

The model's invariants, access paths, migration lifecycle, privacy boundary,
recovery path, and proof commands are explicit.

Files in this skill

  • SKILL.md1.8 KB
  • references/schema-checklist.md646 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…