xiaowen-jiang/agent-enterprise/database-schema-design

Claude Code and agent skill by xiaowen-jiang/agent-enterprise

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Design normalized database schemas with tables, relationships, indexes, and migrations

Install

npx vskill@latest install xiaowen-jiang/agent-enterprise/database-schema-design

SKILL.md

Process

  1. Identify entities — Map domain objects to tables (users, orders, products, etc.)
  2. Define relationships — One-to-one, one-to-many, many-to-many
  3. Normalize to 3NF — Eliminate redundancy, ensure each fact is stored once
  4. Choose primary keys — UUID vs auto-increment, composite keys when needed
  5. Design indexes — Based on query patterns (WHERE, JOIN, ORDER BY)
  6. Plan constraints — NOT NULL, UNIQUE, FOREIGN KEY, CHECK
  7. Write migration — CREATE TABLE statements, ALTER TABLE for existing schemas

Output Format

## Schema Design: [Feature/Module Name]
### Entity-Relationship Summary
- User (1) → (N) Order
- Order (N) ← → (N) Product (via order_items)
### Tables
#### users
| Column | Type | Constraints | Notes |
|--------|------|-------------|-------|
| id | UUID | PK | |
| email | VARCHAR(255) | UNIQUE, NOT NULL | Login identifier |
| created_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | |
#### orders
| Column | Type | Constraints | Notes |
|--------|------|-------------|-------|
| id | UUID | PK | |
| user_id | UUID | FK → users.id, NOT NULL | |
### Indexes
- users(email) — unique lookup
- orders(user_id, created_at) — user's recent orders
### Migration SQL
[CREATE TABLE / ALTER TABLE statements]

Guidelines

  • Prefer UUIDs for primary keys in distributed systems, auto-increment for simple apps
  • Always add created_at and updated_at timestamps
  • Use soft deletes (deleted_at) for data that might need recovery
  • Index foreign keys — they're used in JOINs
  • Don't over-normalize — denormalize for read-heavy queries when justified
  • Include rollback SQL in migrations (DROP TABLE, ALTER TABLE DROP COLUMN)
  • Consider data volume and growth rate when designing indexes

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
52
Repository forks
3
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/xiaowen-jiang/agent-enterprise/database-schema-design/badge)](https://verified-skill.com/skills/xiaowen-jiang/agent-enterprise/database-schema-design)

Something wrong with this skill or its page? Tell us.