database-designer · borghei — Claude Code skill: schema analysis and setup
The database-designer skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode reviews SQL schemas, suggests indexes, and creates migrations. Use it for DDL reviews, index tuning, or schema diffs.
LicenseRef-MIT-Commons-Clause 176 installs ★ 1,183 updated 2026-11-08
npx skills add borghei/Claude-Skills --skill database-designer -a claude-codeWhat database-designer does
The skill includes three Python scripts: a schema analyzer, an index optimizer, and a migration generator. They work with DDL or JSON schemas; index suggestions also need query patterns.
The analyzer checks normalization, constraints, naming, and data types, and can produce a Mermaid ERD. The optimizer proposes single-column, composite, and covering indexes, while flagging overlap and redundancy. The migration tool compares two JSON schemas and outputs ordered forward and rollback SQL steps, risk levels, and validation queries.
Index suggestions depend on the supplied query patterns, so test each one with EXPLAIN on real data. The migration generator has a --zero-downtime mode for large or busy tables, but drops and type changes still call for careful review.
What it helps with
- spot normalization and constraint issues in an SQL schema
- choose indexes for known query patterns
- find redundant or overlapping indexes
- turn a schema diff into SQL with rollback steps
- generate a Mermaid ERD from DDL or JSON
Example prompts for the agent
- Review
schema.sqlfor normalization and missing constraints. - Suggest indexes for
schema.jsonusing the patterns inqueries.json. - Compare
old.jsonwithnew.jsonand create SQL with rollback and validation steps.
How to install database-designer
1Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-designer -a claude-code2Manually: put the files in place
~/.claude/skills/database-designer/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/database-designer/
1Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-designer -a codex2Manually: put the files in place
.agents/skills/database-designer/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-designer -a cursor2Manually: put the files in place
.cursor/skills/database-designer/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install borghei/Claude-Skills engineering/database-designer/SKILL.md2Manually: put the files in place
.github/skills/database-designer/SKILL.md1Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-designer -a gemini-cli2Platform CLI
gemini skills install https://github.com/borghei/Claude-Skills --path engineering/database-designerManually: put the files in place
.devin/skills/database-designer/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add borghei/Claude-Skills --skill database-designer -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about database-designer
How do I install database-designer in Claude Code?
Run npx skills add borghei/Claude-Skills --skill database-designer -a claude-code. The skill file is at ~/.claude/skills/database-designer/SKILL.md.
What does database-designer do?
It reviews existing SQL schemas, recommends indexes based on query patterns, and creates migrations between schema versions with rollback SQL.
What does the index optimizer need?
Give it a JSON schema and the query patterns to optimize for. Test its suggestions with EXPLAIN against real data.
Similar skills
All skills for Data and databases →database-designer by other authors comes first.