/engineering-advanced-skills:database-schema-designerfrom engineering-advanced-skills
Designs relational schemas from product requirements: tables, ORM models, RLS, indexes, migrations, and ERDs. Supports PostgreSQL/MySQL/SQLite with Drizzle, Prisma, TypeORM, or Alembic.
Ships in engineering-advanced-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The agent turns product requirements into a normalized relational schema with the cross-cutting columns, constraints, Row-Level Security, indexes, migrations and generated types the application needs, for PostgreSQL, MySQL or SQLite with Drizzle, Prisma, TypeORM or Alembic.
engineering/database-designer)Before designing the schema, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
id, created_at, updated_at, and where required deleted_at, organization_id, version.
uuid type, or CUID2 where IDs are generated in the app. PostgreSQL 18+ can generate UUIDv7 with uuidv7(). Use integer identity keys only for internal tables whose IDs never leave the database.references/schema-design-and-security.md).schema_validator.py and fix every error; then render the ERD with erd_generator.py and check that it matches the requirements.migration_diffr.py, review the forward and rollback SQL, and use the zero-downtime patterns in references/indexes-and-migrations.md for large tables.python3 scripts/schema_validator.py assets/sample_schema_v1.sql # warnings only (exit 0)
python3 scripts/schema_validator.py assets/sample_schema_v2.sql # new table without FK indexes (exit 1)
python3 scripts/migration_diffr.py assets/sample_schema_v1.sql assets/sample_schema_v2.sql # forward + rollback SQL
python3 scripts/erd_generator.py assets/sample_schema_v2.sql # Mermaid ERD
| Tool | What it does | Key flags | Exit codes |
|---|---|---|---|
scripts/schema_validator.py <file.sql> | Missing PK, sequential PK, FK without index, nullable FK, missing timestamps, soft deletes without a partial index, tables with no index, naming | --json, --strict (warnings fail too) | 0 clean, 1 errors (or warnings with --strict), 2 bad input |
scripts/migration_diffr.py <old.sql> <new.sql> | Added/removed tables and columns, type and nullability changes, index changes, with rollback | --json, --no-rollback, -o <file> | 0 no differences, 1 differences found, 2 bad input |
scripts/erd_generator.py <file.sql> | Mermaid erDiagram with PK/FK markers and a table summary | -o <file.mmd>, --json | 0, 2 bad input |
Mistake: Exposing sequential integer IDs in URLs and APIs.
Why it happens: SERIAL is the default in most tutorials.
Instead: Use UUIDv7 or CUID2 for anything that leaves the database; sequential IDs leak volume and invite enumeration.
Mistake: Multi-tenant tables that rely on the application to filter by tenant.
Why it happens: A WHERE organization_id = ? in the repository layer feels sufficient.
Instead: Add RLS policies keyed on the tenant column so a missed filter returns nothing instead of another tenant's rows.
Mistake: Foreign keys without an index.
Why it happens: PostgreSQL does not create one automatically.
Instead: Index every FK column; joins and cascading deletes scan the child table otherwise. schema_validator.py reports each one.
scripts/schema_validator.py, scripts/migration_diffr.py, scripts/erd_generator.py — the tools above.assets/sample_schema_v1.sql and assets/sample_schema_v2.sql — two versions of a small multi-tenant schema (v2 adds soft deletes, due dates and a comments table without FK indexes).Load the reference that matches the task — keep this file lean and pull detail on demand:
This skill covers:
This skill does NOT cover:
senior-data-engineer for broader data store guidanceperformance-profiler for runtime profilingsenior-cloud-architect for cloud database setupsenior-backend for backend architecture decisionsRelated skills: engineering/database-designer (analysis and index tuning of existing schemas), engineering/migration-architect (cross-service rollout), engineering/api-design-reviewer (API resources from the schema).
assets/sample_schema_v1.sql (opens in a new tab)assets/sample_schema_v2.sql (opens in a new tab)references/best-practices-and-troubleshooting.md (opens in a new tab)references/indexes-and-migrations.md (opens in a new tab)references/schema-design-and-security.md (opens in a new tab)scripts/erd_generator.py (opens in a new tab)scripts/migration_diffr.py (opens in a new tab)scripts/schema_validator.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
PostgreSQL, MySQL, SQLite, Prisma, Drizzle, SQLAlchemy, TypeORM
schema-design, normalization, erd, row-level-security, migrations
npx claudepluginhub borghei/claude-skills --plugin engineering-advanced-skills100 skills in this plugin
/a11y-auditStatic WCAG scan of HTML files (alt text, headings, labels, ARIA, lang, landmarks) and colour contrast checks for colour pairs or CSS. Use when auditing templates for accessibility, checking contrast, or adding an a11y gate to CI.
/agent-designerDesigns multi-agent system architectures with orchestration patterns, tool schemas, and performance evaluation. Use when building AI agent systems, designing agent workflows, creating tool schemas, or evaluating agent performance.
/agent-harnessTest and evaluation harness for AI agents — scenario suites, deterministic replay, regression diffing, cost and latency budgets. Use when agent quality is vibe-checked, before shipping a prompt or model change, or when evals drift.
2 plugins ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job