kata-schema-design

Design relational or NoSQL database schemas with ER diagrams and constraints.

Updated Sep 3, 2025
One-click install
npx skills add https://github.com/guardiatechnology/design-system --skill kata-schema-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kata-schema-design
Source: https://github.com/guardiatechnology/design-system/tree/main/.claude/skills/kata-schema-design
Command: npx skills add https://github.com/guardiatechnology/design-system --skill kata-schema-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the challenge of designing new database schemas (or evolving existing ones) that are correct, scalable, auditable, and compliant with data retention and PII requirements.

Core Features & Use Cases

  • Entity-Relationship Modeling: Identify entities, value objects, aggregates, and model relationships/cardinalities with clear ER diagrams.
  • DB Technology Decisioning: Choose relational vs. NoSQL based on access patterns, and document non-trivial choices via ADRs.
  • Schema-Quality Guarantees: Define strong types/constraints, justified indexes, and explicit PII classification with retention policies, plus reversible migration strategies.
  • Artifacts & Outputs: Produce a structured schema markdown document, update retention YAML, and reference ADRs when needed.

Quick Start

Use the kata-schema-design skill to create a schema document for a new domain entity or an expansion to an existing model, including indexes, PII classification, retention rules, and (when relevant) an expand-contract migration plan.

Frequently Asked Questions about kata-schema-design

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

FAQPage Schema
How do I design a database schema with PII classification and retention policies?

Designing a database schema with PII classification and retention policies involves defining entities, setting strong constraints, and explicitly tagging sensitive attributes. This approach produces a structured schema document alongside an updated retention YAML file for compliance tracking.

What is the best way to model entity relationships and cardinalities for a transactional database?

Modeling entity relationships for a transactional database requires identifying aggregates and value objects to determine cardinalities. This process generates clear ER diagrams that map data access patterns and ensure transactional correctness across the domain.

How do I plan reversible database migrations for schema expansions?

Planning reversible database migrations for schema expansions requires applying an expand-contract strategy. This approach ensures operational readiness by allowing schema evolution without disrupting existing transactional systems and maintaining rollback capabilities.

When should I choose NoSQL vs relational storage for my data modeling?

Choosing NoSQL vs relational storage depends on your specific data access patterns and transactional requirements. Documenting these non-trivial storage decisions via Architecture Decision Records (ADRs) clarifies the justification for selecting a particular database technology.

How do I define an indexing strategy based on access patterns?

Defining an indexing strategy based on access patterns requires analyzing query paths against your entity relationships. This ensures justified indexes are established within the schema document, optimizing transactional system performance without unnecessary overhead.

Does schema design work for existing domains or only new entities?

Schema design works for both new domain entities and expansions to existing models. It handles schema evolution by updating constraints, refining retention policies, and applying reversible migration strategies to maintain correctness during structural changes.