AI Skills Catalog
Skills pack Tools

Database Designer

Review schema structure, relate index recommendations to query patterns and draft migration SQL. Includes local analyzers and sample inputs; production changes still require database testing.
SKILL SCORE88How it is scored
VerifiedFreeMIT

Works with

Packaged from the source skill for Claude, Codex and 4 more.

About this skill

Database Designer combines a schema review with query-driven index suggestions and migration generation. It works from supplied SQL DDL or structured schema files and query-pattern data, so the useful starting point is an explicit model of tables, relationships and important reads and writes.

Use this skill when

  • A new relational schema needs a review of naming, constraints and relationship structure.
  • An existing database has known query patterns and the team needs candidate indexes to investigate.
  • Current and target schema definitions need to be compared before planning an application-compatible change.

What it can do

The packaged tools analyze schema definitions, produce a Mermaid relationship view, look for index gaps or overlaps and generate migration output. References cover normalization, database selection and index trade-offs. The workflow checks the target model again after proposed fixes.

File-based recommendations cannot replace workload statistics, execution plans or the behavior of a particular database version. Generated SQL and rollback steps are drafts: inspect dialect support, lock behavior, data volume and application dependencies, then test with realistic data. An expand-contract option does not by itself guarantee uninterrupted service.

Typical workflows

  1. Review the model: provide DDL or schema JSON and business invariants, inspect the analyzer findings and compare the relationship diagram with the intended model.
  2. Investigate indexing: supply frequent query shapes and existing indexes, review proposed additions or removals and validate the promising candidates against actual query plans.
  3. Prepare a change: compare current and target schemas, draft the migration, and check constraints, compatibility and rollback limits in staging before deployment.

What is inside the skill

Section headings from the original SKILL.md (about 1,439 words of instructions). Read the full text in the source repository before installing.

  1. Overview
  2. Core Competencies
  3. Schema Design & Analysis
  4. Index Optimization
  5. Migration Management
  6. Tool Workflow (run these — do not analyze schemas by hand)
  7. 1. Analyze the schema
  8. 2. Optimize indexes against real query patterns
  9. 3. Generate the migration
  10. 4. Verification loop
  11. Database Design Principles
  12. Best Practices
  13. Schema Design
  14. Performance Optimization
  15. Security Considerations
  16. Query Generation Patterns
  17. SELECT with JOINs
  18. Common Table Expressions (CTEs)
  19. Window Functions
  20. Aggregation Patterns
  21. Migration Patterns
  22. Up/Down Migration Scripts
  23. Zero-Downtime Migrations (Expand/Contract)
  24. Data Backfill Strategies

Bundled files

  • README.md
  • assets/sample_query_patterns.json
  • assets/sample_schema.json
  • assets/sample_schema.sql
  • expected_outputs/index_optimization_sample.txt
  • expected_outputs/migration_sample.txt
  • expected_outputs/schema_analysis_sample.txt
  • index_optimizer.py
  • migration_generator.py
  • references/database-design-reference.md
  • references/database_selection_decision_tree.md
  • references/index_strategy_patterns.md
  • references/normalization_guide.md
  • schema_analyzer.py
  • LICENSE

Example prompts

  • Review this order-management schema and its business invariants. Identify missing relationship constraints and ambiguous nullability, then produce a Mermaid ERD and a prioritized set of changes.
  • Use these query patterns and existing indexes to suggest candidates for investigation. Explain the read benefit and write overhead of each suggestion, and list the execution-plan evidence needed before applying it.
  • Draft an expand-contract migration from these current and target schema files. Separate schema changes from backfill and application rollout, flag potentially irreversible steps, and give staging validation checks without executing SQL.

How to install Database Designer

Claude Packaged
  1. Download the Claude package from the skill page. The ZIP contains one folder named after the skill, with SKILL.md and any bundled reference files.
  2. For Claude Code, unpack the folder into ~/.claude/skills/ to use it in every project, or into .claude/skills/ inside a repository to share it with your team.
  3. For Claude apps, upload the ZIP in the Skills section of the capabilities settings.
  4. Start a new session and describe the task in your own words. Claude picks the skill when the request matches its description.
More about skills for Claude
Codex Packaged
  1. Download the Codex package. The ZIP contains one folder named after the skill, with SKILL.md and bundled resources.
  2. Unpack the complete folder into .agents/skills/ inside your repository, or into ~/.agents/skills/ for personal use. Preserve its relative reference-file paths.
  3. Start a new Codex session and invoke the skill by name or with $skill-name, or describe a matching task.
  4. AGENTS.md is separate project guidance. The ZIP does not generate or modify that file.
More about skills for Codex
GPT Packaged
  1. Download the GPT package from the skill page.
  2. Create or edit a custom GPT (or a ChatGPT project) and paste the contents of SKILL.md into the instructions field.
  3. Upload the bundled reference files as knowledge so the GPT can consult them.
  4. Test with one of the example prompts from the skill page and adjust the instructions if your use case differs.
More about skills for GPT
Gemini Packaged
  1. Download the Gemini package from the skill page.
  2. For a project, unpack the complete folder into .gemini/skills/ or .agents/skills/. For personal use, use ~/.gemini/skills/ or ~/.agents/skills/.
  3. Run /skills reload in Gemini CLI, then /skills list to check discovery. There is no need to paste the skill into GEMINI.md.
  4. Test a matching task and verify the referenced tools and files are available.
More about skills for Gemini
Cursor Packaged
  1. Download the Cursor package from the skill page.
  2. Unpack the complete skill folder into .cursor/skills/ or .agents/skills/ in your project. For personal local use, ~/.cursor/skills/ and ~/.agents/skills/ are also supported.
  3. Start a new Cursor session. Type / in Agent chat and select the skill name, or describe a matching task.
  4. Commit the skill folder and resources for team use. Personal local skills are not automatically available to remote agents or automation runs.
More about skills for Cursor
OpenCode Packaged
  1. Download the OpenCode package from the skill page.
  2. Unpack the complete folder into .opencode/skills/ in your project, or ~/.config/opencode/skills/ for personal use. OpenCode also supports .agents/skills/ and .claude/skills/ compatibility locations.
  3. Keep supporting files at their original relative paths. AGENTS.md is separate project-wide guidance and is not generated by this ZIP.
  4. Start OpenCode in the project and test a matching task with the model and permissions you use.
More about skills for OpenCode

Permissions & security

Low risk

Inspect the source, license and declared permissions before use. Read the scripts before running them. Review method

Read project files
Write generated skill files

Database Designer FAQ

What does the Database Designer skill do?

Review schema structure, relate index recommendations to query patterns and draft migration SQL. Includes local analyzers and sample inputs; production changes still require database testing.

Which AI agents can use Database Designer?

Packages for Claude, Codex and 4 more are built from the same source instructions.

How do I install Database Designer in Claude?

Download the Claude package from the skill page. The ZIP contains one folder named after the skill, with SKILL.md and any bundled reference files. For Claude Code, unpack the folder into ~/.claude/skills/ to use it in every project, or into .claude/skills/ inside a repository to share it with your team.

Who made Database Designer and what is the license?

Database Designer is published by Alireza Rezvani under the MIT license. The source is https://github.com/alirezarezvani/claude-skills/tree/main/engineering/skills/database-designer. The catalog keeps the original attribution.

What permissions does Database Designer need?

Declared permissions: read project files, write generated skill files. Risk level: low. Check the scripts in the source before running them.

Database Designer Skill — Alireza Rezvani | AI Skills Catalog