get-schema

Designs a database schema from an approved PRD as a Markdown document with tables, relationships, indexes, and constraints.

665|3|Updated Sep 12, 2026
One-click install
npx skills add https://github.com/rizqinrr/viserys-agent --skill get-schema-rizqinrr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: get-schema
Source: https://github.com/rizqinrr/viserys-agent/tree/main/skills/get-schema
Command: npx skills add https://github.com/rizqinrr/viserys-agent --skill get-schema-rizqinrr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? A PRD describes product behavior, not tables, so data modeling decisions often get made implicitly by whoever writes the first migration. This Skill turns an approved PRD into an explicit, reviewed database schema document before any implementation begins. ## Core Features & Use Cases - Entity Derivation: Extracts entities from PRD user stories and objectives, ensuring every table traces to actual product behavior rather than guesswork. - Full Schema Design: Defines columns with engine-specific types, relationships with cardinality and on-delete behavior, indexes tied to named queries, and enforceable constraints. - User Review Gate: Presents the model for explicit approval before writing anything, then saves the result to docs/schema/<name>.md as Markdown, not SQL DDL. - Use Case: You have an approved PRD for an experiment-tracking feature and need the data model designed and documented before breaking the work into implementation tasks. ## Quick Start Use the get-schema skill to design the database schema from the PRD at docs/prd/experiment-tracker.md and write it to docs/schema/.

Frequently Asked Questions about get-schema

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

FAQPage Schema
How do I design a database schema from a PRD?

Read the PRD's user stories and objectives to derive the entities the product persists, then define columns, relationships, indexes, and constraints for each. This Skill runs that as an eight-phase process and writes the result to docs/schema/<name>.md.

How to choose a database engine for a new project?

If the PRD names an engine, use it; otherwise ask the user with a recommendation tied to the product's actual needs, such as JSONB support for variable payloads. The Skill records the chosen engine and the reason at the top of the schema document.

Does this skill generate SQL migrations or DDL?

No. The output is a Markdown document describing modeling intent, not SQL DDL, because DDL goes stale when an ORM is chosen or migrations are refactored. Migrations are written separately during implementation.

When should I not use a schema design workflow?

Skip it when no PRD or spec exists, when the schema already exists and only needs a small column added, or when the change is a single table with no relationships or ambiguity. Deriving tables from an unwritten product is guessing.

Why must every foreign key declare on-delete behavior?

Omitting on-delete behavior means accepting the database's default, which can silently delete related data through cascades. The Skill requires every foreign key to declare cascade, restrict, set null, or no action explicitly.