design
Suggests database engines and data models based on project requirements and access patterns.
Install
mkdir -p .claude/skills/design-hainrixz && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16418" && unzip -o skill.zip -d .claude/skills/design-hainrixz && rm skill.zipInstalls to .claude/skills/design-hainrixz
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Greenfield database design — pick the right engine for a new project, compare it against the boring default, and hand back a starter data model with a diagram. Recommendation mode (module M0); never scored, never destructive. Use when the user is starting fresh and asks what database to use, how to model a new app, which engine fits, or for a schema/data-model from scratch.Key capabilities
- →Recommend a database engine based on project description.
- →Compare the recommended engine against Postgres as a default.
- →Hand back a starter data model with core entities and keys.
- →Draw paradigm-aware diagrams (ERD, access-pattern map, node/edge).
- →Scaffold a reversible first migration in Prisma, Drizzle, or SQL.
- →Offer `/claude-db:seed` for FK-aware seed data generation.
How it works
The skill uses a decision tree to narrow down a database paradigm and concrete engine based on project description, then generates a starter data model and diagram.
Inputs & outputs
When to use design
- →Selecting a database engine
- →Modeling a new app schema
- →Comparing database paradigms
- →Getting a starter data diagram
About this skill
/claude-db:design
Greenfield engine choice + starter model. This is module M0 (engine-selection): a recommendation, not a score — /claude-db:design never produces the two audit scores and never writes to a database.
$ARGUMENTS = a plain-language description of the project (the data, the access patterns, the scale, any constraints). If it's too thin to choose well, ask 2–3 sharp questions first — or hand off to /claude-db:start for the full guided wizard.
What to do
- Walk the M0 decision tree (
references/engine-selection-tree.md; see alsoreferences/detection-signals.mdanddata-tiers.mdfor the paradigm signals): from the access patterns and shape of the data, narrow to a paradigm (relational / document / key-value / wide-column / vector / time-series / graph), then to a concrete engine. - Recommend an engine — and always compare it against the boring default (Postgres for most app workloads). State plainly when the boring default wins (it usually does) and what specific, concrete need would justify reaching for something else. Be honest about lock-in and operational cost; never fabricate prices, latency, throughput, or benchmark numbers — describe trade-offs qualitatively or mark
needs_apiif a real figure is required. - Hand back a starter data model for the recommended engine — core entities, keys (UUIDv7/ULID/bigint as appropriate, never floats for money, timestamptz/UTC), the obvious relationships/embeddings, and the constraints/indexes a sane first migration would include.
- Draw a paradigm-aware diagram with
node scripts/gen-diagram.mjs --file <schema> [--paradigm relational|document|key-value|wide-column|graph](paradigm-aware: ERD for relational, access-pattern map for document, key+GSI sketch for DynamoDB/KV, node/edge for graph).
Format — novice-first, with an expandable technical layer
- Lead with a plain, novice-friendly explanation: which database, in one sentence, and why — no jargon up front.
- Then an expandable technical layer: the DDL/collection spec, index choices, key strategy, and the design-rule rationale (which audit modules each choice satisfies, e.g. M2 keys, M4 types, M11 indexing) for the reader who wants depth.
- Close by offering: "When you have a first schema, run
/claude-db:auditto score it on Design & Integrity and Performance & Scale."
--emit <prisma|drizzle|sql> — scaffold a first migration
After recommending the model (the steps above still run first; --emit never replaces the recommendation), scaffold a reversible first migration for the chosen target:
- Generate the schema in the requested format — a Prisma schema, a Drizzle schema, or raw SQL DDL — for the recommended starter model.
- Hand the scaffold to the db-migration-writer agent (via Task) to write it as a reversible migration (forward + down). The writer reuses
fix's guards: refuse on a dirty git tree (treat no git repo as writable, backups still go to the plugin data dir), dry-run preview by default, and no-secrets (never write.env/credentials/invented connection strings). - For
--emit sqlspecifically, also offer/claude-db:seedto generate FK-aware seed data for the new schema.
Respond in the user's language (EN/ES).
When not to use it
- →When a score or destructive action on a database is required.
- →When the user is not starting fresh with a new project.
- →When the user does not need a database recommendation or starter data model.
Limitations
- →Never fabricates prices, latency, throughput, or benchmark numbers.
- →Does not produce audit scores.
- →Does not write directly to a database.
How it compares
This workflow provides a structured approach to greenfield database design, offering a recommendation and a starter data model with a diagram, unlike manual selection and modeling.
Compared to similar skills
design side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| design (this skill) | 0 | 2mo | Review | Intermediate |
| database-design | 6 | 6mo | Review | Intermediate |
| database-schema-designer | 6 | 6mo | No flags | Intermediate |
| whodb | 1 | 4mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by Hainrixz
View all by Hainrixz →You might also like
database-design
davila7
Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
database-schema-designer
davila7
Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.
whodb
clidey
Database operations including querying, schema exploration, and data analysis. Activates for tasks involving PostgreSQL, MySQL, MariaDB, SQLite, MongoDB, Redis, Elasticsearch, or ClickHouse databases.
schema-designer
clidey
Help design database schemas, create tables, and plan data models. Activates when users ask to create tables, design schemas, or model data relationships.
managing-database-sharding
jeremylongshore
Process use when you need to work with database sharding. This skill provides horizontal sharding strategies with comprehensive guidance and automation. Trigger with phrases like "implement sharding", "shard database", or "distribute data".
database-design
Harmitx7
Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.