Claude Code Database Schema Designer for PostgreSQL Constraints
Describe entities, relationships, and frequent queries to get a proposed schema, constraints, and indexes. Use it to design new tables or review an existing model.
中文Install in Claude Code
Use Claude Code with the pinned skill directory. Bring the database engine, entity relationships, and concrete query patterns. Validate SQL against a local test database.
- Get the complete `cli-tool/components/skills/development/database-schema-designer` directory from the pinned GitHub checkout.
- Copy it into the target project's `.claude/skills/` directory. Confirm `.claude/skills/database-schema-designer/SKILL.md`, open Claude Code at the project root, and call `/database-schema-designer`.
Example task
Design catalog, copy, and loan tables for a fictional library in PostgreSQL. The main query finds recent loans for one copy. Ask for the two relationships and an index that fits the query.What to check
Expect three tables with primary keys, two foreign keys, and a reason for the query index. A test should reject a loan pointing to a nonexistent copy.
Original SKILL.md on GitHub · Updated
Frequently asked question
What information helps the skill choose useful indexes?
Supply the filters, joins, sort order, and query frequency. The proposal can then tie each index to an access pattern and explain composite column order.